e34fa1050e
- 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.
76 lines
2.2 KiB
Dart
76 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../core/api_gateway.dart';
|
|
import '../../../ui/status/run_status_icon.dart';
|
|
import '../domain/run_models.dart';
|
|
import 'run_detail_tabs.dart';
|
|
|
|
/// The runs detail with standard Material controls.
|
|
///
|
|
/// The top bar carries the run's identity (title, number, pipeline and
|
|
/// version), Back and the more menu; this header keeps only what the bar does
|
|
/// not: the status in its colour beside the run actions, and the notices.
|
|
/// The shared tab body supplies Summary, Timeline, Artifacts and Changes.
|
|
Widget buildMaterialRunDetail({
|
|
required BuildContext context,
|
|
required JsonMap run,
|
|
required Widget headerActions,
|
|
required bool detailLoading,
|
|
required String? error,
|
|
required bool copying,
|
|
required String? copyStatus,
|
|
required VoidCallback onCopy,
|
|
required ApiGateway gateway,
|
|
required ValueChanged<JsonMap> onRunChanged,
|
|
required String configuredEndpoint,
|
|
String? initialStageKey,
|
|
int? initialVisit,
|
|
}) {
|
|
return RunDetailTabs(
|
|
run: run,
|
|
cupertino: false,
|
|
copying: copying,
|
|
copyStatus: copyStatus,
|
|
onCopy: onCopy,
|
|
gateway: gateway,
|
|
onRunChanged: onRunChanged,
|
|
configuredEndpoint: configuredEndpoint,
|
|
initialStageKey: initialStageKey,
|
|
initialVisit: initialVisit,
|
|
// A glass strip under the top bar: as wide as its content.
|
|
header: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(12, 4, 12, 4),
|
|
child: Wrap(
|
|
spacing: 12,
|
|
runSpacing: 4,
|
|
crossAxisAlignment: WrapCrossAlignment.center,
|
|
children: [
|
|
RunStatusKicker(
|
|
state: runStateOf(run['status']),
|
|
label: runStatusLabel(run),
|
|
),
|
|
headerActions,
|
|
],
|
|
),
|
|
),
|
|
if (detailLoading) const _Notice('Refreshing run details…'),
|
|
if (error != null) _Notice(error),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
class _Notice extends StatelessWidget {
|
|
const _Notice(this.text);
|
|
final String text;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => Padding(
|
|
padding: const EdgeInsets.fromLTRB(12, 0, 12, 8),
|
|
child: Semantics(liveRegion: true, child: Text(text)),
|
|
);
|
|
}
|