fix(apollo-wind): upgrade react-resizable-panels to v4 and optimize form render performance#174
fix(apollo-wind): upgrade react-resizable-panels to v4 and optimize form render performance#174
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request upgrades the react-resizable-panels dependency from v3.0.6 to v4.6.0, which introduces several breaking API changes. The upgrade affects the resizable panel components used throughout the Apollo Wind design system.
Changes:
- Upgraded react-resizable-panels to v4.6.0 and migrated all API usages (direction → orientation, numeric sizes → percentage strings, ref → panelRef, data attributes changes)
- Updated the resizable component wrapper to use v4 imports (Group, Panel, Separator) and re-export PanelImperativeHandle type
- Updated all tests, stories, and example files to use the new v4 API
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updated dependency resolution for react-resizable-panels v4.6.0 and related transitive dependencies |
| packages/apollo-wind/package.json | Updated react-resizable-panels dependency version from ^3.0.6 to ^4.6.0 |
| packages/apollo-wind/src/components/ui/resizable.tsx | Migrated to v4 API: imported Group/Panel/Separator, updated data attributes in styles, re-exported PanelImperativeHandle type |
| packages/apollo-wind/src/components/ui/resizable.test.tsx | Updated all tests to use v4 API (orientation prop, percentage strings, data-separator attribute) and removed accessibility test workaround |
| packages/apollo-wind/src/components/ui/resizable.stories.tsx | Updated all stories to use orientation prop and percentage string sizes |
| packages/apollo-wind/src/examples/form-builder-example.tsx | Updated to use orientation="horizontal" and percentage string sizes |
| packages/apollo-wind/src/examples/flow-editor-layout-example.tsx | Updated to use v4 API including orientation prop, panelRef, and getSize().asPercentage |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| {...props} | ||
| /> | ||
| const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof Group>) => ( | ||
| <Group className={cn('flex h-full w-full', className)} {...props} /> |
There was a problem hiding this comment.
The ResizablePanelGroup wrapper removed the flex-direction styling that was present in v3 (data-[panel-group-direction=vertical]:flex-col). In v4, the Group component may not automatically apply flex-col for vertical orientation. This should be replaced with aria-[orientation=vertical]:flex-col to ensure vertical panel groups render correctly with a column layout instead of defaulting to row layout.
| <Group className={cn('flex h-full w-full', className)} {...props} /> | |
| <Group className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)} {...props} /> |
CalinaCristian
left a comment
There was a problem hiding this comment.
we can mark the commit with ! and semantic release should do a major bump, if it's breaking
Current Stack
Managed with stacked-prs |
5588fe5 to
8b36b06
Compare
Dependency ReviewThe following issues were found:
License Issuesapps/apollo-vertex/package.json
packages/apollo-wind/package.json
OpenSSF Scorecard
Scanned Files
|
8b36b06 to
3f199c3
Compare
3f199c3 to
b3b6dab
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/apollo-vertex/registry.json:801
registry/resizable/resizable.tsxin apollo-vertex still uses the v3 API (ResizablePrimitive.PanelGroup/PanelResizeHandleanddirection), but this entry bumps the registry dependency toreact-resizable-panels@^4.7.3where the API/props changed. This will break the registry component at build/runtime; please migrateapps/apollo-vertex/registry/resizable/resizable.tsxto the v4 API (e.g. Group/Separator +orientation, and update numeric sizes to percentage strings where applicable) or keep the dependency pinned to v3 for this registry item.
"name": "resizable",
"type": "registry:ui",
"title": "Resizable",
"description": "Accessible resizable panel groups and layouts.",
"dependencies": ["react-resizable-panels@^4.7.3"],
"files": [
{
"path": "registry/resizable/resizable.tsx",
"type": "registry:ui"
You can also share your feedback on Copilot code review. Take the survey.
b3b6dab to
8915fa2
Compare
8915fa2 to
c34fb00
Compare
Migrate resizable component wrapper and all usages to v4 API: - PanelGroup → Group, PanelResizeHandle → Separator, direction → orientation - Size props from numbers to percentage strings (v4 treats numbers as pixels) - Update data attributes for hover/active/vertical styling - Re-export PanelImperativeHandle type BREAKING CHANGE: consumers must update direction→orientation, numeric sizes→string percentages
Migrate registry resizable component and docs page to v4 API: - PanelGroup → Group, PanelResizeHandle → Separator, direction → orientation - Size props from numbers to percentage strings - Update data attributes for vertical styling - Bump dependency in package.json and registry.json
c34fb00 to
5424652
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
Summary
treats numbers as pixels)
react-resizable-panels directly
aria-[orientation=horizontal])
Breaking changes
This is a breaking change for consumers of ResizablePanelGroup, ResizablePanel, and ResizableHandle:
Test plan