Skip to content

Conversation

@Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Nov 13, 2025

Purpose

Fix a bug where the left panel unexpectedly expanded or shrank when the window was resized. The expected behavior is that the left panel width should remain constant unless manually adjusted by the user.

issue 1573

rezisable.mp4

Proposal

  • Remove global recalculation of min/max panel size on window resize
  • Track panel width in pixels (savedWidthPxRef) and convert it to % only when needed
  • Force the panel to maintain its width percentage equivalent after resize

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

Size Change: -58 B (0%)

Total Size: 4.07 MB

Filename Size Change
apps/impress/out/_next/static/167ffffc/_buildManifest.js 0 B -883 B (removed) 🏆
apps/impress/out/_next/static/a6f488b0/_buildManifest.js 882 B +882 B (new file) 🆕

compressed-size-action

@Ovgodd Ovgodd self-assigned this Nov 13, 2025
@Ovgodd Ovgodd requested a review from AntoLC November 13, 2025 09:25
@Ovgodd Ovgodd added bug Something isn't working triage labels Nov 13, 2025
@Ovgodd Ovgodd marked this pull request as ready for review November 13, 2025 09:26
@Ovgodd Ovgodd changed the title ✨(frontend) preserve left panel width on window resize 🐛(frontend) preserve left panel width on window resize Nov 13, 2025
@Ovgodd Ovgodd force-pushed the fix/1573-left-panel-expands branch from cb7798c to a2f14e4 Compare November 13, 2025 09:27
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see some flickering:

20251114-1202-18.9597817.mp4

It is because react-resizable-panels is percent based I think, so we have to compute the size every time to keep it fixed.

Could you give a try to this lib instead ?
https://github.com/johnwalley/allotment

@Ovgodd Ovgodd force-pushed the fix/1573-left-panel-expands branch 5 times, most recently from 462f2e4 to 4596bd6 Compare November 18, 2025 08:39
@Ovgodd Ovgodd requested a review from AntoLC November 18, 2025 08:51
@Ovgodd Ovgodd force-pushed the fix/1573-left-panel-expands branch from 4596bd6 to d6611d0 Compare November 19, 2025 10:10
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it.

prevents automatic resizing to keep user-defined width stable

Signed-off-by: Cyril <c.gromoff@gmail.com>
@Ovgodd Ovgodd force-pushed the fix/1573-left-panel-expands branch from d6611d0 to 10a3198 Compare November 20, 2025 09:07
@Ovgodd Ovgodd merged commit 10a3198 into main Nov 20, 2025
22 of 23 checks passed
@Ovgodd Ovgodd deleted the fix/1573-left-panel-expands branch November 20, 2025 09:54
@AntoLC AntoLC linked an issue Nov 26, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Left panel expands when page resized

3 participants