Skip to content

fix(apollo-react): correct NodePropertyTrigger popover alignment and gap#814

Open
1980computer wants to merge 1 commit into
mainfrom
fix/node-property-trigger-alignment
Open

fix(apollo-react): correct NodePropertyTrigger popover alignment and gap#814
1980computer wants to merge 1 commit into
mainfrom
fix/node-property-trigger-alignment

Conversation

@1980computer

@1980computer 1980computer commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes two visual alignment issues with the NodePropertyTrigger popover that were not carried over when the component was rebuilt:

  • Right alignment: the popover was offset 4px to the left of the pill's right edge. Added alignOffset={-4} — for Radix align="end", negative values shift toward END (right in LTR), compensating for the 4px p-1 padding on the pill wrapper.
  • Gap from pill: the previous sideOffset={8} measured from the sliders button bottom, not the pill bottom. Since the button sits 4px above the pill's bottom edge (p-1 padding), the effective gap was only 4px. Changed to sideOffset={12} so the gap from the pill's bottom to the popover top is exactly 8px.

Root cause

DropdownMenuTrigger wraps the sliders <button> element, not the outer pill <div>. Radix measures sideOffset and alignOffset from the trigger element's bounding box — so both offsets must account for the pill's 4px wrapper padding.

Visual

Before After
Popover 4px left of pill right edge, 4px gap Popover flush with pill right edge, 8px gap

Test plan

  • Open Default story — click sliders button, confirm popover right edge aligns with pill right edge and has 8px gap below pill
  • Open States story — confirm open state matches same alignment
  • Open WithPresets and Composed stories — confirm consistent alignment across all variants

🤖 Generated with Claude Code

alignment

Copilot AI review requested due to automatic review settings June 12, 2026 22:45
@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 12, 2026, 03:55:11 PM
apollo-docs 🟢 Ready Preview, Logs Jun 12, 2026, 03:55:11 PM
apollo-landing 🟢 Ready Preview, Logs Jun 12, 2026, 03:55:11 PM
apollo-vertex 🟢 Ready Preview, Logs Jun 12, 2026, 03:55:11 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

Fixes visual alignment regressions in NodePropertyTrigger’s dropdown menu positioning by adjusting Radix offsets to account for the pill wrapper padding.

Changes:

  • Update DropdownMenuContent positioning with sideOffset={12} and alignOffset={-4} to align the popover with the pill edges and restore the intended gap.
  • Add in-code rationale comments explaining the offset math relative to the pill’s p-1 padding.
  • Minor story file whitespace change (trailing blank line).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/apollo-react/src/canvas/controls/NodePropertyTrigger/NodePropertyTrigger.tsx Adjusts Radix dropdown offsets to correct popover alignment and spacing relative to the trigger pill.
packages/apollo-react/src/canvas/controls/NodePropertyTrigger/NodePropertyTrigger.stories.tsx Adds trailing whitespace at EOF (no functional/story behavior change).

Comment on lines +299 to +301
},
};

The DropdownMenuTrigger is the sliders button inside the pill, not the
pill wrapper itself. Previous sideOffset={8} measured from the button
bottom, leaving only 4px from the pill bottom (8 - 4px pill padding).
Fixed to sideOffset={12} for a true 8px gap from the pill's bottom edge.

Added alignOffset={-4} so the popover's right edge aligns with the
pill's right edge rather than the button's right edge (4px inset).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@1980computer 1980computer force-pushed the fix/node-property-trigger-alignment branch from fbd62f3 to 6e6a07b Compare June 12, 2026 22:49
@github-actions github-actions Bot added size:XS 0-9 changed lines. and removed size:S 10-29 changed lines. labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:XS 0-9 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants