Skip to content

fix(apollo-react): restore inline preset rename/delete actions in NodePropertyTrigger#810

Merged
CalinaCristian merged 2 commits into
mainfrom
fix/node-property-trigger-inline-preset-actions
Jun 12, 2026
Merged

fix(apollo-react): restore inline preset rename/delete actions in NodePropertyTrigger#810
CalinaCristian merged 2 commits into
mainfrom
fix/node-property-trigger-inline-preset-actions

Conversation

@CalinaCristian

Copy link
Copy Markdown
Collaborator

What

Restores the inline pencil/trash action buttons on NodePropertyTrigger preset rows. The review-feedback pass on #781 replaced them with indented per-preset Rename {label} / Delete {label} menu items — product/design prefers the inline affordance (matches the flow design prototype).

Changes

  • Preset rows render pencil/trash icon buttons inline. Pointer events on the nested buttons are stopped (pointerdown/pointerup/click) so the Radix item's pointerup-select doesn't apply the preset or close the menu.
  • Truncated preset labels get a native title tooltip (same pattern as the icon buttons' hints).
  • Catalog: canvas.property_trigger.rename_preset / delete_preset ids replace the *_with_label pair.
  • Story: wires onPresetRename (the pencil only renders when the handler is provided, so Storybook never showed it) with a bounded (n) counter demo handler.

Notes for review

The indented-items variant was arguably the stricter ARIA shape (no nested interactive elements inside a menuitem). The inline buttons keep their own aria-labels and remain keyboard-reachable, and this is the interaction the design spec shows — flagging the tradeoff explicitly rather than silently re-litigating the review.

Test plan

  • vitest run src/canvas/controls/NodePropertyTrigger — 27 tests pass (rename/delete cases reverted to the inline-button contract).
  • Storybook playground story shows label + pencil + trash per preset row; rename bumps a (n) counter; delete removes the row; menu stays open for both.

🤖 Generated with Claude Code

…ePropertyTrigger

The review-feedback pass on #781 replaced the inline pencil/trash buttons on
preset rows with indented per-preset 'Rename {label}' / 'Delete {label}' menu
items. Product/design prefers the inline affordance — restore it:

- preset rows render pencil/trash icon buttons inline (pointer events stopped
  so the Radix item's pointerup-select doesn't apply the preset)
- truncated preset labels get a native title tooltip
- catalog: rename_preset / delete_preset ids replace the *_with_label pair
- story: wire onPresetRename (the pencil only renders when provided) with a
  bounded '(n)' counter demo handler

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 12, 2026 03:29
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 11, 2026, 08:41:21 PM
apollo-docs 🟢 Ready Preview, Logs Jun 11, 2026, 08:41:21 PM
apollo-landing 🟢 Ready Preview, Logs Jun 11, 2026, 08:41:21 PM
apollo-vertex 🟢 Ready Preview, Logs Jun 11, 2026, 08:41:21 PM

@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1922 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1692
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores inline rename/delete affordances (pencil/trash) for preset rows in the Canvas NodePropertyTrigger dropdown, aligning the interaction with the design prototype and reverting the prior indented menu-item approach.

Changes:

  • Render inline pencil/trash icon buttons within each preset row and stop pointer events so clicking them doesn’t trigger preset apply/close.
  • Add native title tooltip for truncated preset labels.
  • Update i18n message IDs for rename/delete preset actions and wire onPresetRename in Storybook.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/apollo-react/src/canvas/locales/en.json Replaces rename/delete preset message IDs used by the control.
packages/apollo-react/src/canvas/controls/NodePropertyTrigger/NodePropertyTrigger.tsx Reintroduces inline rename/delete icon buttons on preset rows + truncated-label title tooltip.
packages/apollo-react/src/canvas/controls/NodePropertyTrigger/NodePropertyTrigger.test.tsx Updates tests to target the new inline buttons and keep-menu-open behavior.
packages/apollo-react/src/canvas/controls/NodePropertyTrigger/NodePropertyTrigger.stories.tsx Adds a demo onPresetRename handler so the pencil button is visible/interactive in Storybook.

Comment thread packages/apollo-react/src/canvas/locales/en.json Outdated
Copilot review: multiple presets render multiple icon buttons, so generic
'Rename preset' / 'Delete preset' accessible names are ambiguous for AT and
brittle for queries. Use the *_with_label catalog ids ('Rename {label}' /
'Delete {label}') for title/aria-label on the inline buttons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CalinaCristian CalinaCristian merged commit b1ed0c8 into main Jun 12, 2026
42 checks passed
@CalinaCristian CalinaCristian deleted the fix/node-property-trigger-inline-preset-actions branch June 12, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants