Files
logseq/packages/ui
scheinriese c85e8e5588 feat: avatar shape + customize band in asset-picker
Adds a Shape dimension to avatar icons (circle | rounded-rect) with
inheritance through `:logseq.property.class/default-icon`. Surfaced via
a tap-the-preview customize band in the asset-picker (avatar mode) with
a Shape dropdown and a keymap-style Reset/Done rail. Animates open/close.

Highlights:
- normalize-icon defaults `:shape :circle` for legacy data on both the
  slow path and the already-shaped fast path.
- get-node-icon extends class-default `select-keys` to propagate :shape.
- avatar.tsx accepts `data-shape`; CSS in icon.css drives the radius via
  `[data-shape="rounded-rect"]` selectors (avoiding Tailwind JIT issues
  with conditional arbitrary-value classes).
- Customize band: preview tile + Shape dropdown + Reset/Done rail. All
  blocks always rendered so CSS transitions can interpolate height,
  gradient, and the cue badge crossfade. Layout matches Paper artboard
  99K-1 / 97A-1 (344px inner content inside 380px band, inset rail
  separator, gradient flush against topbar).
- Fixes `keep-popup?` plumbing at three forwarding wrappers (asset-
  picker, icon-search, icon-picker) and the topmost on-chosen handler
  in property/value.cljs. Single click now produces a single write
  instead of the prior triple-write race.
- icon-row (property/value.cljs) and icon-search (icon.cljs) both made
  reactive via model/sub-block — so in-popup commits update the picker
  preview/chip live, not just the page-header avatar.
- Lazy `*text-measure-ctx` so the namespace loads in the Node test
  runner (was previously blocking all icon tests).
- New `.lx-toolbar-action` / `.lx-toolbar-reset-link` utility CSS
  mirrors Settings → Keymap shortcut popover footer styling.
- 10 new test assertions for shape default, preservation, fast-path
  handling, and field independence.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 00:26:49 +02:00
..
2023-12-26 16:31:37 +08:00
2025-12-09 20:53:38 +08:00
2023-12-26 16:31:37 +08:00
2025-12-09 20:53:38 +08:00
2024-01-26 11:17:28 +02:00
2023-12-26 16:31:37 +08:00
2025-12-09 20:53:38 +08:00

Logseq UI

Logseq UI components based on shadcn UI.

Development

🎨 Add a new component

It is recommended to install through CLI mode.

npx shadcn-ui@latest add button

🦄 Play with Storybook

  1. Watch shui cljs stories from root scripts.
yarn run cljs:watch-storybook

# cljs:watch-stories: "clojure -M:cljs watch stories-dev"
  1. Set up storybook from the current working directory.
yarn run watch:storybook

Credits

License

MIT