Skip to content

ref(tracemetrics): Extract state keeping from state changes in provider#113211

Merged
narsaynorath merged 1 commit into
masterfrom
nar/ref/tracemetrics-equations-extract-state-keeping-from-state-changes
Apr 20, 2026
Merged

ref(tracemetrics): Extract state keeping from state changes in provider#113211
narsaynorath merged 1 commit into
masterfrom
nar/ref/tracemetrics-equations-extract-state-keeping-from-state-changes

Conversation

@narsaynorath

Copy link
Copy Markdown
Member

Extracts how the state changes from what the state changes are. On Explore we persist it to the URL (i.e. with navigate) and that gets re-read on re-render. In Alerts we'll need to use local state so separate the logic into helpers where the setQueries part can be configured by a parent component.

Also pushes up hasEquations to the context so we can configure a different flag based on the rendering context (i.e. the alerts page will use a different flag)

This generalizes the state changes so I can change the way we store state from
flushing to the URL to keeping local state. This will be necessary for Alerts
where Alerts should only store the final equation. I only need to parse the
equation and locally render the subcomponents.
@narsaynorath
narsaynorath requested a review from a team as a code owner April 16, 2026 19:02
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 16, 2026

@nsdeschenes nsdeschenes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 😃

@narsaynorath
narsaynorath merged commit b7a1da7 into master Apr 20, 2026
66 checks passed
@narsaynorath
narsaynorath deleted the nar/ref/tracemetrics-equations-extract-state-keeping-from-state-changes branch April 20, 2026 13:41
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants