Skip to content

Fix SideDrawer drag#1466

Merged
pablo-mayrgundter merged 3 commits intobldrs-ai:mainfrom
pablo-mayrgundter:fix-panel-drag
Dec 15, 2025
Merged

Fix SideDrawer drag#1466
pablo-mayrgundter merged 3 commits intobldrs-ai:mainfrom
pablo-mayrgundter:fix-panel-drag

Conversation

@pablo-mayrgundter
Copy link
Copy Markdown
Member

Using GPT5.2 for this issue:

Our UI can have 3 active "SideDrawer" panels at once:

1. Left drawer for Nav + Versions
2. Right drawer for Notes + Properties
3. Apps (to the right of Notes + Props)

I'm seeing a bug for the drag-to-resize on right SideDrawers, while drag-to-resize on left is working fine.

On right drawers, the drag changes the size of the panel, but also changes the width of the App's top appbar, pushing it off-screen to the right.  Similarly, left-drag on the right SideDrawer shrinks the background 3d canvas.

So something's wrong with the way the drag-to-resize is working but seeminly only on the right instances

Please review and fix, including unit and playwright tests

Fix

  • Stopped right-side SideDrawer from behaving like a growing flex item (it was effectively allowed to grow/shrink in the row layout), which is what caused resizing Notes/Props to push the Apps drawer/app header off-screen instead of shrinking the center pane.
  • Fixed the desktop RootLandscape row layout so the center pane is the thing that shrinks when drawers resize, and the overall row doesn’t overflow horizontally.
  • Fixed CadView’s viewer shrink calculation: it was reading sidebarWidth from the store (which doesn’t exist), so the viewer width style could become invalid. It now derives the sidebar width from rightDrawerWidth/appsDrawerWidth when Notes/Apps are visible.

Tests added/updated

  • Unit (Jest): added src/Containers/RootLandscape.test.jsx to assert the center pane is flex-shrinkable and the root layout hides overflow.
  • Playwright: extended src/Components/Apps/Apps.spec.ts with a regression test that opens Notes + Apps, drags the Notes resize handle, and asserts the Apps drawer stays within the viewport and its header remains visible.

Files changed

  • src/Components/SideDrawer/SideDrawer.jsx
  • src/Containers/RootLandscape.jsx
  • src/Containers/CadView.jsx
  • src/Containers/RootLandscape.test.jsx (new)
  • src/Components/Apps/Apps.spec.ts

…cape and SideDrawer components. Enhance Apps and Notes drawer visibility during resizing in Apps.spec.ts tests.
@pablo-mayrgundter pablo-mayrgundter self-assigned this Dec 15, 2025
@pablo-mayrgundter pablo-mayrgundter added the bug Something isn't working label Dec 15, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 15, 2025

Deploy Preview for bldrs-share-dev ready!

Name Link
🔨 Latest commit 84c305c
🔍 Latest deploy log https://app.netlify.com/projects/bldrs-share-dev/deploys/69408b6d6079f600080d56cd
😎 Deploy Preview https://deploy-preview-1466--bldrs-share-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 52 (🔴 down 1 from production)
Accessibility: 88 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@nickcastel50 nickcastel50 left a comment

Choose a reason for hiding this comment

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

LGTM

@pablo-mayrgundter pablo-mayrgundter merged commit ff92bf2 into bldrs-ai:main Dec 15, 2025
6 checks passed
@pablo-mayrgundter pablo-mayrgundter deleted the fix-panel-drag branch December 16, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants