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
+10 -8
View File
@@ -5,7 +5,6 @@ import 'package:pipelines_app/shell/adaptive_shell.dart';
import 'package:pipelines_app/shell/destination.dart';
import 'package:pipelines_app/shell/shell_bar.dart';
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
Widget _app({required bool cupertino, required bool open, VoidCallback? back}) {
final shell = AdaptiveShell(
@@ -88,12 +87,12 @@ void main() {
final destinationPill = find.descendant(
of: find.byType(FloatingDestinationBar),
matching: find.byType(GlassPill),
matching: find.byKey(FloatingDestinationBar.rowKey),
);
// Sized to its four tabs at the bottom right.
expect(
tester.getSize(destinationPill).width,
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
FloatingDestinationBar.rowWidth(cupertino: cupertino, tabs: 4),
);
expect(tester.getRect(destinationPill).right, 390 - 16);
await tester.tap(find.byKey(const ValueKey('shell.destination.chat')));
@@ -154,7 +153,7 @@ void main() {
),
);
await tester.pumpWidget(shell());
expect(find.byType(NavigationBar), findsOneWidget);
expect(find.byType(FloatingDestinationBar), findsOneWidget);
final navigator = tester.state<NavigatorState>(find.byType(Navigator));
navigator.push(
MaterialPageRoute<void>(
@@ -162,13 +161,16 @@ void main() {
),
);
await tester.pumpAndSettle();
expect(find.byType(NavigationBar), findsNothing);
expect(find.byType(NavigationBar, skipOffstage: false), findsOneWidget);
expect(find.byType(FloatingDestinationBar), findsNothing);
expect(
find.byType(FloatingDestinationBar, skipOffstage: false),
findsOneWidget,
);
await navigator.maybePop();
await tester.pump(const Duration(milliseconds: 16));
expect(find.byType(NavigationBar), findsOneWidget);
expect(find.byType(FloatingDestinationBar), findsOneWidget);
await tester.pumpAndSettle();
expect(find.byType(NavigationBar), findsOneWidget);
expect(find.byType(FloatingDestinationBar), findsOneWidget);
},
);
}