Repository navigation
refactor: dropdown menus - #503
Open
Bohreromir wants to merge 7 commits into
Open
Bohreromir wants to merge 7 commits into
Bohreromir wants to merge 7 commits into
Conversation
The menu list of ContextMenu becomes MenuItems with arrow key navigation, so the dropdowns for #488 can share it. The action type is renamed to MenuAction. The title row moves out of the menu list, so the arrow keys skip its close button.
Dropdown is a popover anchored to the button that opens it, positioned with CSS anchor positioning and the existing script fallback for browsers without it. It closes on Escape, an outside click and when the focus moves out, and gives the focus back to the button when it closes from inside. DropdownMenu shows a list of actions in it. Part of #488.
The connection menus in the storage sidebar and on the settings page, the Create menu and the operations panel now open as dropdowns anchored to their button instead of as context menus or with their own click catchers. A connection menu opened from the keyboard no longer appears in the top-left corner. Unpinning a location is a direct button instead of a menu with a single action. Closes #488.
The language switcher, the user menu and the run mode menu open as dropdowns like the storage menus. The user menu now opens above the Trino editor's buttons instead of behind them. The run mode toggle keeps its size while its menu is open, and its menu is as wide as the button group again. Part of #488.
The name and e-mail in the user menu were a title row in a DaisyUI menu, so pressing them gave the name a near-black background behind dark text. They are now a plain header above the menu list.
The menu takes its minimum width from the button group through a resize observer, so it can lag a frame behind when the group changes size, e.g. when a font loads. The test measured once and failed in CI.
The menu list itself had the focus, which has no visible focus style, so keyboard users could not see where they were. Opening the row menus from the keyboard (#495) made this visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pr makes dropdowns be dropdowns instead of floating context menus.
For this it extracts a shared component and fixes various smaller bugs.
Moved to the dropdown:
Unpinning a location in the storage sidebar is a direct button instead of a menu with a single action.
Docs
Release note
Checklist
Author
Reviewer
Acceptance