mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 20:54:09 +00:00
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>