From df705d831f52bf13967be66eaaca3477c0545c87 Mon Sep 17 00:00:00 2001 From: randogoth Date: Sun, 11 Oct 2026 12:51:18 +0300 Subject: [PATCH] docs: drop the dead font registry and resync the reader UI spec with the shipped chrome --- SPEC.md | 8 ++++---- app/lib/application/internal_pages.dart | 1 - app/lib/presentation/app.dart | 7 +------ app/lib/presentation/reader/reader_fonts.dart | 15 --------------- app/lib/presentation/reader/reader_screen.dart | 7 +++---- 5 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 app/lib/presentation/reader/reader_fonts.dart diff --git a/SPEC.md b/SPEC.md index 221c840..1782486 100644 --- a/SPEC.md +++ b/SPEC.md @@ -61,7 +61,7 @@ Use the `actors` package only where Dart Isolate isolation is genuinely useful: The v1 client presents one reader screen: -- An address field pinned at the top; it hides when the reader scrolls down and returns when they scroll up or reach the top. -- A swipe right goes back and a swipe left goes forward through the history stack. -- Scrolling a page fades in a FOB in the bottom-right corner; on pages that fit without scrolling it is present from the start. It opens a bottom sheet with the reader's presentation choices: typeface, text size, theme (light, dark, follow system), color variant (site, warm, cool, green, mono), and a bookmark and subscription toggle for the current page. -- Fonts are bundled. v1 ships Atkinson Hyperlegible; Verdana and Georgia follow once their font files are added to `app/assets/fonts/`. A font is one TTF plus one `fonts` entry in `app/pubspec.yaml` and one entry in `app/lib/presentation/reader/reader_fonts.dart`. \ No newline at end of file +- An address field pinned at the top; it hides when the reader scrolls down and returns when they scroll up or reach the top. Its leading icons open the settings page and, on pointer platforms, go back and forward. Its trailing icons reload the page, subscribe to the site, and bookmark the page; subscribing is offered only on a page that carries dated links or declares an Atom feed. +- A swipe right goes back and a swipe left goes forward through the history stack. The whole empty margin beside the text column accepts the swipe, with a 40 px floor, so the gesture stays clear of selecting text. Touch devices navigate this way; pointer platforms get the address bar's buttons as well. +- Settings, history, bookmarks and subscriptions are internal pages under the `mews:` scheme. Each is built as an ordinary Mews document and rendered by the same renderer as a fetched page, so it joins the history stack and the swipe transitions. A setting is a link: following `mews:setting//` applies the value and rerenders the page in place without adding a history entry. +- Fonts are bundled, and v1 ships Atkinson Hyperlegible. Adding a font is one TTF in `app/assets/fonts/`, one `fonts` entry in `app/pubspec.yaml`, one option on the settings page, and one label in `app/locales/en-US/main.ftl`. diff --git a/app/lib/application/internal_pages.dart b/app/lib/application/internal_pages.dart index c65f6ac..e244425 100644 --- a/app/lib/application/internal_pages.dart +++ b/app/lib/application/internal_pages.dart @@ -136,7 +136,6 @@ class InternalPages { _Option(_strings.t('settings-variant-green'), 'green'), _Option(_strings.t('settings-variant-mono'), 'mono'), ], current: _settings.variant.value), - // The library pages stay reachable now the sheet is gone. HeadingBlock(2, [MewsText(_strings.t('settings-library-heading'))]), ListBlock( ordered: false, diff --git a/app/lib/presentation/app.dart b/app/lib/presentation/app.dart index 7def95b..2ff92fc 100644 --- a/app/lib/presentation/app.dart +++ b/app/lib/presentation/app.dart @@ -83,7 +83,7 @@ class MewsApp extends StatelessWidget { } } -/// The chrome (address bar, FOB, sheet, dialogs) follows the same palette +/// The chrome (address bar, dialogs, text selection) follows the same palette /// the reader selected for pages, so the whole app shares one color scheme. class _ThemedApp extends StatelessWidget { const _ThemedApp(); @@ -135,11 +135,6 @@ class _ThemedApp extends StatelessWidget { useMaterial3: true, colorScheme: scheme, scaffoldBackgroundColor: palette.background, - // The FOB follows the palette, not the M3 container defaults. - floatingActionButtonTheme: FloatingActionButtonThemeData( - backgroundColor: palette.link, - foregroundColor: palette.background, - ), // Selection highlights and the caret follow the palette too. textSelectionTheme: TextSelectionThemeData( cursorColor: palette.link, diff --git a/app/lib/presentation/reader/reader_fonts.dart b/app/lib/presentation/reader/reader_fonts.dart deleted file mode 100644 index 98bd407..0000000 --- a/app/lib/presentation/reader/reader_fonts.dart +++ /dev/null @@ -1,15 +0,0 @@ -/// The bundled typefaces the reader can choose from (spec 8.2). Adding a font -/// is one TTF in assets/fonts, one entry in pubspec.yaml and one entry here. -class ReaderFont { - const ReaderFont(this.family, this.labelId); - - /// The pubspec font family name. - final String family; - - /// Message ID of its display name in locales/en-US/main.ftl. - final String labelId; -} - -const readerFonts = [ - ReaderFont('Atkinson Hyperlegible', 'settings-font-atkinson'), -]; diff --git a/app/lib/presentation/reader/reader_screen.dart b/app/lib/presentation/reader/reader_screen.dart index d95cbe4..475f74b 100644 --- a/app/lib/presentation/reader/reader_screen.dart +++ b/app/lib/presentation/reader/reader_screen.dart @@ -13,8 +13,7 @@ import 'palettes.dart'; import 'swipe_navigator.dart'; /// The whole v1 UI: an address bar that hides on scroll, the page reader with -/// swipe back/forward, a settings FOB that appears on scroll, and error -/// states that never guess. +/// swipe back/forward, and error states that never guess. class ReaderScreen extends StatefulWidget { const ReaderScreen({super.key}); @@ -49,8 +48,8 @@ class _ReaderScreenState extends State { if (!_scroll.hasClients) return; final position = _scroll.position; - // The bar and FOB hide when the reader scrolls down and come back on any - // upward scroll; both are always visible at the top of the page. + // The bar hides when the reader scrolls down and comes back on any + // upward scroll; it is always visible at the top of the page. final wantVisible = position.pixels <= 0 || position.userScrollDirection == ScrollDirection.forward;