From 486eeeb292a5b37fb9af763e9ee014c61bcbdd9c Mon Sep 17 00:00:00 2001 From: clover caruso Date: Thu, 15 Oct 2026 23:29:16 -0700 Subject: [PATCH] feat(ios): offer the Reading View on every page that reflows The Reading View button no longer waits behind a launch argument: it shows beside the page menu wherever the page can reflow into the screen's width, and the page menu always lists it. Refs #128 Assisted-by: claude-opus-5.5 --- apps/ios/Snowbound/PageViewController.swift | 4 ++-- apps/ios/Snowbound/Prototypes.swift | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/ios/Snowbound/PageViewController.swift b/apps/ios/Snowbound/PageViewController.swift index 2feeb966c28928f5f8126e1107cd9d6f6f5b2569..974aed4a3935e41f8bc59a1b0dc613bd2a16456f 100644 --- a/apps/ios/Snowbound/PageViewController.swift +++ b/apps/ios/Snowbound/PageViewController.swift @@ -115,7 +115,7 @@ final class PageViewController: UIViewController, PHPickerViewControllerDelegate if revealed || titleFocus && canvas.focusTitle() { _ = canvas.becomeFirstResponder() } - if Prototype.reading, canvas.reading?.offered == true { + if canvas.reading?.offered == true { reader = UIBarButtonItem( title: "Reading View", image: UIImage(systemName: "text.justify.left"), primaryAction: UIAction { [weak self] _ in self?.toggleReading() }) @@ -201,7 +201,7 @@ final class PageViewController: UIViewController, PHPickerViewControllerDelegate ) { [weak self] _ in self?.record(video: true) }, ]), ]) - return (Prototype.reading ? [readingAction()] : []) + [ + return [readingAction()] + [ insert, UIAction(title: "Page Background", image: UIImage(systemName: "paintpalette"), attributes: editable) { [weak self] _ in self?.showPaper() diff --git a/apps/ios/Snowbound/Prototypes.swift b/apps/ios/Snowbound/Prototypes.swift index e4b9cab6eb09341cc0fcecc792702eb07c86c832..33ec97f76e99640f1f468cb3379fd498f39a0fa4 100644 --- a/apps/ios/Snowbound/Prototypes.swift +++ b/apps/ios/Snowbound/Prototypes.swift @@ -1,12 +1,9 @@ import UIKit /// Design prototypes, off unless a launch argument turns one on, as -/// `-SnowboundReading YES`, `-SnowboundWelcome YES`, `-SnowboundSectionStrip YES` or -/// `-SnowboundQuickNote YES` (Xcode's scheme, `simctl launch`, or `devicectl … --arguments`). -enum Prototype { - /// Page menu: Reading View, the page reflowed into the screen's width. - static var reading: Bool { UserDefaults.standard.bool(forKey: "SnowboundReading") } -} +/// `-SnowboundWelcome YES`, `-SnowboundSectionStrip YES` or `-SnowboundQuickNote YES` +/// (Xcode's scheme, `simctl launch`, or `devicectl … --arguments`). +enum Prototype {} extension Prototype { /// First launch: a welcome where the list would be empty, the first notebook found opened -- 2.54.0