Skip to content

feat(ui): standard controls, accessibility and a String Catalog - #29

Closed
devaryakjha wants to merge 4 commits into
claude/project-thread-eheuhr-searchfrom
claude/project-thread-eheuhr-a11y
Closed

devaryakjha wants to merge 4 commits into
claude/project-thread-eheuhr-searchfrom
claude/project-thread-eheuhr-a11y

Conversation

@devaryakjha

@devaryakjha devaryakjha commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Arya · project thread

Stacked on #28, whose ReaderController.search the search sheet uses. I'll retarget it to main once #28 merges.

Before

ReaderView showed the page and nothing else. There was no way to open the table of contents, change the text size or theme, jump through the book, or search, short of an app building all of it on ReaderController. The navigator's few user-facing strings had no String Catalog, so they couldn't be translated.

After

  • Controls. A tap in the middle of the page shows a Liquid Glass title bar (book and chapter title, Contents, Search and Appearance buttons) and a bottom bar with a slider through the book's positions, "12 of 300", and previous and next chapter buttons. Another tap hides them. The slider runs right to left for manga.
  • Sheets. TableOfContentsView (nested entries, the current chapter marked, chapters listed when a book has no contents), SearchView (searches as you type, results with the chapter title and the match in bold, tap to go there) and AppearanceView (text size, font, line height, margins, theme, page turn, comic layout, reading direction; text settings only for reflowable books). Each applies to the reader at once.
  • Apps. ReaderView takes preferences and reports onLocationChange and onPreferencesChange, so an app can save and restore both. ReaderControls and the three sheets are public and take a ReaderController, for apps that draw their own screen around NavigatorView.
  • Accessibility. With VoiceOver on, the controls stay visible. Every control has a label, the slider reads its position, and VoiceOver's scroll swipes turn pages. Reduce Motion drops the bars' animation. The Search shortcut is ⌘F.
  • Localization. ChekReaderUI and ChekReaderNavigator each get a Localizable.xcstrings with every user-facing string, with translator comments on the ambiguous ones and a plural rule for result counts.

How

  • Five files in Sources/ChekReaderUI: ReaderView composes NavigatorView, the state view, ReaderControls and a reporter view that watches the location and preferences on its own, so page turns don't redraw the reader. ReaderControls holds the two bars and the sheet selection; the chapter title and the position bar read controller.location in their own views.
  • Package.swift processes the catalogs on Apple platforms and excludes them on Linux, where SwiftPM has no rule for .xcstrings and would warn.
  • No new tests: this is SwiftUI layout over ReaderController, whose behaviour the navigator tests already cover.

Built and tested on Linux here with Swift 6.4.1 (all targets, 180 tests pass). The SwiftUI code only compiles on Apple platforms and there's no Xcode in this environment, so the Apple CI job is the first build of it; I'll fix anything it turns up.


Generated by Claude Code

ReaderView now draws the standard controls over the page: a tap in the
middle shows a Liquid Glass title bar with the table of contents, search
and appearance sheets, and a slider through the book's positions with
previous and next chapter buttons. Apps get the location and settings
back through callbacks, and apps that lay out their own screen around
NavigatorView can reuse ReaderControls, TableOfContentsView, SearchView
and AppearanceView on their own.

With VoiceOver on, the controls stay visible, every control has a label
and the slider reads its position, and VoiceOver's scroll swipes turn
pages. Reduce Motion drops the bars' animation. Every user-facing string
in the navigator and UI targets lives in a String Catalog, so apps can
translate the reader.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XfwUCp8GqHWUdTK7EhZCT5
@devaryakjha devaryakjha self-assigned this Oct 21, 2026
The table of contents view imports both ChekReaderCore and SwiftUI, so
a bare Link is ambiguous on Apple platforms.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XfwUCp8GqHWUdTK7EhZCT5
@devaryakjha
devaryakjha changed the base branch from main to claude/project-thread-eheuhr-search October 21, 2026 03:47
devaryakjha added a commit that referenced this pull request Oct 21, 2026
Lands four pull requests in one:

- #28 feat(core): search a publication's text. Publication.search
  finds a query in reflowable formats and PDFs, returning Locators
  that go(to:) opens at the match, with the text around it.
- #29 feat(ui): standard controls, accessibility and a String Catalog.
  ReaderView draws a title bar, table of contents, search and
  appearance sheets and a position slider; every control is labelled
  for VoiceOver, and user-facing strings are localizable.
- #30 feat(archives): read CBR and CB7 through libarchive, in the
  optional ChekReaderArchives product.
- #27 Point the README at the 0.1.0 release instead of main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XfwUCp8GqHWUdTK7EhZCT5

Copy link
Copy Markdown
Contributor Author

Landed on main in 1f74f28 through #27, which carried this branch. Closing.


Generated by Claude Code

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.

2 participants