Conversation
|
@hugs7 is attempting to deploy a commit to the Brian Vaughn's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @bvaughn , could you kindly have a look at my PR? |
| const allPreviousCollapsed = | ||
| isLastPanel && | ||
| nextSize < prevSize && | ||
| (isFirstPanel || |
There was a problem hiding this comment.
I also noticed this assertion error can happen when collapsing the one and only panel in a group, since the delta value otherwise goes to 100 causing it to index at -1 here at adjustLayoutByDelta on line 142
There was a problem hiding this comment.
I've addressed this in this PR via the following logic: If there's only one panel in the group, we can still collapse it but leave it's flex-grow value at 100%
|
I appreciate this contribution! Thanks!
Just wanted to let you know that I am moving Apartments today and tomorrow
so it will likely be a bit before I can review these changes. I’ll try to
get to them as soon as I can, though.
…On Mon, Apr 6, 2026 at 10:12 AM Hugo Burton ***@***.***> wrote:
*hugs7* left a comment (bvaughn/react-resizable-panels#703)
<#703 (comment)>
Unit tests
image.png (view on web)
<https://github.com/user-attachments/assets/fed94ac8-c211-4e1b-92cf-af2100d0313b>
—
Reply to this email directly, view it on GitHub
<#703 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAHHHPRHYF6S6YRZCPBJSD4UO3ODAVCNFSM6AAAAACXOE2CC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOJSG4YDGNRQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
No rush. Please take your time to review |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Have not reviewed the code yet. TBH I'm still probably too exhausted to do this, BUT– I would like to see at least two new unit tests to be included w/ this sort of PR (for the edge cases you mention) If you're willing to add them, I'd appreciate it! |

When collapsing the a panel within a group where all other (previous) panels are already collapsed, there's currently a bug where the delta calculation cascades to cause the first panel to expand. This is undesired since the first panel should remain collapsed given we are not touching it.
This fix handles the edge case by computing the remaining space percentage for the last panel to take up, thus leaving previous panels undisturbed.
By "previous" panels here I mean panels above (vertical mode) or to the left (horizontal) mode.