fix(app): float content behind top bars and give each wide pane its own bar row
- Top-bar clearance helpers (withTopBarClearance, withBarClearance, SliverTopBarClearance, BelowTopBar, TopBarNotices); shell, DetailPane and the runs/pipelines/templates/artifacts/stage definition/filter/usage pages drop their top SafeArea and pad their own lists, pinned headers pin at the inset. - Wide windows: the shell bar narrows to the list pane (ShellPaneSplit) and the open item's bar shares its row; item tabs float at the pane's top (PageTabsEdge) instead of stacking on the shell's tab bar; the floating tab pill no longer swells over leftover media padding. - Pipeline detail is a DetailPane on wide too; Run/Runs move from FABs into the bar's actions; name and identity live in the title pill. - Run detail title pill shows the real title with Run N, pipeline and version (the pill links to the pipeline); the body keeps only status, actions and notices; standalone detail draws the same segmented bar. - One Runs tab badge: attention outranks running. - Tests for content-behind-bar padding and the no-stacking wide layout; notes/app-chrome-fixes.md.
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
||||
import 'package:pipelines_app/shell/detail_page.dart';
|
||||
|
||||
/// Wide screens deliberately repeat the selected title in the visible list.
|
||||
Finder runDetailText(String text) =>
|
||||
find.descendant(of: find.byType(RunDetailView), matching: find.text(text));
|
||||
/// The run's title is in its top bar: the detail pane's (or page's) when the
|
||||
/// detail sits in one, else the run detail's own.
|
||||
Finder runDetailText(String text) => find.descendant(
|
||||
of: find.byWidgetPredicate(
|
||||
(widget) => widget is RunDetailView || widget is DetailPane,
|
||||
),
|
||||
matching: find.text(text),
|
||||
);
|
||||
|
||||
/// Stage identity and visit coordinates are separate rendered fields now.
|
||||
void expectVisitHeading(WidgetTester tester, String stage, num sequence) {
|
||||
|
||||
@@ -89,7 +89,11 @@ void main() {
|
||||
await tester.tap(find.byKey(runPipelineLinkKey));
|
||||
await tester.pump();
|
||||
expect(opened, [(10, 3)]);
|
||||
expect(find.bySemanticsLabel('Open pipeline nightly'), findsOneWidget);
|
||||
// The run's title pill is the link, announced as opening the pipeline.
|
||||
expect(
|
||||
find.bySemanticsLabel(RegExp('Open pipeline nightly')),
|
||||
findsOneWidget,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('$host: a succeeded run offers no Retry', (tester) async {
|
||||
|
||||
@@ -147,11 +147,12 @@ void main() {
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(find.text('Nightly build'), findsOneWidget);
|
||||
expect(find.textContaining('Original prompt'), findsNothing);
|
||||
// Both hosts lead with the web's status kicker above the title.
|
||||
// The title is the top bar's; the status kicker leads the body below
|
||||
// it, and the body does not repeat the title.
|
||||
expect(find.byKey(const Key('run-status-kicker')), findsOneWidget);
|
||||
expect(
|
||||
tester.getTopLeft(find.byKey(const Key('run-status-kicker'))).dy,
|
||||
lessThan(tester.getTopLeft(find.text('Nightly build')).dy),
|
||||
greaterThan(tester.getBottomLeft(find.text('Nightly build')).dy),
|
||||
);
|
||||
// Input and Output are sticky collapsibles on both hosts.
|
||||
expect(
|
||||
|
||||
@@ -119,6 +119,7 @@ void main() {
|
||||
'input': {'prompt': 'initial prompt'},
|
||||
});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
|
||||
expect(runDetailText('Alpha run'), findsOneWidget);
|
||||
expect(find.text('Input'), findsOneWidget);
|
||||
@@ -159,6 +160,7 @@ void main() {
|
||||
expect(gateway.detailRequests[2], hasLength(1));
|
||||
gateway.replyDetail(2, 0, {'id': 2, 'title': 'Beta run'});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(runDetailText('Beta run'), findsOneWidget);
|
||||
expect(find.byKey(const ValueKey('run-row-1')), findsOneWidget);
|
||||
});
|
||||
@@ -251,6 +253,7 @@ void main() {
|
||||
expect(gateway.detailRequests[2], hasLength(1));
|
||||
gateway.replyDetail(2, 0, {'id': 2, 'title': 'Beta run'});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(runDetailText('Beta run'), findsOneWidget);
|
||||
|
||||
await tester.pumpWidget(_materialScreen(gateway, initialRunId: 1));
|
||||
@@ -258,6 +261,7 @@ void main() {
|
||||
expect(gateway.detailRequests[1], hasLength(1));
|
||||
gateway.replyDetail(1, 0, {'id': 1, 'title': 'Alpha run'});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(runDetailText('Alpha run'), findsOneWidget);
|
||||
|
||||
await tester.pumpWidget(_materialScreen(gateway));
|
||||
@@ -274,6 +278,7 @@ void main() {
|
||||
await _mountList(tester, gateway);
|
||||
gateway.replyDetail(2, 0, {'id': 2, 'title': 'Beta run'});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(runDetailText('Beta run'), findsOneWidget);
|
||||
|
||||
await tester.pumpWidget(
|
||||
@@ -291,6 +296,7 @@ void main() {
|
||||
'status': 'succeeded',
|
||||
});
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(runDetailText('Beta run'), findsOneWidget);
|
||||
expect(find.byKey(const ValueKey('run-row-1')), findsOneWidget);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user