fix(flow): rerender connectors on expand nodes#170
Open
nandanmen wants to merge 13 commits intocloudflare:mainfrom
Open
fix(flow): rerender connectors on expand nodes#170nandanmen wants to merge 13 commits intocloudflare:mainfrom
nandanmen wants to merge 13 commits intocloudflare:mainfrom
Conversation
- Upgrade vitest, @vitest/ui from ^3.2.4 to ^4.0.18 in pnpm catalog - Remove @vitest/browser (replaced by vitest/browser in v4) - Add @vitest/browser-playwright, vitest-browser-react, @vitejs/plugin-react - Add vitest.browser.config.ts with Playwright provider and Tailwind plugin - Add tests/setup-browser.css to load kumo styles in browser tests - Add test:browser script scoped to *.browser.test.tsx files
- Upgrade vitest, @vitest/ui from ^3.2.4 to ^4.0.18 in pnpm catalog - Remove @vitest/browser (replaced by vitest/browser in v4) - Add @vitest/browser-playwright, vitest-browser-react, @vitejs/plugin-react - Add vitest.browser.config.ts with Playwright provider and Tailwind plugin - Add tests/setup-browser.css to load kumo styles in browser tests - Add test:browser script scoped to *.browser.test.tsx files - Exclude *.browser.test.tsx from unit test project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a bug where connectors won't update when the size of a node changes (e.g. when we have an expandable component).
CleanShot.2026-03-03.at.10.38.07-converted.mp4
ResizeObservertoFlowNodeandFlowParallelNodeso connector paths update when a node's size changes without the Flow component itself re-rendering (e.g. an expandable render-prop child toggling its own state)useEffecttouseLayoutEffectto avoid a stale-paint frame between DOM resize and connector recomputationTest plan
New browser tests in
flow.browser.test.tsx:updates connectors when an expandable node changes sizedoes not render incoming connectors when there is no node before a parallel groupFlow.Parallelproduces no incoming connector paths to its branchesdoes not render outgoing connectors when there is no node after a parallel groupFlow.Parallelproduces no outgoing connector paths from its branches