Skip to content

fix(apollo-react): add resize lifecycle callbacks [MST-10602]#770

Merged
SreedharAvvari merged 3 commits into
mainfrom
fix/mst-10602-resize-lifecycle
Jun 3, 2026
Merged

fix(apollo-react): add resize lifecycle callbacks [MST-10602]#770
SreedharAvvari merged 3 commits into
mainfrom
fix/mst-10602-resize-lifecycle

Conversation

@SreedharAvvari
Copy link
Copy Markdown
Contributor

Summary

  • Add resize lifecycle callbacks to StickyNoteNode and LoopNode.
  • Defer public resize-end callbacks with queueMicrotask so consumers commit after React Flow's final dimensions update.
  • Add focused component tests for lifecycle callbacks and existing resize behavior.

Verification

  • pnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/LoopNode/LoopNode.test.tsx src/canvas/components/StickyNoteNode/StickyNoteNode.test.tsx
  • pnpm --filter @uipath/apollo-react exec tsc --noEmit

Copilot AI review requested due to automatic review settings June 3, 2026 09:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

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

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 03, 2026, 05:57:01 AM
apollo-docs 🟢 Ready Preview, Logs Jun 03, 2026, 05:57:01 AM
apollo-landing 🟢 Ready Preview, Logs Jun 03, 2026, 05:57:01 AM
apollo-ui-react 🟢 Ready Preview, Logs Jun 03, 2026, 05:57:01 AM
apollo-vertex 🟢 Ready Preview, Logs Jun 03, 2026, 05:57:01 AM

@github-actions github-actions Bot added pkg:apollo-react size:L 100-499 changed lines. labels Jun 3, 2026
@SreedharAvvari SreedharAvvari changed the title Add resize lifecycle callbacks for undo transactions [MST-10602] fix(apollo-react): add resize lifecycle callbacks [MST-10602] Jun 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Dependency License Review

  • 1901 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1671
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 added the dev-packages Adds dev package publishing on pushes to this PR label Jun 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

📦 Dev Packages

🧹 Dev packages cleaned up after PR close.

Last updated: 2026-06-03 07:43:38 PT

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds resize lifecycle callbacks to key canvas nodes so downstream consumers (e.g., undo/redo transaction logic) can reliably bracket resize interactions, with onResizeEnd deferred to run after React Flow’s final dimension update.

Changes:

  • Added onResizeStart / onResizeEnd public props to StickyNoteNode and LoopNode.
  • Deferred onResizeEnd via queueMicrotask while preserving existing onResize behavior.
  • Added focused component tests covering resize start/end lifecycle ordering and microtask deferral.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/apollo-react/src/canvas/components/StickyNoteNode/StickyNoteNode.tsx Adds onResizeStart/onResizeEnd hooks; defers end callback with queueMicrotask while keeping existing onResize(params.width, params.height) behavior.
packages/apollo-react/src/canvas/components/StickyNoteNode/StickyNoteNode.test.tsx New tests validating onResizeStart fires on start and onResizeEnd is deferred while onResize remains synchronous.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.types.ts Extends LoopNodeProps with optional onResizeStart/onResizeEnd callbacks.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.tsx Wires lifecycle callbacks into resize handlers and defers onResizeEnd with queueMicrotask.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.test.tsx Extends resize control mock to emit onResize during drag and adds tests for deferred onResizeEnd + start callback.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread packages/apollo-react/src/canvas/components/LoopNode/LoopNode.tsx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@SreedharAvvari SreedharAvvari merged commit fc8d746 into main Jun 3, 2026
43 checks passed
@SreedharAvvari SreedharAvvari deleted the fix/mst-10602-resize-lifecycle branch June 3, 2026 14:42
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