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

BUG: DialogToggleButton should use portal #2684

Closed
tillprochaska opened this issue Nov 9, 2022 · 2 comments
Closed

BUG: DialogToggleButton should use portal #2684

tillprochaska opened this issue Nov 9, 2022 · 2 comments
Assignees
Labels
bug Things that should work, but don’t ui Issues related to Aleph’s frontend

Comments

@tillprochaska
Copy link
Contributor

Describe the bug
The dialog is currently rendered as a sibling element to the toggle button. When enclosing the toggle button in a popover target (e.g. in order to display a tooltip), the target will be active as long as the dialog is open. Using a portal solves this.

To Reproduce
Steps to reproduce the behavior:

  1. Create a network diagram.
  2. Open the network diagram.
  3. Click on the settings icon in the top right corner.
  4. The settings dialog will be open. The tooltip stays visible.

Expected behavior
The tooltip should only be visible while the button is active and should be hidden once the dialog opens.

Aleph version
3.12.7

Screenshots
-/-

Additional context
-/-

@tillprochaska tillprochaska added bug Things that should work, but don’t ui Issues related to Aleph’s frontend labels Nov 9, 2022
@tillprochaska tillprochaska self-assigned this Nov 11, 2022
@tillprochaska
Copy link
Contributor Author

Note to myself: We’re actually already rendering most modals in portals. However, while portal are rendered in a different part of the DOM tree, they exist in the same position in the React component tree and synthetic events bubble along the React component tree, not the DOM tree.

facebook/react#11387

@tillprochaska
Copy link
Contributor Author

Closing this as fixing it is probably not worth the effort. May revisit it when we’ve converted a larger part of the app to functional components (as hooks may be a better way of sharing the boilerplate to handle dialog states without enforcing the button and dialog components both being part of the same component subtree.)

@tillprochaska tillprochaska closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that should work, but don’t ui Issues related to Aleph’s frontend
Projects
No open projects
Archived in project
Development

No branches or pull requests

1 participant