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

Sidebar panels do not close with transition when toggled from their corresponding toolbar buttons #5520

Open
acelaya opened this issue Jun 6, 2023 · 0 comments
Labels

Comments

@acelaya
Copy link
Contributor

acelaya commented Jun 6, 2023

Some time ago we introduced the concept of TransitionComponents in frontend-shared (see hypothesis/frontend-shared#957 and hypothesis/frontend-shared#975), and updated the sidebar panels to use this new approach.

They allow to transparently handle transitions, by, among other things, wrapping the onClose callback so that it is not really invoked until the out transition has finished.

This is convenient, because consumers do not need to worry about transitions. However, the onClose callback itself knows nothing about transitions, which means if it's called from outside the component, it hides the component without transition.

In the sidebar that can happen if the toolbar buttons are "clicked" while the corresponding panel is visible.

See the behavior when the panels are closed through their own close button (they have transition):

with-transition.webm

Vs "clicking" the toolbar button (no transition. Closed immediately):

with-no-transition.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants