Skip to content

Rethink the nav for device page + small ui improvements#376

Merged
stvncode merged 2 commits into
mainfrom
new-design
May 21, 2026
Merged

Rethink the nav for device page + small ui improvements#376
stvncode merged 2 commits into
mainfrom
new-design

Conversation

@stvncode
Copy link
Copy Markdown
Collaborator

What does this implement/fix?

Related issue or feature (if applicable):

  • fixes

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — docs
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • npm run lint passes.
  • npm run test passes.
  • Tests have been added to verify that the new code works (where applicable).

@stvncode stvncode self-assigned this May 21, 2026
Copilot AI review requested due to automatic review settings May 21, 2026 21:41
@stvncode stvncode added the enhancement Improvement to an existing feature label May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the device page navigation UX by adding an in-page “back” affordance and explicit navigator collapse/expand controls, while removing the editor fullscreen toggle and applying a few layout/spacing improvements.

Changes:

  • Add a per-page section back-stack and a header back button for navigating within the device editor.
  • Add navigator collapse (in navigator header) + expand (edge “tab”) controls, with preference persistence on desktop.
  • Update device page/editor/navigator styling and adjust translations to match the new UI copy.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pages/device.ts Implements section back-stack, mobile/desktop navigator collapse/expand behavior, and hooks new events.
src/components/device/device-navigator.ts Adds a collapse button that emits a nav-collapse event to the page.
src/pages/device-styles.ts Updates device page layout sizing and adds styles for the new back button + navigator edge tab.
src/components/device/device-editor.ts Removes fullscreen editor toggle and renames the header slot to support the new back button.
src/components/device/device-editor.styles.ts Removes fullscreen-related styles and adds slotted header-start spacing.
src/components/device/device-section-config.styles.ts Cleans up table block comment and adjusts spacing for manage-list sections.
src/translations/en.json Replaces old editor expand/collapse copy with new back/navigator strings.
src/translations/fr.json Same translation updates for French.
src/translations/nl.json Same translation updates for Dutch.

Comment thread src/translations/en.json
Comment on lines 753 to +758
"add_automation_error": "Failed to add automation",
"add_config_error": "Failed to add config section",
"editor_layout_label": "Editor layout",
"editor_expand": "Expand editor",
"editor_collapse": "Collapse editor",
"back": "Back",
"hide_navigator": "Hide navigator",
"show_navigator": "Show navigator",
padding: var(--wa-space-l);
min-height: calc(100vh - var(--esphome-header-height) - var(--esphome-footer-height));
padding: var(--wa-space-l) var(--wa-space-l) 0;
min-height: calc(100vh - var(--esphome-header-height));
Comment on lines +103 to +105
/* Mobile page has no padding so the calc width collapses to a
negative value — fall back to a fixed width that sticks the
tab off the viewport's left edge over the editor. */
Comment thread src/pages/device.ts
Comment on lines +130 to +134
@state()
private _isMobile = window.matchMedia("(max-width: 900px)").matches;

private _mql = window.matchMedia("(max-width: 900px)");

@stvncode stvncode merged commit 485934f into main May 21, 2026
7 checks passed
@stvncode stvncode deleted the new-design branch May 21, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants