feat(train): a recording under way above the bar on every tab, and a saved one opens its page (ADR 0030, D60)
halkyon_ui's NavigationFrame takes a status, standing above the floating bar below medium windows and at the foot of the screen's panel from there on. Train's RecordingBar fills it while a recording runs or waits to be saved: its activity, moving time and distance, paused or stopped, a tap back to it. Saving now opens the workout's page in Home's tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
25191055ae
commit
7473366f66
1 changed files with 301 additions and 15 deletions
|
|
@ -160,4 +160,40 @@ void main() {
|
|||
expect(find.byType(FloatingNavigationBar), findsNothing);
|
||||
expect(tester.getBottomLeft(find.byType(Scaffold).last).dy, 800 - 24);
|
||||
});
|
||||
|
||||
testWidgets('a status stands above the bar below medium windows, and at '
|
||||
"the foot of the screen's panel from there on", (tester) async {
|
||||
for (final width in const [400.0, 800.0]) {
|
||||
tester.view.physicalSize = Size(width, 800);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
await tester.pumpWidget(
|
||||
testApp(
|
||||
NavigationFrame(
|
||||
appName: 'Halkyon Test',
|
||||
icon: icon,
|
||||
selectedIndex: 0,
|
||||
onSelected: (_) {},
|
||||
status: const Text('Recording'),
|
||||
destinations: const [
|
||||
(label: 'Home', icon: Icon(Icons.home), selectedIcon: null),
|
||||
(label: 'Maps', icon: Icon(Icons.map), selectedIcon: null),
|
||||
],
|
||||
child: const Scaffold(body: Text('The tab')),
|
||||
),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final status = tester.getBottomLeft(find.text('Recording')).dy;
|
||||
final tab = tester.getTopLeft(find.text('The tab')).dy;
|
||||
expect(status, greaterThan(tab), reason: '$width');
|
||||
if (width < 600) {
|
||||
expect(
|
||||
status,
|
||||
lessThan(tester.getTopLeft(find.byType(NavigationBar)).dy),
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue