Skip to content

Status screen layout for iPhone Duo's inner display - #2606

Merged
ps2 merged 1 commit into
next-devfrom
feature/iphone-duo-layout
Oct 24, 2026
Merged

ps2 merged 1 commit into
next-devfrom
feature/iphone-duo-layout

Conversation

@ps2

@ps2 ps2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the status screen on iPhone Duo's unfolded inner display (951×669 pt in landscape, regular size classes, vertical status bar on the trailing edge).

Before and after on the unfolded Duo

What was wrong

  • Summary bar and status row disappeared after folding and unfolding. Landscape mode (charts only) was chosen when the screen was wider than tall. The inner display is wider than tall but full height, so a fold/unfold switched it into the phone-landscape layout. At launch it happened not to trigger, because the initial estimate read UIScreen.main.bounds.
  • Action bar never shown. ActionTabView hid the bar whenever the interface orientation wasn't portrait.
  • Charts ran off the screen. Chart rows were sized from the longer screen dimension (951 pt) on a 669 pt display.
  • First row clipped by the display corner. With the status bar vertical there is no top safe area, and the corners are about 57 pt.

Changes

  • Landscape mode and the action bar now key off compact vertical size class (an iPhone in landscape) instead of aspect ratio or orientation.
  • Chart heights use the table height, except in phone landscape, where they keep using the longer dimension.
  • When there is no top status bar, the warning banner runs to the top edge, so the display corners round it, with its content inset by the corner-adapted safe area (edgeInsets(for: .safeArea(cornerAdaptation: .vertical)), iOS 26). Without a banner, the table gets that inset instead (16 pt on the Duo, 0 on other iPhones).
  • The status bar background view resizes with the table. It was sized once to the launch width, so after unfolding it stopped part way across.

Testing

Built with Xcode 27.1 and run in the simulator:

  • iPhone Duo (iOS 27.1), unfolded landscape: at launch and after fold/unfold, with and without the warning banner (screenshots above, masked with the Duo's display shape).
  • iPhone 17 (iOS 27.0): portrait unchanged; landscape still shows charts only; rotating back restores the summary bar and action bar.

Not tested: the folded cover display.

Not in this PR

Apple's guidance for the Duo puts bar items in the vertical bar on the trailing edge, but only system bar items move there automatically. The action bar is a custom view, so it stays at the bottom, and it still hides on the cover display in landscape, as on any iPhone. Moving it to system toolbar items is a separate change.

Landscape mode (charts only, no HUD, status row or action bar) was keyed
to the screen being wider than tall. The unfolded inner display is wider
than tall but has regular height, so after a fold/unfold the HUD and
status row disappeared and the action bar was always hidden. Key it to
compact vertical size class instead, in both the table view controller
and ActionTabView.

Chart row heights were sized from the longer screen dimension, which only
makes sense in phone landscape; elsewhere use the table height so the
charts fit the inner display.

In inner landscape the status bar is vertical, so there is no top safe
area and the first row met the display corners. The warning banner now
runs to the top edge (the display corners round it) with its content
inset by the corner-adapted safe area; without a banner, the table is
inset by that amount. The status bar background view now tracks the
table width, so it no longer stops at the launch width after unfolding.
@ps2
ps2 merged commit 244359f into next-dev Oct 24, 2026
JoelonGit pushed a commit to JoelonGit/LoopWorkspace that referenced this pull request Oct 24, 2026
Points LoopKit, G7SensorKit and Loop at their next-dev merges of
LoopKit/LoopKit#626, LoopKit/G7SensorKit#80 and LoopKit/Loop#2605.
Loop also picks up LoopKit/Loop#2606.
ps2 added a commit that referenced this pull request Oct 29, 2026
…2628)

The next-dev counterpart of the fixes in #2627 that #2606 didn't have.

- The status table now extends under the leading and trailing safe areas, as it did before it was hosted in SwiftUI, so the HUD row's grey fills the vertical status bar column beside the time instead of leaving a white box. Cell content still stays within the safe area.
- The HUD cell's background matches the HUD view, so the cell is grey where it extends past the HUD.
- The HUD row is capped at 500 pt and centered, so on the unfolded Duo it no longer stretches across the display with the CGM pill against the display corner. Every iPhone in portrait is narrower, so phones are unchanged.
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.

1 participant