feat(app): icon-only tab bars, Settings from the Pipelines bar, main bar bottom right with detail bars above it
Settings leaves the tab bar (Pipelines, Runs, Chat, Search) and opens as a page from a gear in the Pipelines bar, keeping /settings, its keys and a Back to Pipelines (also the system Back). Every floating tab bar shows icons only, named for assistive technology. On wide windows the shell's tab bar stays at the bottom right; a split detail learns its height plus a 12px gap, so its tabs or the chat composer float above it, and pages the detail opens (the stage page) stay in its pane through its own navigator.
This commit is contained in:
@@ -15,15 +15,19 @@ import 'package:pipelines_app/ui/adaptive/segmented_bar_overlay.dart';
|
||||
/// On a wide split window (an unfolded foldable) under a system status bar,
|
||||
/// every pane's bar sits below the status-bar inset while content still
|
||||
/// reaches the top edge; and the open item's tabs float at the bottom of the
|
||||
/// detail pane, beside (never on) the shell's tab bar over the list.
|
||||
/// detail pane, above (never on) the shell's tab bar at the bottom right.
|
||||
void main() {
|
||||
const statusBar = 40.0;
|
||||
|
||||
Future<void> setUp(WidgetTester tester, Size size) async {
|
||||
Future<void> setUp(
|
||||
WidgetTester tester,
|
||||
Size size, {
|
||||
double bottom = 0,
|
||||
}) async {
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1;
|
||||
tester.view.padding = const FakeViewPadding(top: statusBar);
|
||||
tester.view.viewPadding = const FakeViewPadding(top: statusBar);
|
||||
tester.view.padding = FakeViewPadding(top: statusBar, bottom: bottom);
|
||||
tester.view.viewPadding = FakeViewPadding(top: statusBar, bottom: bottom);
|
||||
addTearDown(tester.view.reset);
|
||||
}
|
||||
|
||||
@@ -156,9 +160,10 @@ void main() {
|
||||
expect(tester.getTopLeft(find.byKey(const Key('item-list'))).dy, 0);
|
||||
});
|
||||
|
||||
testWidgets('$host split: the item tabs float at the bottom of the '
|
||||
'detail pane, beside the shell tab bar over the list', (tester) async {
|
||||
await setUp(tester, const Size(1200, 800));
|
||||
testWidgets('$host split: the item tabs float above the shell tab bar '
|
||||
'at the bottom right of the detail pane', (tester) async {
|
||||
// A gesture-navigation inset as on the unfolded foldable.
|
||||
await setUp(tester, const Size(1200, 800), bottom: 24);
|
||||
await tester.pumpWidget(shell(cupertino, tabbedItem));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
@@ -167,7 +172,6 @@ void main() {
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
final tabs = pillsOf(tester, find.byKey(const Key('item-tabs'))).single;
|
||||
expect(tabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(tabs.right, lessThanOrEqualTo(body.right));
|
||||
final shellTabs = tester.getRect(
|
||||
@@ -178,8 +182,13 @@ void main() {
|
||||
)
|
||||
.first,
|
||||
);
|
||||
// The shell's bar keeps the bottom right, above the system inset; the
|
||||
// item's tabs sit a gap above it, both at the trailing edge.
|
||||
expect(shellTabs.bottom, closeTo(800 - 24, 0.5));
|
||||
expect(shellTabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(shellTabs.overlaps(tabs), isFalse);
|
||||
expect(shellTabs.right, lessThanOrEqualTo(body.left));
|
||||
expect(shellTabs.top - tabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
// The item's list clears its tabs at rest.
|
||||
final list = tester.element(find.byKey(const Key('item-list')));
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user