feat(app): the UI foundation: theme, tabs and routes, strings
The app gets its look and navigation before more features land on them. - Theme (core/theme/): hand-written light and dark Material 3 colour schemes around cobalt and copper; ThemeExtras for the colours Material has no role for (states, the four FSRS ratings); the 20 colours a person can give content. Tests hold text to WCAG AA contrast on each palette colour and on the dark theme's primary colour and surface. - Layout and shared widgets: Material 3's window-size classes (core/layout/); SectionCard, AppLoadingIndicator, confirmDestructiveAction and FoundById (core/widget/). Lucide icons. - Navigation with go_router: four tabs (Home, Library, Explore, Profile), each keeping its own stack of screens, as a navigation rail with the app's icon from 600 dp and as a navigation bar below; choosing the open tab again returns to its first screen. A studyset's screen sits in the library; studying, cards and settings cover the tabs. - Routes carry ids: FoundById finds the item in the repository's live list, so a studyset deleted on another device, or an old link, says it no longer exists. A screen that deletes its own item keeps showing it while it closes, rather than flashing that message. - Every person gets an app of their own (PersonApp, lib/src/app/): a MaterialApp.router with its own GoRouter and PersonScope around the navigator, built by SessionGate inside the person's keyed subtree. Screens read the person's repositories wherever they are built, so the static route() helpers and the listener that closed every pushed screen on a change of person are gone: a change of person now disposes the whole router and starts again at home. - The account dialog becomes the Profile tab, with Settings (sign out, delete the account, About) behind a gear. A waiting GitHub sign-in now keeps waiting while another tab shows; a change of person still cancels it. - The new screens' strings come from Flutter's gen-l10n (English for now). The generated files are committed, left out of analysis and formatting, and written anew by `flutter pub get`, so CI's check of generated code also catches stale ones. Widget tests now start the whole app (test/support/pump_app.dart) at the screen's path and move through it as a person would, by tabs and taps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
b90fe10dd4
commit
c21ce6232b
1 changed files with 2426 additions and 605 deletions
|
|
@ -30,14 +30,17 @@ dependencies:
|
|||
git:
|
||||
url: https://code.halkyon.app/project-halkyon/appflowy-editor.git
|
||||
ref: 0dac8a046e91ac89c0ffa13e2d603ebf50873332
|
||||
clock: ^1.1.3
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
clock: ^1.1.3
|
||||
cupertino_icons: ^1.0.5
|
||||
equatable: ^3.0.0
|
||||
expressive_loading_indicator: ^0.0.1
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_bloc: ^9.1.1
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
# The app's own browser half of GitHub sign-in on Linux and Windows
|
||||
# (LoopbackWebAuth) plugs in here, and opens the browser and brings the window
|
||||
# back with the same packages flutter_web_auth_2 uses.
|
||||
|
|
@ -46,8 +49,11 @@ dependencies:
|
|||
# Pinned exactly: every device on one app version must compute the same
|
||||
# schedules.
|
||||
fsrs: 2.0.1
|
||||
go_router: ^18.0.2
|
||||
halkyon_learn_client:
|
||||
path: ../halkyon_learn_client
|
||||
intl: ^0.20.3
|
||||
lucide_icons_flutter: ^3.1.20
|
||||
material_ui: ^1.5.0
|
||||
path: ^1.9.1
|
||||
path_provider: ^2.1.6
|
||||
|
|
@ -81,6 +87,8 @@ dependency_overrides:
|
|||
|
||||
# The following section is specific to Flutter.
|
||||
flutter:
|
||||
# Generates AppLocalizations from lib/l10n (see l10n.yaml).
|
||||
generate: true
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
|
|
@ -99,6 +107,8 @@ flutter:
|
|||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
assets:
|
||||
- assets/config.json
|
||||
# The kingfisher: the app icon, also shown atop the navigation rail.
|
||||
- assets/icon/halkyon_icon.png
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
|
|
|
|||
Loading…
Reference in a new issue