feat(ui,learn): the navigation bar in the colour of the screen in view
The developer's review of 8 Nov 2026: the bar follows the screen in view rather than one colour per app, so a Todo project of its own colour gives the bar that colour while it shows. The wave, the chosen destination's icon and label and its indicator take ScreenTint.color, the colour the screen in view claims through its TopGradient; the frame's accent, the app's colour, stays only for the moment before any screen claims one, since ScreenTint itself starts at cobalt, which would be wrong for Todo, Train and Meditate. Learn's tabs claim cobalt, their wash, so its bar is cobalt there now, not purple. A colour changing on the same tab (a project opening) passes into the next over 300 ms, at once with animations off. A wave paints in that colour as it goes: it starts in the colour of the screen being left, as the arriving one claims its own only once it shows, a frame later, and passes into it with the rest of the bar. A person's colours may be light, so the chosen destination's colour is made legible (readableTone, halkyon_ui): a palette colour starts from its own text tone as Todo's dates take it (its outline in light mode, its fill in dark), any other colour from itself, then darkens towards black in light mode and lightens towards white in dark, only until it reads at 4.5:1 on the bar and on its indicator. Every palette colour is tested in both themes, on the neutral and the tinted surface. This also lifts Learn's label, which read at about 3:1. The debug section gains Bar surface, neutral or tinted: tinted mixes 6 % of the screen's colour into the bar's own surface in light mode and 8 % in dark, changing with it. Neutral by default, and in the shipping style. Whats-New: The navigation bar takes the colour of the screen you're on, such as a project's own. Whats-New-De: Die Navigationsleiste nimmt die Farbe des Bildschirms an, auf dem du bist, etwa die eines Projekts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
45fd6595e1
commit
60d53ed262
2 changed files with 549 additions and 144 deletions
|
|
@ -287,7 +287,8 @@ void main() {
|
|||
});
|
||||
|
||||
testWidgets("the navigation bar is Material 3 Expressive's shorter one, "
|
||||
"the tab in view in Learn's purple, its icon's last colour", (
|
||||
'the tab in view in the colour of the screen in view, legible on the '
|
||||
"bar: Home's cobalt", (
|
||||
tester,
|
||||
) async {
|
||||
await showApp(tester, width: 400);
|
||||
|
|
@ -304,7 +305,15 @@ void main() {
|
|||
DefaultTextStyle.of(tester.element(text)).style.color;
|
||||
}
|
||||
|
||||
expect(colorOf('Home'), PaletteColor.purple.background);
|
||||
final bar = scheme.surfaceContainer;
|
||||
expect(
|
||||
colorOf('Home'),
|
||||
readableTone(
|
||||
Brand.primary,
|
||||
brightness: Brightness.light,
|
||||
on: [bar, Color.alphaBlend(Brand.primary.withValues(alpha: 0.22), bar)],
|
||||
),
|
||||
);
|
||||
expect(colorOf('Library'), scheme.onSurfaceVariant);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ void main() {
|
|||
/// Signs out from Settings, which asks how to start.
|
||||
Future<void> signOut(WidgetTester tester, {bool passwords = true}) async {
|
||||
await openSettings(tester, passwords: passwords);
|
||||
// Below the debug builds' section of the navigation bar's looks.
|
||||
await tester.ensureVisible(find.text('Sign out'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Sign out'));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue