Update dependency react-resizable-panels to v4 - #361
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dab87c6 to
8853c33
Compare
8853c33 to
46819eb
Compare
46819eb to
db303b2
Compare
db303b2 to
71a71c5
Compare
71a71c5 to
c24dfa6
Compare
c24dfa6 to
3af26bc
Compare
3af26bc to
acafebb
Compare
acafebb to
1d3f454
Compare
1d3f454 to
e9bdf2a
Compare
e9bdf2a to
47db851
Compare
47db851 to
c0fd68f
Compare
c0fd68f to
79e8e9d
Compare
79e8e9d to
f296659
Compare
f296659 to
a3c1536
Compare
3ed4237 to
cc9843f
Compare
cc9843f to
196544a
Compare
196544a to
95b7958
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #361 +/- ##
=======================================
Coverage 36.32% 36.32%
=======================================
Files 25 25
Lines 647 647
=======================================
Hits 235 235
Misses 370 370
Partials 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
95b7958 to
e71aa37
Compare
e71aa37 to
29178ae
Compare
29178ae to
b12a3c6
Compare
b12a3c6 to
af5dd31
Compare
af5dd31 to
7f46526
Compare
7f46526 to
cc99dae
Compare
cc99dae to
7d16f5a
Compare
7d16f5a to
630a540
Compare
630a540 to
74ae0e1
Compare
74ae0e1 to
2350a99
Compare
2350a99 to
f90b1f4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 09022ce. Configure here.
| "next-themes": "^0.2.1", | ||
| "react": "^18", | ||
| "react-resizable-panels": "^3.0.0", | ||
| "react-resizable-panels": "^4.0.0", |
There was a problem hiding this comment.
Major version bump without migrating breaking API changes
High Severity
Bumping react-resizable-panels from v3 to v4 without updating consuming code will break the app. In v4, PanelGroup was renamed to Group and PanelResizeHandle to Separator, so resizable.tsx references non-existent exports. Additionally, sidebar.tsx uses removed/renamed props: direction (now orientation), onLayout (now onLayoutChange), onCollapse/onExpand (removed), and numeric size values (now require strings like "30%"). CSS selectors using data-[panel-group-direction=...] also changed to aria-[orientation=...].
Reviewed by Cursor Bugbot for commit 09022ce. Configure here.


