fix(ui): user-menu hover, tooltip, and dismiss behavior (MAPPS-384) #446
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-384-user-menu-hover-dismiss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes MAPPS-384.
Problem
Two defects on the top-bar user-profile icon:
Fix
p-2 rounded-full text-subtle hover:text-content hover:bg-surface-2, plustitle+aria_label"User menu" andaria_expanded/aria_haspopup. This gives the hover highlight and the hover/focus tooltip.div(fixed inset-0 z-10), the same pattern GlobalSearch uses (MAPPS-346). It sits below the dropdown (z-10 < z-20) so menu entries stay clickable, and it unmounts with the dropdown so there is no document-level listener that could leak.use_effect(use_reactive!(|route| ...)). UserMenu lives in the persistent AppShell (MAPPS-366), so a route change does not re-mount it; the effect reacts to the route and closes the menu.PortalUserMenu, which had the same two defects.Design note
The ticket suggested adopting
IconButton. I chose the sibling top-bar convention instead:IconButton'srounded-md+ blue focus-ring base would visually diverge from therounded-fulltop-bar icons, which is the exact drift the ticket wants to remove. Matching the siblings is what the primary acceptance criterion ("matching the other top-bar icons") actually asks for. The AC's "document-level handler is removed when the menu closes (no listener leak)" is satisfied in spirit and better: the backdrop has no listener at all, so nothing can leak.Acceptance criteria
title="User menu").Verification
cargo fmt --all --check: clean.cargo clippy --all-targets -- -D warningson the CI toolchain (1.94.1): clean.cargo check --target wasm32-unknown-unknown: passes.cargo test --lib: 223 passed.--libharness here.