Sidebar resize react panels#1870
Conversation
- Convert AppLayout from class to functional component - Add outer resize handle between sidebar and map (drag to resize) - Add inner resize handle between layer list and properties drawer - Use CSS custom properties for dynamic sidebar/panel widths - Persist both sidebar width and list/drawer ratio to localStorage - Fix layer click selection: clicking layer name text now opens properties - Extract sidebar helpers to src/libs/sidebar.ts - Add unit tests for sidebar helpers - Add Cypress e2e test for resize handles
…e, required onSelect
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #1870 +/- ##
===========================================
- Coverage 71.57% 46.45% -25.13%
===========================================
Files 102 3 -99
Lines 7037 127 -6910
Branches 2123 35 -2088
===========================================
- Hits 5037 59 -4978
+ Misses 1998 55 -1943
- Partials 2 13 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This looks good overall, Besides the translation I think this can be merged. |
|
So do I need to make any changes here? |
|
Yes, Fix the translation files. |
|
Yeahh made those translations |
|
Please fill the others as well. |
Sorry didn't notice |
|
Are you sure the e2e tests are passing? |
|
Yeah it passes |
|
Looks like the tests you added are failing in the CI: So you'll need to investigate as to why. |
|
@HarelM can you review this |
|
I keep repeating the same code review comments, this is frustrating. If this is generated by AI please make sure to review this before you ask me to review it. |
|
Apologies for the frustration. I reviewed this carefully — moved all cy.document().trigger calls into the pointerDrag helper. Tested the sidebar resize on the frontend and everything works smoothly, so I committed the changes. |
|
CI is failing, I think some of the buttons and maybe the map is covered by the panel after the tests. |
Head branch was pushed to by a user without write access
| - Fixed headers in left panes (Layers list and Layer editor) to remain visible when scrolling | ||
| - Fix error when using a source from localhost | ||
| - Fix an issue with scrolling when using the code editor | ||
| - Fix Cypress E2E test failures caused by resizable panel sizes persisting in localStorage. |
There was a problem hiding this comment.
No need to add this, this is part of the feature...
Implements adjustable sidebar resizing using
react-resizable-panelsas a cleaner alternative to the custom implementation proposed in #1682.This implementation:
The original PR #1682 was mainly used as UX/reference inspiration, but this implementation is rebuilt around
react-resizable-panelsfor maintainability.