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:
2026-10-31 03:36:22 +00:00
parent ea0f22dfc7
commit c6c6dcfe18
49 changed files with 1791 additions and 693 deletions
+63 -19
View File
@@ -7,6 +7,7 @@ import '../ui/adaptive/floating_bar_layout.dart';
import '../ui/adaptive/floating_destination_bar.dart';
import 'attention_badge.dart';
import 'destination.dart';
import 'list_detail.dart';
import 'shell_bar.dart';
class AdaptiveShell extends StatefulWidget {
@@ -95,19 +96,19 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
);
}
if (destination != AppDestination.runs) return icon;
// Runs in progress at the bottom, runs that need you at the top.
icon = ActivityBadge(
key: const ValueKey('shell.badge.runs.running'),
count: _bar.badge(destination, ShellBadgeKind.running),
label: 'runs in progress',
cupertino: widget.cupertino,
bottom: true,
child: icon,
);
// One indicator: runs that need you outrank runs in progress, so the
// tab never wears two counts at once.
final attention = widget.attentionCount > 0;
return AttentionDestinationIcon(
count: widget.attentionCount,
cupertino: widget.cupertino,
child: icon,
child: ActivityBadge(
key: const ValueKey('shell.badge.runs.running'),
count: attention ? 0 : _bar.badge(destination, ShellBadgeKind.running),
label: 'runs in progress',
cupertino: widget.cupertino,
child: icon,
),
);
}
@@ -148,10 +149,18 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
onTap: (value) => _select(AppDestination.values[value]),
items: _destinationItems(),
);
// Destinations reach the top edge and scroll behind the floating top
// bar too: each learns the bar's height as its top media padding and
// pads its own lists by it (see withTopBarClearance).
final topBar = _ListPaneBar(
split: _bar.split(_selected),
bar: _segmentedBar(spec, details.label),
);
if (widget.cupertino) {
return CupertinoPageScaffold(
navigationBar: _segmentedBar(spec, details.label),
navigationBar: topBar,
child: SafeArea(
top: false,
bottom: false,
child: FloatingBarOverlay(
bar: bar,
@@ -162,14 +171,8 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
}
return Scaffold(
extendBodyBehindAppBar: true,
appBar: _segmentedBar(spec, details.label),
// Destinations start below the floating top bar.
body: SafeArea(
left: false,
right: false,
bottom: false,
child: _destinationStack(contents, index),
),
appBar: topBar,
body: _destinationStack(contents, index),
extendBody: true,
bottomNavigationBar: bar,
);
@@ -208,6 +211,11 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
onPressed: onBack,
),
title: spec?.title ?? label,
subtitle: spec?.subtitle,
subtitleIcon: spec?.subtitleIcon,
onTitlePressed: spec?.onTitlePressed,
titleSemanticLabel: spec?.titleSemanticLabel,
titleKey: spec?.titleKey,
actions: [
if (published.isNotEmpty)
// A screen taking the bar over cross-fades its actions in.
@@ -244,3 +252,39 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
Widget _destinationStack(List<Widget> contents, int index) =>
IndexedStack(key: _destinationStackKey, index: index, children: contents);
}
/// The shell's top bar, over the list pane only while the tab shows a list
/// beside an open item ([ShellPaneSplit]); the item's own bar takes the rest
/// of the same row. The bar keeps its place in the scaffold either way, so a
/// split never remounts it.
class _ListPaneBar extends StatelessWidget
implements ObstructingPreferredSizeWidget {
const _ListPaneBar({required this.split, required this.bar});
final bool split;
final SegmentedBar bar;
@override
Size get preferredSize => bar.preferredSize;
@override
bool shouldFullyObstruct(BuildContext context) =>
bar.shouldFullyObstruct(context);
@override
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) {
final width = split
? listDetailListWidth(
MediaQuery.sizeOf(context).width,
constraints.maxWidth,
)
: constraints.maxWidth;
return Align(
alignment: AlignmentDirectional.topStart,
heightFactor: 1,
child: SizedBox(width: width, child: bar),
);
},
);
}