Show each floating tab as its own round glass button

Replace the single glass pill (host NavigationBar/CupertinoTabBar with one
gliding highlight) with a row of separate circular GlassPill buttons, 52/50 px
with 12/10 px gaps, at the same bottom-right place. The selected button fills
with the host selection tint and cross-fades; each button pops in on its own,
staggered, only when the bar appears or its tabs change; presses sink like the
top bar's. Tab semantics, keys, tooltips and badges are kept; the row shares
one BackdropGroup for its blurs.
This commit is contained in:
2026-11-02 18:43:05 +00:00
parent 37b67c84df
commit 377ff04aaf
24 changed files with 916 additions and 1003 deletions
+5 -6
View File
@@ -4,14 +4,13 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/shell/adaptive_shell.dart';
import 'package:pipelines_app/shell/destination.dart';
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
/// The shell's one floating glass tab bar: full width on a phone, sized to its
/// tabs at the right edge on a wide window, with content behind it.
void main() {
Finder pill() => find.descendant(
of: find.byType(FloatingDestinationBar),
matching: find.byType(GlassPill),
matching: find.byKey(FloatingDestinationBar.rowKey),
);
Future<void> setSize(WidgetTester tester, Size size) async {
@@ -56,7 +55,7 @@ void main() {
final rect = tester.getRect(pill());
expect(
rect.width,
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
FloatingDestinationBar.rowWidth(cupertino: cupertino, tabs: 4),
);
expect(rect.right, 390 - 16);
expect(rect.bottom, 844 - 16);
@@ -81,7 +80,7 @@ void main() {
// Four icon-only tabs, with the wider neighbour gaps derived by the bar.
expect(
rect.width,
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
FloatingDestinationBar.rowWidth(cupertino: cupertino, tabs: 4),
);
// No rail or sidebar: the content starts at the left edge.
expect(find.byType(NavigationRail), findsNothing);
@@ -135,7 +134,7 @@ void main() {
await tester.pump();
expect(
tester.getRect(pill()).width,
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
FloatingDestinationBar.rowWidth(cupertino: cupertino, tabs: 4),
);
expect(tester.getRect(pill()).right, 390 - 16);
expect(tester.state(find.byType(StatefulBuilder)), same(state));
@@ -199,7 +198,7 @@ void main() {
// Sized to its four tabs at the right, as on any width.
expect(
tester.getRect(pill()).width,
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
FloatingDestinationBar.rowWidth(cupertino: cupertino, tabs: 4),
);
expect(tester.getRect(pill()).right, 320 - 16);
}