Skip to content

[DS 2.0] Render palette entries with the canvas Node states - #140

Open
librowski wants to merge 1 commit into
ds2-menu-item-selectedfrom
ds2-palette-node-states
Open

librowski wants to merge 1 commit into
ds2-menu-item-selectedfrom
ds2-palette-node-states

Conversation

@librowski

Copy link
Copy Markdown
Collaborator

Decision

Design answer to the palette questions (DR-180/181): the palette gets no component and no tokens of its own. An entry is the Node without ports and badge; its states are the Node states (rest Default, hover Hover, dragging Active with the same ring as selection, unavailable type Disabled). The drag preview is the same Node instance.

What was already true

NodePreviewContainer already renders the real node template with showHandles={false}, and the shell's own hover (stroke-hover) already applied to palette entries. The palette's variables.css (two --wb-sdk-palette-item-* properties) had zero consumers and the item wrapper's transparent outline did nothing.

Change

  • NodePanel.Root, NodeDescription, NodeIcon (ui): new disabled prop rendering the Node Disabled variant from the Figma master bindings: shell and icon container canvas/node/bg-primary-disabled, title and subtitle canvas/node/text-disabled, glyph ui/icon/disabled, no hover reaction. Each component owns its defaults in :root (--wb-public-node-*-disabled), per the built-CSS contract that forbids redefining public variables on component selectors.
  • Node templates (sdk): disabled prop passed to shell, icon and description.
  • Palette: read-only entries render disabled instead of opacity: 0.5; the drag preview renders selected (Active ring); dead variables.css and outline styling removed.
  • Docs: NodePanel, NodeDescription and NodeIcon pages describe the state. Changesets: ui minor, sdk minor.

Measured in the demo on the built package: rest border gray / title #070708 / icon acc1-500; hover border acc1-500; read-only background gray-300, title and icon at 30% alpha, disabled class on the shell. Screenshots in the research repo (visual-pass-2026-09-14/).

Follow-up, not in this PR

The container mapping from the same answer (PaletteContainerLeft_Sidebar): the shared Sidebar component is 320px wide with a 20px content gap, the Figma master is 273px with 16px. It also serves the properties bar, so it is a separate change. The drag preview ring is covered by the preview spec, not by a browser check (native drag image).

Verification

ui and sdk typecheck, eslint, stylelint, unit tests (NodePanel states, NodeDescription disabled, preview state passthrough), pnpm -F @workflowbuilder/ui build with check:built-css, docs typecheck.

@librowski
librowski added this pull request to stack #125 September 14, 2026 10:58
@librowski
librowski marked this pull request as ready for review September 14, 2026 13:15
@librowski
librowski force-pushed the ds2-palette-node-states branch from b4215cf to dce90ff Compare September 14, 2026 19:54
Design answer to the palette questions: the palette has no component of
its own, an entry is the Node without ports and badge, and its states are
the Node states. Hover already came from the shell; the drag preview now
renders the Active state (outline and ring), and read-only entries render
the Disabled variant instead of a faded copy. NodePanel.Root,
NodeDescription and NodeIcon gain a disabled prop with their own public
defaults; the four node templates pass it through. The palette's unused
variables file and outline styling are removed.
@librowski
librowski force-pushed the ds2-palette-node-states branch from dce90ff to 1f440c8 Compare September 15, 2026 08:54
@librowski
librowski removed this pull request from stack #125 September 15, 2026 10:24
@librowski
librowski changed the base branch from ds2-node-text-ellipsis to ds2-menu-item-selected September 15, 2026 10:24
@librowski
librowski added this pull request to stack #151 September 15, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants