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

Search panel closes with transition when clicking "X" but not when pressing Escape #6055

Open
robertknight opened this issue Jan 5, 2024 · 4 comments

Comments

@robertknight
Copy link
Member

The search panel (currently behind a flag) can be closing by pressing Esc when the panel has focus or via the "X" button on the right. Clicking the "X" on the right results in the panel hiding with a transition. Pressing Esc causes the panel to instantly disappear with no transition.

The expected behavior is that there should be a transition in both cases.

Search panel close transition

The reason for the difference is that when clicking the "X", the Dialog component internally initiates the transition before notifying its parent via onClose. When pressing Esc however we immediately update state to close the sidebar panel, which prevents Dialog from getting a chance to initiate the transition. A possible solution would be for Dialog to expose a handle with a close method that triggers the close transition in the normal way.

@acelaya
Copy link
Contributor

acelaya commented Jan 5, 2024

The root cause is the same causing #5520

A possible solution would be for Dialog to expose a handle with a close method that triggers the close transition in the normal way.

We considered this some time ago hypothesis/frontend-shared#1178

I think I even created a POC, but I guess I had to park it due to other priorities.

@victuseze
Copy link

Hi robertKnight, I would like to work on this.

@mustafaazad03
Copy link

Hi @robertknight & @acelaya, Can I try to solve this issue?

@acelaya
Copy link
Contributor

acelaya commented Jan 12, 2024

Thanks for the interest!

This issue is a bit more complex than it might seem and has some implications. We need to put a bit more thinking on it to see where it fits in the grand scheme of things, before we can prioritize it.

We'll share more information as soon as we have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants