fix(apollo-react): add horizontal padding to BaseNode inline edit inputs [MST-12529]#941
fix(apollo-react): add horizontal padding to BaseNode inline edit inputs [MST-12529]#941kittyyueli wants to merge 1 commit into
Conversation
…uts [MST-12529] The label/description textareas rendered when double-clicking a BaseNode only got px-1.5/py-0.5 when a labelBackgroundColor was set, so nodes without one (e.g. case triggers) show a dashed outline box with text flush against its edges while editing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcawHHGweJQJN34afuLHjM
|
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 fixes the inline-edit UX for BaseNode labels in apollo-react by ensuring the editable textarea inputs always include horizontal padding, even when no labelBackgroundColor is provided (the common case for most BaseNode consumers).
Changes:
- Made
px-1.5unconditional forEditableLabeltextarea styling while keepingpy-0.5conditional onbackgroundColor. - Added a regression test asserting both label and sub-label edit inputs include
px-1.5regardless of background color.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.tsx | Applies unconditional horizontal padding to inline-edit textareas to prevent text from being flush against the dashed outline. |
| packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.test.tsx | Adds a regression test to validate the new padding behavior for both editable inputs. |
📊 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 |
CLAUDE BUG BURN-DOWN
Claude session: https://claude.ai/code/session_01CcawHHGweJQJN34afuLHjM
Summary
BaseNodelabel/sub-label (e.g. a Case Management trigger name) to edit it renders a dashed-outline textarea with text flush against the edges, becauseEditableLabelonly appliedpx-1.5/py-0.5when alabelBackgroundColorwas set.labelBackgroundColoris only used byAgentNode/ResourceNode; every otherBaseNodeconsumer (including Case Management triggers) edits with zero horizontal padding.px-1.5) unconditional inEditableLabel(NodeLabel.tsx), keeping the verticalpy-0.5tied tolabelBackgroundColor(matching theHeader/SubHeader"chip" styling, which is unaffected by this change).Root cause
packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.tsx-EditableLabel's className previously gatedpx-1.5 py-0.5behindbackgroundColor && ..., so inline edit inputs without a background color got no padding despite always rendering a visibleoutline-dashedbox.Test plan
pnpm turbo run lint:fix --filter=@uipath/apollo-react(no diagnostics on changed files)pnpm turbo run build --filter=@uipath/apollo-react(build + type declarations succeed)vitest --runforNodeLabel.test.tsx/BaseNode.test.tsx/BaseNodeContainer.test.tsx(79/79 passing)px-1.5regardless oflabelBackgroundColorFixes MST-12529.
Generated by Claude Code