Files
logseq/src
scheinriese 407308fe64 feat: preview color on icons when hovering color picker swatches
Hovering a color swatch live-previews that color on both the picker grid
icons and the page-title icon, letting the user imagine the choice before
committing. Click commits as before; mouse-leave or popup close reverts.

- color-picker now tracks local hover state and splits its effect: a
  display-only effect (deps [effective-color]) updates the CSS var on
  hover and commit; a commit effect (deps [color]) persists to storage.
  An unmount cleanup clears external preview state.
- New :on-hover! / :on-hover-end! kwargs are opt-in; threaded through
  icon-picker -> icon-search via :preview-target-db-id from block.cljs.
- get-node-icon-cp subscribes to :ui/icon-hover-preview so sidebar /
  inline icons update reactively.
- icon-picker-trigger-icon is a small reactive sub-component so the
  page-title trigger updates without forcing the hook-using parent into
  a class component. It pre-normalizes icon-value before applying the
  preview color so normalize-icon's early-exit doesn't strip :data:value.
- :focus-visible outline on swatches gives keyboard users the same
  preview affordance as mouse hover.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 14:52:15 +02:00
..
2026-03-17 00:07:33 +08:00