Skip to content

feat(apollo-react): add loop boundary states and safe area validation [MST-11096]#818

Open
SreedharAvvari wants to merge 1 commit into
mainfrom
codex/loop-boundary-drop-guard-mst-11096
Open

feat(apollo-react): add loop boundary states and safe area validation [MST-11096]#818
SreedharAvvari wants to merge 1 commit into
mainfrom
codex/loop-boundary-drop-guard-mst-11096

Conversation

@SreedharAvvari

Copy link
Copy Markdown
Contributor

Summary

  • Add an explicit boundaryState API for loop nodes with default, drop-target, and invalid states.
  • Render drop-target and invalid states as loop boundary highlights instead of changing the inner dotted wall.
  • Add a boundary-safe rect validation helper for loop child drag/drop checks, using a smaller buffer than placement/fit geometry.
  • Add tests and a Storybook comparison story for all three boundary states.

Validation

  • pnpm exec biome check --write ...
  • pnpm --filter @uipath/apollo-react exec tsc --noEmit -p tsconfig.json
  • pnpm --filter @uipath/apollo-react test -- src/canvas/components/LoopNode/LoopNode.test.tsx src/canvas/utils/container.test.ts

Notes

  • Flow Workbench integration is intentionally not included in this PR.
  • Local implementation plan docs were left untracked and are not part of this PR.

Copilot AI review requested due to automatic review settings June 14, 2026 15:13
@github-actions

github-actions Bot commented Jun 14, 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 14, 2026, 08:18:57 AM
apollo-docs 🟢 Ready Preview, Logs Jun 14, 2026, 08:18:57 AM
apollo-landing 🟢 Ready Preview, Logs Jun 14, 2026, 08:18:57 AM
apollo-vertex 🟢 Ready Preview, Logs Jun 14, 2026, 08:18:57 AM

@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

@SreedharAvvari SreedharAvvari changed the title [codex] add loop boundary states and safe area validation [MST-11096] feat(apollo-react): add loop boundary states and safe area validation [MST-11096] Jun 14, 2026
@SreedharAvvari SreedharAvvari added the dev-packages Adds dev package publishing on pushes to this PR label Jun 14, 2026
@SreedharAvvari SreedharAvvari marked this pull request as ready for review June 14, 2026 15:14
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

📦 Dev Packages

Package Status Updated (PT)
@uipath/apollo-react@4.47.1-pr818.d363e4f 🟢 Published Jun 14, 2026, 08:17:31 AM

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

This PR extends the canvas loop container UX by introducing an explicit boundaryState API on LoopNode (default / drop-target / invalid) and adding a boundary-safe-area rect validation helper for drag/drop containment checks. It also adds focused unit tests and a Storybook comparison story to cover the new states and geometry behavior.

Changes:

  • Added configurable safe-area buffering to getContainerSafeArea and introduced isRectInsideContainerSafeArea for boundary-safe validation.
  • Introduced LoopNodeBoundaryState + boundaryState prop and rendered drop-target/invalid as boundary outlines via Tailwind classes + a data-boundary-state attribute.
  • Added unit tests for the new safe-area helper and loop boundary-state rendering, plus a Storybook story showing all states side-by-side.

Reviewed changes

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

Show a summary per file
File Description
packages/apollo-react/src/canvas/utils/container.ts Adds safe-area buffer options and a rect-in-boundary-safe-area validator helper.
packages/apollo-react/src/canvas/utils/container.test.ts Adds tests validating boundary-safe-area containment and measured-dimension handling.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.types.ts Introduces LoopNodeBoundaryState and exposes boundaryState on the public LoopNode config/props.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.tsx Applies boundary state via data-boundary-state and outline styling for drop-target/invalid states.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.test.tsx Adds coverage ensuring each boundary state renders the expected boundary styling without altering the body frame styling.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.stories.tsx Adds a “Boundary States” story to compare default/drop-target/invalid visually.

Comment on lines +266 to +273
/** Returns whether a local child rect is fully inside the container boundary safe area. */
export function isRectInsideContainerSafeArea(
rect: RectLike,
containerNode: Pick<Node, 'width' | 'height' | 'measured' | 'style'>
): boolean {
const safeArea = getContainerSafeArea(containerNode, undefined, {
buffer: CONTAINER_BOUNDARY_SAFE_AREA_BUFFER,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-packages Adds dev package publishing on pushes to this PR pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants