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: do not dispatch zoom domain change event for all zoom bar behaviors #811

Conversation

hlyang397
Copy link
Contributor

Updates

  • Avoid to dispatching zoom domain change event for every zoom bar handle move

Demo screenshot or recording

No UI change

Review checklist (for reviewers only)

  • Demos all features
  • Documented/annotated
  • Matches UI/UX specs
  • Meets the code style guide
  • Accessible
  • Mobile first (responsive)
  • RTL support (bidirectional text)
  • Performant (limited bloat)

@hlyang397 hlyang397 requested review from sophiiae and removed request for a team September 21, 2020 05:47
Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

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

@hlyang397 just wondering:

  • Why would you want to dispatch events for every zoom domain change?
  • Why would you not want to dispatch events for every zoom domain change?

@hlyang397
Copy link
Contributor Author

@hlyang397 just wondering:

* Why would you `want` to dispatch events for every zoom domain change?

* Why would you `not want` to dispatch events for every zoom domain change?

@theiliad
For Events.ZoomDomain.CHANGE event, we should dispatch this event whenever the zoom domain changing is completed.
For example, the zoom-in button is clicked, the shift-clicking zoom in is triggered.
But when zoom bar handle is moving, the final zoom domain is not decided yet We should only dispatch Events.ZoomDomain.CHANGE when zoom bar selection is completed.
So user could listen to Events.ZoomDomain.CHANGE event to be notified whenever zoom domain is changed (not changing)

If user likes to track zoom bar handle movement, user could listen to Events.ZoomBar.SELECTION_XXX events.

Do I answer your question?

@theiliad
Copy link
Member

@hlyang397 just wondering:

* Why would you `want` to dispatch events for every zoom domain change?

* Why would you `not want` to dispatch events for every zoom domain change?

@theiliad
For Events.ZoomDomain.CHANGE event, we should dispatch this event whenever the zoom domain changing is completed.
For example, the zoom-in button is clicked, the shift-clicking zoom in is triggered.
But when zoom bar handle is moving, the final zoom domain is not decided yet We should only dispatch Events.ZoomDomain.CHANGE when zoom bar selection is completed.
So user could listen to Events.ZoomDomain.CHANGE event to be notified whenever zoom domain is changed (not changing)

If user likes to track zoom bar handle movement, user could listen to Events.ZoomBar.SELECTION_XXX events.

Do I answer your question?

yes thank you!

@theiliad theiliad merged commit 5fd692f into carbon-design-system:master Sep 22, 2020
@theiliad theiliad deleted the fix-zoom-domain-change-event-dispatch branch September 22, 2020 19:29
theiliad pushed a commit to theiliad/carbon-charts that referenced this pull request May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants