Close the chrome gaps: content behind bars on Templates, run detail, stage page and Schedules; Search field fills the bar

- SegmentedBar.titleWidget (and ShellBar/ShellBarSpec titleWidget,
  backgroundColor): a bar's main pill can be an input in place of the title;
  Search uses it so the field fills the bar with Kind and info, capped at the
  result column width so field and results share edges on wide windows.
- Templates page/frame drop the top SafeArea again (BelowTopBar gate,
  TopBarNotices banners); Cupertino uses the grouped background.
- Settings on Cupertino in the shell publishes the grouped background so the
  bar scrim matches the page (no white band or seam).
- TopGlassStrip: the run detail header (status, actions, decision, notices)
  and the Schedules search/filter toolbar float as glass under the bar; tabs
  and lists scroll behind both.
- Stage page: stage title and Visit/Run subtitle in the bar, facts lead the
  Summary scroll, sections scroll behind the bar under floating tabs.
- Tests for content-behind-bar on each page and the title-widget bar mode;
  notes/chrome-gaps-fixes.md.
This commit is contained in:
2026-10-31 04:27:35 +00:00
parent 6ab8551348
commit e34fa1050e
31 changed files with 1348 additions and 395 deletions
+6 -1
View File
@@ -211,6 +211,9 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
onPressed: onBack,
),
title: spec?.title ?? label,
titleWidget: spec?.titleWidget,
titleWidgetMaxWidth: spec?.titleWidgetMaxWidth ?? double.infinity,
backgroundColor: spec?.backgroundColor,
subtitle: spec?.subtitle,
subtitleIcon: spec?.subtitleIcon,
onTitlePressed: spec?.onTitlePressed,
@@ -228,7 +231,9 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
],
),
)
else if (onSearch != null)
// A screen whose main pill is its own field (Search) needs no
// separate Search action.
else if (onSearch != null && spec?.titleWidget == null)
cupertino
? CupertinoButton(
key: const ValueKey('shell.search'),
+25
View File
@@ -15,10 +15,22 @@ class ShellBarSpec {
this.onBack,
this.actions = const [],
this.barless = false,
this.titleWidget,
this.titleWidgetMaxWidth = double.infinity,
this.backgroundColor,
});
final String? title;
/// The bar's main pill in place of the title (a search field); see
/// `SegmentedBar.titleWidget`.
final Widget? titleWidget;
final double titleWidgetMaxWidth;
/// The page's own background behind the bar (a grouped list's), so the
/// bar's scrim matches what scrolls under it; null keeps the shell's.
final Color? backgroundColor;
/// A one-line subtitle in the title pill (the item's context: its
/// pipeline and version), so the body need not repeat it.
final String? subtitle;
@@ -130,9 +142,19 @@ class ShellBar extends StatefulWidget {
this.actions = const [],
this.active = true,
this.barless = false,
this.titleWidget,
this.titleWidgetMaxWidth = double.infinity,
this.backgroundColor,
required this.child,
});
/// See [ShellBarSpec.titleWidget].
final Widget? titleWidget;
final double titleWidgetMaxWidth;
/// See [ShellBarSpec.backgroundColor].
final Color? backgroundColor;
/// See [ShellBarSpec.barless].
final bool barless;
@@ -190,6 +212,9 @@ class _ShellBarState extends State<ShellBar> {
onBack: widget.onBack,
actions: widget.actions,
barless: widget.barless,
titleWidget: widget.titleWidget,
titleWidgetMaxWidth: widget.titleWidgetMaxWidth,
backgroundColor: widget.backgroundColor,
);
// The bar is above this screen; update it after this frame's build.
WidgetsBinding.instance.addPostFrameCallback((_) {