Skip to content

Give the viewer a back chevron and a pencil - #156

Merged
andiwand merged 1 commit into
mainfrom
viewer-toolbar-buttons
Aug 15, 2026
Merged

Give the viewer a back chevron and a pencil#156
andiwand merged 1 commit into
mainfrom
viewer-toolbar-buttons

Conversation

@andiwand

@andiwand andiwand commented Aug 15, 2026

Copy link
Copy Markdown
Member

Stacked on #155 — review that one first; this branch only adds the commit on top of it.

Two things about the buttons above an open document.

"Back to documents" is long. It spelled out what a chevron says, and took a third of the bar to do it. It is chevron.backward now. The words stay as the accessibility label rather than being dropped: a glyph is no shorter for VoiceOver, and it keeps the string that is already translated into all 16 languages doing something — a short "Back" would have been a new key, English everywhere until someone translates it.

Editing was three taps deep, in the "…" menu, even for the documents that can take it. It is a pencil in the bar now, next to search, the way Android has had it for years. It appears only where it applies: the bar loses the button while a document is being parsed and gets it back only if odrcore says the result can be written back. Editing leaves the menu with it, so there is one way to reach it rather than two.

The bar keeps the room for the pencil only where it is earned — the chevron is what pays for it.

Checked in the simulator

iPhone 17 Pro on iOS 26.0 and iPhone 16 Pro on iOS 18.4, both showing the same four evenly spaced buttons — chevron on the left, pencil / search / menu on the right:

  • test.odt — pencil is there. Tapping it re-parses the document as editable and the pencil goes away, since the document is already being edited; the menu then offers Save and Discard changes, and no longer offers Edit.
  • test.csv — no pencil. odrcore renders it but cannot write it back, so there is nothing to elevate.

The unit tests pass and scripts/format.sh --check is clean.

🤖 Generated with Claude Code

@andiwand
andiwand force-pushed the viewer-toolbar-buttons branch from fa3c9be to e12c25c Compare August 15, 2026 16:44
Base automatically changed from fix-document-toolbar-safe-area to main August 15, 2026 16:45
"Back to documents" spelled out what a chevron says, and took a third of
the bar to do it. It is the glyph now, with the words kept as the
accessibility label, which is the one reader a chevron is not shorter
for.

The room that frees goes to editing, which was three taps deep in the
menu even for the documents that can take it. It is a pencil in the bar
instead - Android has had one for years - and only for those documents:
the bar loses the button while a document is being parsed, and gets it
back only if odrcore says the result can be written. Editing leaves the
menu, so there is one way to reach it rather than two.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q1T4UTUxDqjCGUn3Uiyhkj
@andiwand
andiwand force-pushed the viewer-toolbar-buttons branch from e12c25c to d3f663e Compare August 15, 2026 17:01
@andiwand
andiwand merged commit 5f4e069 into main Aug 15, 2026
4 of 8 checks passed
@andiwand
andiwand deleted the viewer-toolbar-buttons branch August 15, 2026 17:01
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) <[email protected]>
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