From cf71a61cdff054e89f5d3f2d48eb191b8a1c5bc7 Mon Sep 17 00:00:00 2001 From: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com> Date: Sun, 15 Nov 2026 11:23:13 +0200 Subject: [PATCH] fix(ui): restore toolbar icon hover feedback (#2990) Toolbar and tool window icon buttons (IconButton) paint --bg-toolbar-hover across their hit target again, so hovering shows the clickable area. Disabled buttons stay transparent; pressed, selected, focus ring and icon colours are unchanged. The hover colours match the toolbar tokens already used for the pressed state in Islands Light and Dark. Co-authored-by: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com> --- docs/en/contribute/guidelines/ui.mdx | 2 + docs/zh/contribute/guidelines/ui.mdx | 2 + e2e/toolbarHover.spec.ts | 91 ++++++++++++++++++++++++++++ src/ui/Button.module.css | 3 +- 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 e2e/toolbarHover.spec.ts diff --git a/docs/en/contribute/guidelines/ui.mdx b/docs/en/contribute/guidelines/ui.mdx index d0fb6d4c8..014cf9c9d 100644 --- a/docs/en/contribute/guidelines/ui.mdx +++ b/docs/en/contribute/guidelines/ui.mdx @@ -28,6 +28,8 @@ Style components with CSS Modules: `Thing.module.css` next to `Thing.tsx`, impor Build from the primitives in `src/ui/` before writing your own: `Button`, `BarButton`, `Input`, `Checkbox`, `Select`, `Dialog`, `Popup`, `Menu`, `Tooltip`, `List`, `Tree`, `Tabs`, `Splitter`, `Scrollbar`, `Spinner`, `Kbd`, and `T` for translated text. They already handle focus, keyboard navigation, theming and translation of their labels. Workbench-level pieces (tool windows, status items, overlays) come from [contributions](/en/contribute/architecture/frontend#contributions), not from custom layout. +Toolbar icon actions use `IconButton`: its full hit target uses `--bg-toolbar-hover` on hover, while pressed and selected states use their corresponding toolbar tokens. Keep semantic icon colours and the keyboard focus ring intact. + ## Accessibility - Use real `