feat(apollo-react): densify the add-node panel and enrich toolbox rows#891
feat(apollo-react): densify the add-node panel and enrich toolbox rows#891BenGSchulz wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR updates the canvas add-node panel’s Toolbox/ListView presentation to match the new dense menu design, introducing optional per-item UI affordances (badges, meta line, and dividers) while keeping the underlying data shape backward-compatible for existing consumers.
Changes:
- Densifies
ListViewrows (smaller icon tile/glyph sizes, smaller chevrons) and movesdescriptionto a delayed hover tooltip on the whole row. - Adds optional
ListItemfields (meta,badge,dividerBefore) and implements adividerrender item plus per-render-item row heights via arowHeightfunction. - Updates tests and Storybook to demonstrate/validate the new menu visuals and new fields.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/constants.ts | Adjusts toolbox height to align with the new dense menu’s “scroll hint” design. |
| packages/apollo-react/src/canvas/components/Toolbox/ListView.tsx | Implements new ListItem fields, divider render items, delayed-hover description tooltip, and variable row heights. |
| packages/apollo-react/src/canvas/components/Toolbox/ListView.test.tsx | Updates/extends unit tests for new rendering behavior (description no longer inline, meta/badge/dividers). |
| packages/apollo-react/src/canvas/components/Toolbox/ListView.styles.ts | Updates icon tile sizing to match the new density metrics. |
| packages/apollo-react/src/canvas/components/AddNodePanel/AddNodePanel.stories.tsx | Adds a Storybook scenario demonstrating the target menu structure (badges/meta/dividers). |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
📦 Dev Packages
|
71a0030 to
ba9cd3c
Compare
ba9cd3c to
846d48f
Compare
d1d9745 to
172f680
Compare
172f680 to
73b8347
Compare
73b8347 to
0c469c3
Compare
0c469c3 to
1851984
Compare
Visual layer of the add-node menu redesign (MST-11860): denser rows plus optional per-row content on the canvas Toolbox / ListView. Everything new is additive, so existing consumers only get the density change unless they set the new fields. - Denser rows: 32px single-line (44px with an inline second line), 20x20 icon glyphs in 24x24 tiles, 16px chevrons. TOOLBOX_HEIGHT 440 -> 410 so the root menu hints at scrolling. Icon tiles default to transparent; items keep explicit color / colorDark. - New optional ListItem fields: `description` (inline second line), `detail` (extra text shown only in the hover tooltip), `badge` (uppercase trailing tag), `dividerBefore` (thin separator, suppressed at the list head and in flat search results), `contentColor` (colors the name and leading icon), and `trailingIcon` — the last two compose the "Create new ..." affordance. - One tooltip per row: a single popover merges name + description + detail and appears only when it adds something the row can't show (a hidden detail, or a clipped name / description), revealing just those pieces. Centered above the row with a slight overlap; width capped via a merged content class. CanvasTooltip gains `sideOffset`, `contentClassName`, and `disableHoverableContent` (closes as the pointer leaves the row so it never blocks neighbouring rows). - Section headers are spaced uppercase labels with no bordered rule; section and divider rows are presentation-only (no listbox option ARIA). Per-item row heights via getRenderItemHeight. - Menu-structure story mirrors the target hierarchy (banded root, badges, In this solution / Published submenus, styled create rows) plus a Tooltip scenarios group covering each popover path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1851984 to
833ebe8
Compare
Summary
Visual layer of the add-node menu redesign (MST-11860): denser rows plus optional per-row content for the canvas
Toolbox/ListView. Everything new is additive — existing consumers get only the density/geometry change; the new fields render nothing unless set. (The menu structure itself is built in the companion flow-workbench PR.)TOOLBOX_HEIGHT440 → 410 so the root menu cuts the last row to hint at scrolling. Icon tiles default to transparent (items keep explicitcolor/colorDark).ListItemfields:description— inline second line under the namedetail— extra text shown only in the row's hover tooltipbadge— uppercase tag at the trailing edge (e.g. TRIGGER / WAIT)dividerBefore— thin separator above the row; suppressed at the list head and in flat search resultscontentColor/trailingIcon— color the name + leading icon and add a trailing icon; together they form the "Create new …" affordancedetail, or a clipped name / description), revealing just those pieces. Centered above the row with a slight overlap; width capped via a merged content class.CanvasTooltipgainssideOffset,contentClassName, anddisableHoverableContent(closes as the pointer leaves the row, so it never blocks neighbouring rows).getRenderItemHeight.Test plan
ListView/CanvasTooltipunit tests: badges, dividers (emit + suppress), inline description vs tooltip-only detail, truncation-gated popover,contentColor/trailingIcon, section headers,getRenderItemHeightNotes for reviewers
🤖 Generated with Claude Code