fix(charts): Preserve ECharts zoom state#119237
Merged
Merged
Conversation
Dragging to zoom can re-init the hidden ECharts toolbox and replay stale dataZoom events, which makes issue detail charts push the wrong time range after rerenders. Centralize the merge props from the dashboards fix and reuse them from both ChartZoom implementations. Keep the inside dataZoom model around for synced charts while disabling the hidden toolbox when navigation is off. Adds a small hook test for rerenders and disabled zoom behavior. Co-Authored-By: Codex <noreply@openai.com>
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-ioeqq33e4.sentry.dev |
Contributor
📊 Type Coverage Diff
🔍 3 new type safety issues introduced
Type assertions (
This is informational only and does not block the PR. |
renderHook inferred the initial props too narrowly, so typecheck failed when the test rerendered with disabled zoom. Pin the hook props type in the spec so it matches the actual hook API. Co-Authored-By: Codex <noreply@openai.com>
JoshuaKGoldberg
approved these changes
Jul 8, 2026
JoshuaKGoldberg
left a comment
Member
There was a problem hiding this comment.
This seems very good and reasonable to me (thanks for picking it up!) but I should definitely defer to @gggritso as echarts enthusiast & historian extraordinaire.
…9263) `LogsAutoRefreshContext` was missing the _"only `navigate()` if the query changed"_ logic from other places like `chartZoom`. I added it there, then added a shared `navigateIfQueryChanged` helper to deduplicate the half-dozen places it was used. Closes LOGS-383. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dragging to zoom on issue details could rebuild the hidden ECharts dataZoom toolbox and replay stale zoom events, similar to the dashboards fix in #119013.
This moves the ECharts merge settings into shared chart zoom config and uses it from both ChartZoom implementations. It also keeps the inside dataZoom model for synced release-bubble charts while disabling the hidden toolbox when zoom navigation is off.
Adds a small hook test for rerenders and disabled zoom behavior.