Skip to content

IOS-6: enforce the nav chrome rule — server chip leading, account button trailing-last, mode control pinned #2421

Description

@jpapiez

Part of #2410 (epic: iOS navigation redesign — A′ · Two Hats, adaptive).
Wave 1. Blocked by #2412 (IOS-0). Edits AttentionView.swift alongside #2419 and InventoryView.swift alongside #2420 — coordinate landing order with those assignees.

Context — the chrome is inconsistent today

Screen Server switcher Evidence
Attention .topBarLeading AttentionView.swift:1107-1113
Farm .topBarTrailing PrinterListView.swift:68-69
Dashboard .topBarTrailing DashboardView.swift:74-75
Scan / Tasks / Inventory absent

Same control, three different answers, and missing entirely from half the roots. And there is no account button anywhere in the app today — it is net-new.

The rule (normative — this is what the UI test in #2425 will assert)

Why the account button may live in the nav bar when Attention may not

Recorded so the reasoning survives the next redesign: a nav bar belongs to the current screen. A destination placed there is either duplicated on every screen or vanishes when you leave — which is exactly the bug this epic is fixing. Account survives that test because it is low-frequency and terminal: you go there, you do one thing, you come back. That is the same slot iOS gives the profile on a tab root in App Store, Music, and Photos. Attention fails it on every count — high frequency, deep destination with its own feed/filters/detail stack, and a badge that would drop from a system-standard always-visible tab badge to a non-standard glyph badge. Attention stays in the tab bar. See #2410 non-goals.

Scope

  1. Consolidate the server switcher to .topBarLeading on every tab root, including the three that lack it.
  2. Add the account button — the first one in the app — at trailing-last on every tab root.
  3. Order all existing trailing screen actions to sit left of it.
  4. Ensure no pushed screen carries the switcher, the account button, or the mode control.

The account area is the new home for Settings, Notifications, Manage Servers (re-homed by #2419) and the Offline Queue (re-homed by #2420). This issue owns the button and the container; those issues own moving their content into it.

ServerSwitcherMenu already supports a style: parameter (ServerSwitcherMenu(style: .toolbar)) and ServerSwitcherViewModel.isVisible already suppresses it for single-server installs — reuse both rather than adding a new visibility rule.

Acceptance criteria

Files to touch

  • mobile/PrintFarmer/Views/Attention/AttentionView.swift
  • mobile/PrintFarmer/Views/Printers/PrinterListView.swift
  • mobile/PrintFarmer/Views/Filament/InventoryView.swift
  • mobile/PrintFarmer/Views/Shifts/ShiftTasksView.swift
  • mobile/PrintFarmer/Views/Dashboard/DashboardView.swift
  • mobile/PrintFarmer/Views/Components/ServerSwitcherMenu.swift
  • New account-area view + a shared root-toolbar modifier

Do not

  • Move Attention to the nav bar.
  • Give any screen two scan affordances.
  • Add the mode control to a pushed screen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions