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
…orm render performance
|
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 |
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