From 6ed5540b1ac48f2945485eeac91fe64051072ecb Mon Sep 17 00:00:00 2001 From: Mike Yumatov Date: Mon, 22 Jun 2026 11:27:28 +0300 Subject: [PATCH] feat(viewer): icon-only "Add comment" selection popover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The popover shown when you select text in a doc is now icon-only — the speech-bubble icon, with the visible "Add comment" text dropped — for a more compact affordance. The button is switched to the shared IconButton primitive, which requires an aria-label, so the accessible name "Add comment" is preserved (screen readers and the role+name e2e selectors are unaffected). The floating chrome (shadow-lg) moves onto the button and the Popover wrapper becomes a pure positioner, dropping the hardcoded light/dark colors in favor of IconButton's theme tokens. Also hardens the shared IconButton primitive: it spread props onto a bare + {/if} diff --git a/packages/viewer/src/lib/ui/primitives/IconButton.svelte b/packages/viewer/src/lib/ui/primitives/IconButton.svelte index 77085dab..a825ec6a 100644 --- a/packages/viewer/src/lib/ui/primitives/IconButton.svelte +++ b/packages/viewer/src/lib/ui/primitives/IconButton.svelte @@ -15,6 +15,9 @@ let { "aria-label": ariaLabel, active = false, + // Default to "button": a bare HTML