Skip to content

Put the document tool bar back under the status bar - #155

Merged
andiwand merged 2 commits into
mainfrom
fix-document-toolbar-safe-area
Aug 15, 2026
Merged

Put the document tool bar back under the status bar#155
andiwand merged 2 commits into
mainfrom
fix-document-toolbar-safe-area

Conversation

@andiwand

@andiwand andiwand commented Aug 15, 2026

Copy link
Copy Markdown
Member

A user reported that the buttons above an open document overlap the system bar, and that there is a gap between them and the ad below.

Both come from one constraint. The tool bar was sized to safe area top + 44 and pinned to the top of the view — a 2019 trick for reaching under the notch, which held as long as UIToolbar laid its items out along the bottom of an over-tall frame. iOS 26 lays them out along the top instead, so:

  • the buttons landed on the status bar, clipped by the top of the screen;
  • the rest of the bar — over 50 points on a notched phone — was an empty band between the buttons and whatever came next: the banner in the free edition, the document itself in the paid one.

The bar is now its own height, pinned to the safe area, which is where every version of iOS puts a bar's content anyway. The hidden measuring-stick view the trick needed goes with it, and the root view takes systemBackground instead of hardcoded white, since the strip behind the status bar is now its background rather than the bar's.

One thing does not follow from that. From iOS 26 the buttons are glass capsules that fill the bar's whole height, so anything pinned to its bottom edge meets them with nothing in between and cuts them off. They get 8 points of room there, and nothing before iOS 26, where the bar has a background of its own and the same margin only shows as a band of nothing.

Checked in the simulator

Both editions, on both sides of the change in bar layout — iPhone 17 Pro on iOS 26.0 and iPhone 16 Pro on iOS 18.4, opening test.odt:

iOS 26 iOS 18.4
paid buttons clear of the status bar, document straight below the bar unchanged from before: bar under the status bar, document straight below
free buttons clear, 8pt, then the banner (live test ad) banner flush under the bar, no stray band

Geometry was measured directly off the view as well, at a 59pt safe area inset: the bar ran 0 … 157 before and runs 59 … 107 after, with the banner slot following it immediately. On iOS 17.5 and 18.4 the bar comes out 44 points tall and on iOS 26 48, in both cases starting at the safe area top.

The unit tests pass on iOS 18.4, and scripts/format.sh --check is clean.

Screenshots of all four combinations are in the working tree but deliberately not committed.

🤖 Generated with Claude Code

The bar was sized to safe area top + 44 and pinned to the top of the
view, a 2019 trick for reaching under the notch: it worked as long as
UIToolbar laid its items out along the bottom of an over-tall frame.
iOS 26 puts them along the top instead, so the buttons landed on the
status bar - clipped by the top of the screen - and the rest of the bar
was an empty band between them and whatever came next, the banner in the
free edition and the document itself in the paid one.

The bar is its own height now, pinned to the safe area, which is where
every version of iOS puts a bar's content anyway. The measuring-stick
view behind the trick goes with it, and the root view takes
systemBackground rather than white, since the strip behind the status bar
is now its background and not the bar's.

From iOS 26 the buttons are glass capsules that fill the bar's whole
height, so what is pinned to its bottom edge meets them with nothing in
between and cuts them off; they get 8 points of room there, and nothing
before iOS 26, where the bar has a background of its own and the same
margin would only show as a band of nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q1T4UTUxDqjCGUn3Uiyhkj
@andiwand
andiwand force-pushed the fix-document-toolbar-safe-area branch from 254a0d3 to 6129153 Compare August 15, 2026 16:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 254a0d32cb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread OpenDocumentReader/DocumentViewController.swift
It was an arranged subview of the stack the tool bar sits in, and at the
same time pinned to the banner's bottom edge in code - two answers to
where it goes, which Auto Layout settles by breaking one of them. The
answers agreed while everything between the two was zero high, so the
contradiction never showed; the margin under the tool bar pulls them 8
points apart on iOS 26, and a document with more than one page is what
puts the tab bar on screen to see it.

The code's answer is the one that is used, so the tab bar becomes a plain
subview and the stack is left with what it lays out: the tool bar and the
progress bar.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q1T4UTUxDqjCGUn3Uiyhkj
@andiwand
andiwand merged commit 53bdc41 into main Aug 15, 2026
4 checks passed
@andiwand
andiwand deleted the fix-document-toolbar-safe-area branch August 15, 2026 16:45
andiwand added a commit that referenced this pull request Aug 15, 2026
Everything under Unreleased is in: the tool bar sitting on the status bar
(#155), the chevron and the pencil (#156), and a document fitted to the
screen (#157). That is a version, so the heading is cut to 1.40 and the
store copy for it written.

No date and no compare link on the heading: v1.40 is written when the
drafted release is published, and this file says to wait for the tag. The
Unreleased link stays on v1.39...HEAD for the same reason.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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