This PR contains the following updates:
^3.0.0→^4.0.0Release Notes
bvaughn/react-resizable-panels (react-resizable-panels)
v4.12.3Compare Source
CSSStyleSheetconstruction to avoid throwing in unsupported environments (@leo-yang-qiong)v4.12.2Compare Source
v4.12.1Compare Source
v4.12.0Compare Source
onLayoutChangedcallback signalling whether resize event was triggered by direct user input (keyboard or mouse)useDefaultLayouthook supportsonlySaveAfterUserInteractionsoption to only save layouts when directly triggered by user interactions.v4.11.2Compare Source
v4.11.1Compare Source
defaultSize={0}v4.11.0Compare Source
Separatorsupports:focus-visiblepseudo-classv4.10.0Compare Source
data-separator="focus"state forSeparatorelements for more consistent custom CSS styles.v4.9.0Compare Source
disableDoubleClickprop toSeparatorto enable turning off the double-click size reset behavior.v4.8.0Compare Source
useDefaultLayouthook automatically migrates legacy layouts to version 4 format; see issue 605 for details on how this works.v4.7.6Compare Source
Panelaria-disabledattribute withdata-disabledv4.7.5Compare Source
defaultSizepropv4.7.4Compare Source
v4.7.3Compare Source
v4.7.2Compare Source
v4.7.1Compare Source
v4.7.0Compare Source
groupResizeBehaviorprop toPanel, enabling panels to retain their current size (pixels) size when the parentGroupis resized.v4.6.5Compare Source
adoptedStyleSheets(to better support environments like jsdom)v4.6.4Compare Source
v4.6.3Compare Source
v4.6.2Compare Source
Groupguards against layouts with mis-orderedPanelid keysv4.6.1Compare Source
PanelandGroupAPIs ignoreddisabledstatus when resizing panels; this is an explicit override of the disabled state and is required to support conditionally disabled groups.Separatorcomponent does not set acursor: not-allowedstyle if the parentGrouphas cursors disabled.v4.6.0Compare Source
PanelandSeparatorcomponents to be disabledv4.5.9Compare Source
useForceUpdatewithuseSyncExternalStoreto avoid side effect of swallowing "click" events in certain casesGroupmethodsetLayoutpersists layout to in-memory cachev4.5.8Compare Source
v4.5.7Compare Source
Panelfrom 4.5.3 that was disabled in 4.5.6Separatorhover-state onDocument"pointerout"v4.5.6Compare Source
v4.5.5Compare Source
aria-orientationrole from rootGroupelement as this was invalid according to the ARIA spec; (for more information see the discussion on issue #640)Panelregression introduced in 4.5.3v4.5.4Compare Source
Panelavoids unnecessary re-renders in response to mouse-hover state.v4.5.3Compare Source
max-widthandmax-heightto 100% to fix potential CSS overflow bug.v4.5.2Compare Source
SeparatorandPaneledges; make configurable via a newGroupprop.v4.5.1Compare Source
grabmovecol-resizeew-resizerow-resizens-resizev4.5.0Compare Source
SeparatorandPaneledge hit-area padding with a minimum size threshold based on Apple's user interface guidelines. Separators that are large enough will no longer be padded; separators that are too small (or panels without separators) will more or less function like before. This should not have much of a user-facing impact other than an increase in the click target area. (Previously I was not padding enough, as per Apple's guidelines.)Separatorresets its associatedPanelto its default-size (see video below); double-click will have no impact on panels without default sizesadoptedStyleSheetsDemo of double-clicking on a separator:
dbl-click.mov
v4.4.2Compare Source
"pointermove"event is has low-precision/roundedclientXandclientYvaluesv4.4.1Compare Source
Panelshould treatdefaultSize={0}as collapsed on mountv4.4.0Compare Source
onLayoutChangedprop toGroup.For layout changes caused by pointer events, this method is not called until the pointer has been released. This callback should be used if you're doing something like saving a layout as it is called less frequently than the previous approach.
The
useDefaultLayouthook has also been updated to use this callback (though it will continue to support the old callback as well, with a@deprecationtag).v4.3.3Compare Source
event.preventDefault()on "pointerup" unless a handle was actively draggedv4.3.2Compare Source
flex-growPanelstyle to an inline value instead of a CSS variable defined on the parentGroupto improve rendering performance. (This significantly reduces the negative impact from forced-reflow)v4.3.1Compare Source
"unset"styles with safer override values"pointerdown"and"pointerup"events; this is necessary for compatibility with certain UI libraries like Blueprint JSPanelpixel size usingoffsetWidth/offsetHeightrather thaninlineSizeto avoid an edgecase bug withResizeObserverv4.3.0Compare Source
Groupcomponent now sets defaultwidth,height, andoverflowstyles; (both can be overridden using thestyleproperty)event.preventDefaultfor the primary buttonuseGroupRefandusePanelRefto include| nullto increase compatibility with older React versionsPanelandSeparatorcomponentsv4.2.2Compare Source
useDefaultLayouthook initializesstorageparam tolocalStorageif undefined.PanelproponResizethat impacted certain TypeScript versions.v4.2.1Compare Source
displayNameproperty toGroup,Panel, andSeparatorcomponents for better debugging experience.Grouphandles newly registeredPanels+Separatorsduring mount so that user code can safely call imperative APIs earlierv4.2.0Compare Source
prevPanelSizeparam toonResizecallback to help simplify collapse/expand detection.v4.1.1Compare Source
SeparatorattributesroleandtabIndexcannot be overridden using props.v4.1.0Compare Source
useDefaultLayouthook supports saving and restoring multiple Panel layoutsuseGroupRefandusePanelRefhooksv4.0.16Compare Source
expand()API should restore pre-collapse sizedefaultViewvalue seemingly returned by some dev environmentsv4.0.15Compare Source
defaultLayoutwhen keys don't match Panel idsv4.0.14Compare Source
element.ownerDocument.defaultViewv4.0.13Compare Source
useDefaultLayout: DeprecatedgroupIdparam in favor ofidto avoid confusion; (there is no actual requirement for the Group to have a matching id)v4.0.12Compare Source
useDefaultLayoutnow debounces calls tostorage.setItemby 150msv4.0.11Compare Source
v4.0.10Compare Source
v4.0.9Compare Source
z-indexelements (e.g. modals) should not trigger separators behind themdefaultLayoutordisableCursorprops changePanelid changesv4.0.8Compare Source
defaultLayoutvaluev4.0.7Compare Source
pointer-eventstyles after "pointerup" eventv4.0.6Compare Source
v4.0.5Compare Source
v4.0.4Compare Source
Separatoron "pointerdown"v4.0.3Compare Source
defaultLayoutvalue returned fromuseDefaultLayoutv4.0.2Compare Source
GroupImperativeHandleandPanelImperativeHandletypes.v4.0.1Compare Source
expand()API should restore pre-collapse sizedefaultViewvalue seemingly returned by some dev environmentsv4.0.0Compare Source
Version 4 of react-resizable-panels offers more flexible size constraints– supporting units as pixels, percentages, REMs/EMs, and more. Support for server-rendering (including Server Components) has also been expanded.
Migrating from version 3 to 4
Refer to the docs for a complete list of props and API methods. Below are some examples of migrating from version 3 to 4, but first a couple of potential questions:
PanelResizeHandlecomponent was renamed toSeparatorto better align with the ARIA "separator" role and thedirectionprop was renamed toorientationto better align with the ARIAorientationattribute .onCollapseandonExpandevent handlers removed?onResizeevent handler instead:Basic usage example
Persistent layouts using localStorage
Conditional panels
Imperative APIs
Disabling custom cursors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.