c6c6dcfe18
- 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.
48 lines
1.4 KiB
Dart
48 lines
1.4 KiB
Dart
import 'package:flutter/widgets.dart';
|
|
|
|
/// Content that scrolls behind a floating top bar, with optional [notices]
|
|
/// (a connection banner, a refused refresh) that stay put above it.
|
|
///
|
|
/// Without notices [child] reaches the top edge and keeps the bar's height as
|
|
/// its [MediaQuery.paddingOf] top, so its list starts below the bar at rest
|
|
/// and scrolls behind it. With notices they sit below the bar and [child]
|
|
/// below them, no longer seeing the bar's height. [child] keeps its place in
|
|
/// the tree either way, so a banner coming or going never remounts it.
|
|
class TopBarNotices extends StatelessWidget {
|
|
const TopBarNotices({
|
|
super.key,
|
|
this.notices = const [],
|
|
required this.child,
|
|
});
|
|
|
|
final List<Widget> notices;
|
|
final Widget child;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final media = MediaQuery.of(context);
|
|
final inset = media.padding.top;
|
|
final shown = notices.isNotEmpty;
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsets.only(top: shown ? inset : 0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: notices,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: MediaQuery(
|
|
data: media.copyWith(
|
|
padding: media.padding.copyWith(top: shown ? 0 : inset),
|
|
),
|
|
child: child,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|