Skip to content

[FEATURE] Relocate Layout Lock Button so it's not consuming vertical screen space #687

Merged
accius merged 4 commits intoaccius:Stagingfrom
denete:feature-662
Mar 9, 2026
Merged

[FEATURE] Relocate Layout Lock Button so it's not consuming vertical screen space #687
accius merged 4 commits intoaccius:Stagingfrom
denete:feature-662

Conversation

@denete
Copy link
Copy Markdown
Contributor

@denete denete commented Mar 7, 2026

What does this PR do?

Moved lock button to render in a new left border tabset using FlexLayout. This panel can collapse. The lock layout control can not be deleted from the border space as we don't want the user to get "stuck" without being able to unlock it.

This addresses #662.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

  1. Select the dockable layout
  2. Click the "Lock Layout" in the left border and then the "Lock Layout" button
  3. Confirm that the button can lock and unlock the dockable layout

Checklist

  • [✔] App loads without console errors
  • [✔] Tested in Dark, Light, and Retro themes
  • [✔] Responsive at different screen sizes (desktop + mobile)
  • If touching server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)
  • If adding an API route: includes caching and error handling
  • [~] If adding a panel: wired into Modern, Classic, and Dockable layouts
  • [✔] No hardcoded colors — uses CSS variables (var(--accent-cyan), etc.)
  • [✔] No .bak, .old, console.log debug lines, or test scripts included

Screenshots (if visual change)

Screenshot 2026-03-07 013154 Screenshot 2026-03-07 013208

@accius
Copy link
Copy Markdown
Owner

accius commented Mar 9, 2026

Nice idea moving the lock toggle into a border tab instead of eating header space. The FlexLayout border styling and CSS additions are clean.
A few things to sort out before merge:
Existing users won't see it. The border tab only exists in DEFAULT_LAYOUT. Anyone with a saved layout in localStorage gets their saved layout from loadLayout(), not the default. Since the header button was also removed, those users have no lock toggle at all. Either inject the border tab into saved layouts during load (check if the lock-layout-tab id is missing and add it), or keep it in the "Add Panel" registry so users can restore it themselves.
Empty header div left behind. The button was removed but the parent div with its padding and flex styling is still rendered as an empty element. Should be removed entirely now that there's nothing in it.
Button doesn't visually change on lock state. The old button swapped to an amber background and border when locked. The new .panel-layout-lock-button class is static regardless of layoutLocked. Either add a conditional class (.panel-layout-lock-button--locked) or inline the amber highlight like the old version did.
No way to recover if closed. If a user closes the border tab, it's gone from their saved layout with no way to get it back without a full layout reset. Worth either preventing close on this specific tab or making sure it's available through the Add Panel menu as a fallback.

denete added 2 commits March 9, 2026 12:03
a new left border tabset using FlexLayout. This panel can collapse.
The lock layout control can not be deleted from the border space.
removed styling from JSX, added selectors for border overrides in CSS
denete added 2 commits March 9, 2026 13:44
added update for stored layout data to add border container,
set the lock layout to not be removable, removed empty div
class to the lock button, added locked state styling to the button
@denete
Copy link
Copy Markdown
Contributor Author

denete commented Mar 9, 2026

All comments addressed.

  • Added check for border containers in saved dockable layout and add the default if missing.
  • Lock Layout is in the panel registry and can be added as desired.
  • "Locked" the border panel so that the default lock layout can not be deleted.
  • Removed empty header div.
  • Restored styling to "locked" state of button.
Screenshot 2026-03-09 141137

@accius accius merged commit 4497f4c into accius:Staging Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants