Skip to content

[enhancement-703] rebranded the lock layout panel to just layout,#704

Open
denete wants to merge 2 commits intoaccius:Stagingfrom
denete:enhancement-703
Open

[enhancement-703] rebranded the lock layout panel to just layout,#704
denete wants to merge 2 commits intoaccius:Stagingfrom
denete:enhancement-703

Conversation

@denete
Copy link
Contributor

@denete denete commented Mar 9, 2026

What does this PR do?

  • Change the "lock layout" panel to be just "layout".
  • Add a "reset panel layout" button to that panel.
  • Utilize a disabled state when the layout is locked.

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 "Layout" in the left border and then the "Lock Layout" button
  3. Confirm that the button disables and enables the reset layout button
  4. Confirm that the reset layout button resets 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-09 181918 Screenshot 2026-03-09 182002

@accius
Copy link
Owner

accius commented Mar 10, 2026

Good progress from the previous round. resetLayout is implemented and exported, i18n keys are in all 14 languages, enableClose: false prevents tab loss, and the reset button properly disables when locked.

One remaining issue: the component rename from lock-layout to layout will break existing saved layouts. Users who already have the border tab in localStorage still have component: 'lock-layout' in their saved JSON. The migration in loadLayout only checks parsed.borders.length === 0, which won't trigger for them since they already have borders. They'll see "Unknown panel" in the border tab until they manually reset.

Add a rename migration in loadLayout after the empty borders check:

} else {
  // Migrate lock-layout → layout rename
  let migrated = false;
  for (const border of parsed.borders) {
    for (const child of border.children || []) {
      if (child.component === 'lock-layout') {
        child.component = 'layout';
        child.id = 'layout-tab';
        child.name = 'Layout';
        migrated = true;
      }
    }
  }
  if (migrated) saveLayout(parsed);
}

Also the DEFAULT_LAYOUT in staging still has the old names (component: 'lock-layout', id: 'lock-layout-tab', name: 'Lock Layout') — the diff renames them but it looks like the staging code hasn't been updated yet. Make sure both the default and the migration use the new layout naming consistently.

denete added 2 commits March 10, 2026 11:36
added a layout reset button to the layout panel
new panel name for saved dockable layouts, added panel background and
updated style
@denete
Copy link
Contributor Author

denete commented Mar 10, 2026

@accius This has been updated with your fix for the saved layout migration to the new tab and panel name. Also fixed a styling issue.

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