diff --git a/app/src/App.css b/app/src/App.css index 6f5a98df..5f68e862 100644 --- a/app/src/App.css +++ b/app/src/App.css @@ -79,6 +79,30 @@ html .wrolpi-navbar .mantine-ActionIcon-root:hover { display: flex; align-items: center; margin-left: 1.5em; + /* Full bar height, so the anchor inside has somewhere to stretch to. */ + align-self: stretch; +} + +/* + * An icon-only trigger in the corner gets a link's hit area, not its glyph's. + * + * The share glyph already computed `cursor: pointer` -- it is an `` -- but the + * target was the 24px box the icon occupies, so the pointer appeared only if you found it + * exactly, and there was no hover highlight to aim at. Stretched and padded, it behaves + * like Help and Admin beside it. + * + * `align-self` rather than `align-items: stretch` on the wrapper: the IconButtons in the + * corner have an explicit height, and a stretch container places an item it cannot stretch + * at the start -- which would push the hotspot and theme glyphs back off centre. + */ +.wrolpi-navbar-icon > a { + align-self: stretch; + padding: 0 0.5em; + cursor: pointer; +} + +.wrolpi-navbar-icon > a:hover { + background: rgba(0, 0, 0, 0.12); } /* diff --git a/app/src/components/KeyboardShortcutsProvider.js b/app/src/components/KeyboardShortcutsProvider.js index b79764ee..7fa6d729 100644 --- a/app/src/components/KeyboardShortcutsProvider.js +++ b/app/src/components/KeyboardShortcutsProvider.js @@ -83,6 +83,16 @@ function SearchModal({open, onClose}) { return ( + {/* + * `wrolpi-search-modal` makes the suggestion list part of the panel rather + * than an overlay on the page; see ui.css. Everywhere else the list floats + * over the page, which is right -- results that reflow the page while you + * type are unusable. Inside a modal it is wrong twice over: an absolutely + * positioned list adds no height, so the panel stayed 114px tall, and the + * panel's own `overflow: auto` then clipped the list at the panel's edge. + * The modal showed a search box and the first word of the first result. + */} +
+
); diff --git a/app/src/components/Nav.js b/app/src/components/Nav.js index 9baba2da..bc537cbc 100644 --- a/app/src/components/Nav.js +++ b/app/src/components/Nav.js @@ -111,8 +111,18 @@ function DropdownMenuItem({link}) { * button that eventually rendered -- the row overflowed by that much and the bar wrapped. * Measuring one thing and drawing another is only ever right by coincidence. */ -const NavDropdownTrigger = React.forwardRef(({text, ...props}, ref) => -