Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zoom bugs #2988

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Fix zoom bugs #2988

merged 1 commit into from
Aug 29, 2023

Conversation

djbarnwal
Copy link
Member

Checklist

  • Manual verification
  • Unit test coverage
  • E2E test coverage
  • Needs manual QA?

Summary

Issue addressed:

  1. Zoom was broken on dashboards with high number of charts when keybinding Z was used
  2. The zoomed in dates were not accurate due to timezone changes

Details:

  1. Moves <svelte:window> to a component single component so to avoid multiple dispatches/state changes for the same keybinding.
  2. Handles timezone offset when zoomed in

Steps to Verify

Play around with zoom on a dashboard with 5 or more charts.

@djbarnwal djbarnwal added the blocker A release blocker issue that should be resolved before a new release label Aug 29, 2023
$dashboardStore?.selectedScrubRange?.start,
$dashboardStore?.selectedScrubRange?.end
);
metricsExplorerStore.setSelectedTimeRange(metricViewName, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not merge these actions instead of using setTimeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried merging it into a single dashboard reducer call but the two values (timeRange and scrubRange) are serialized independently on the protos. Successive calls without any delay leads to race condition.

@AdityaHegde AdityaHegde merged commit e557b75 into main Aug 29, 2023
2 checks passed
@AdityaHegde AdityaHegde deleted the fix/multiple-dispatch branch August 29, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker A release blocker issue that should be resolved before a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants