fix(app): meaning colours for common outcomes; detail pages fill the pane
Timeline outcomes: success-like words are green, failures red, rejections orange, retries/advisories amber, skips/cancellations grey; a second word of the same family takes the family's next shade and any other word a distinct hue outside the families, so different outcomes still never share a colour. Run detail, stage page and pipeline Summary no longer cap their width at 840: on an unfolded foldable the sections fill the pane. The unused ReadingWidth helper is removed.
This commit is contained in:
@@ -8,7 +8,6 @@ import '../../../shell/destination.dart';
|
||||
import '../../../shell/empty_detail_pane.dart';
|
||||
import '../../../shell/shell_bar.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/layout/reading_width.dart';
|
||||
import '../../graph/domain/graph_definition.dart';
|
||||
import '../../graph/widgets/stage_definition_view.dart';
|
||||
import '../pipeline_models.dart';
|
||||
@@ -305,20 +304,10 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
||||
);
|
||||
}
|
||||
|
||||
/// A scrolling reading body: the whole pane scrolls, the content keeps
|
||||
/// [kReadingMaxWidth] from the leading edge.
|
||||
Widget _scrolling(Widget child) => ListView(
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional.topStart,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: kReadingMaxWidth),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
);
|
||||
/// A scrolling reading body: the whole pane scrolls and the content fills
|
||||
/// its width.
|
||||
Widget _scrolling(Widget child) =>
|
||||
ListView(children: [child, const SizedBox(height: 24)]);
|
||||
|
||||
Widget _withoutDetail(BuildContext context) {
|
||||
if (!_controller.hasSelection) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/adaptive/segmented_bar.dart';
|
||||
import '../../../ui/adaptive/top_glass_strip.dart';
|
||||
import '../../../ui/layout/reading_width.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -377,15 +376,8 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
|
||||
);
|
||||
final body = KeyedSubtree(
|
||||
key: ValueKey('run-detail-body-${widget.run['id']}'),
|
||||
// Reading tabs keep a readable width on a wide window; canvases,
|
||||
// viewers and the gallery keep the whole pane.
|
||||
child: switch (shown) {
|
||||
RunDetailTab.summary ||
|
||||
RunDetailTab.input ||
|
||||
RunDetailTab.output ||
|
||||
RunDetailTab.timeline => ReadingWidth(child: _body(shown)),
|
||||
_ => _body(shown),
|
||||
},
|
||||
// Every tab fills the pane, on a phone and an unfolded foldable alike.
|
||||
child: _body(shown),
|
||||
);
|
||||
if (edge == FloatingBarEdge.top &&
|
||||
constraints.maxWidth >= kRunDetailWideChromeMinWidth) {
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/api_gateway.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/layout/reading_width.dart';
|
||||
import 'run_detail_content.dart';
|
||||
import 'run_detail_visit_facts_view.dart';
|
||||
import 'run_detail_visit_sections.dart';
|
||||
@@ -73,31 +72,23 @@ class _RunVisitPaneState extends State<RunVisitPane> {
|
||||
selected: _section,
|
||||
onSelected: (section) => setState(() => _section = section),
|
||||
),
|
||||
// Reading sections keep a readable width on a wide window; the
|
||||
// gallery and the changes viewer keep the whole page.
|
||||
child: _capped(
|
||||
runVisitSectionBody(
|
||||
section: _section,
|
||||
run: widget.run,
|
||||
step: widget.step,
|
||||
visitIndex: widget.visitIndex,
|
||||
stageKey: widget.visit.stage,
|
||||
runSteps: widget.runSteps,
|
||||
gateway: widget.gateway,
|
||||
onRunChanged: widget.onRunChanged,
|
||||
configuredEndpoint: widget.configuredEndpoint,
|
||||
cupertino: widget.cupertino,
|
||||
facts: RunVisitFactsView(step: widget.step),
|
||||
),
|
||||
// Every section fills the page, on a phone and an unfolded foldable.
|
||||
child: runVisitSectionBody(
|
||||
section: _section,
|
||||
run: widget.run,
|
||||
step: widget.step,
|
||||
visitIndex: widget.visitIndex,
|
||||
stageKey: widget.visit.stage,
|
||||
runSteps: widget.runSteps,
|
||||
gateway: widget.gateway,
|
||||
onRunChanged: widget.onRunChanged,
|
||||
configuredEndpoint: widget.configuredEndpoint,
|
||||
cupertino: widget.cupertino,
|
||||
facts: RunVisitFactsView(step: widget.step),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _capped(Widget body) => switch (_section) {
|
||||
RunVisitSection.artifacts || RunVisitSection.changes => body,
|
||||
_ => ReadingWidth(child: body),
|
||||
};
|
||||
}
|
||||
|
||||
/// The page bar's subtitle for a recorded visit: its per-stage visit, then the run
|
||||
|
||||
Reference in New Issue
Block a user