feat(app): glass viewer bars, graph controls and immersive image viewer
Review findings F12, F13, F25 and F1 for viewers: the artifact viewer's actions/pager and the Changes pager float as glass pills over content, file facts move to the top bar, graph overlay controls are one glass pill (duplicate fullscreen glyph removed), the image viewer is immersive, and diff/artifact/graph views let content pass behind the bar. Implemented by pipeline run #204 (Terra); its Review stopped after three rejections, the last being an empty glass bar for a single unresolved artifact, which the manager fixed here with a regression test.
This commit is contained in:
@@ -10,6 +10,8 @@ import 'change_style.dart';
|
||||
import 'file_diff_viewer.dart';
|
||||
import 'visit_pager.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/adaptive/glass_pill.dart';
|
||||
import '../../../ui/adaptive/host.dart';
|
||||
|
||||
/// The run's Changes surface: an honest final-state summary followed by the
|
||||
/// recorded stage/visit captures, with changed-filename filtering and the
|
||||
@@ -105,12 +107,24 @@ class _ChangesViewerState extends State<ChangesViewer> {
|
||||
);
|
||||
final note = showSummary ? runChangesNote(run) : '';
|
||||
final visit = captures.isEmpty ? null : captures[_visitIndex];
|
||||
return Column(
|
||||
final hasVisitPager = !widget.finalOnly && captures.length > 1;
|
||||
final pager = hasVisitPager
|
||||
? ChangesVisitPager(
|
||||
index: _visitIndex,
|
||||
count: captures.length,
|
||||
onPrevious: () => _stepVisit(-1),
|
||||
onNext: () => _stepVisit(1),
|
||||
)
|
||||
: null;
|
||||
final content = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (showSummary)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 16, 16, 8),
|
||||
padding: withTopBarClearance(
|
||||
context,
|
||||
const EdgeInsets.fromLTRB(16, 16, 16, 8),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -149,7 +163,7 @@ class _ChangesViewerState extends State<ChangesViewer> {
|
||||
Expanded(
|
||||
child: run.files.isEmpty
|
||||
? SingleChildScrollView(
|
||||
padding: withFloatingBarClearance(
|
||||
padding: withTopBarClearance(
|
||||
context,
|
||||
const EdgeInsets.all(16),
|
||||
),
|
||||
@@ -175,10 +189,9 @@ class _ChangesViewerState extends State<ChangesViewer> {
|
||||
Expanded(
|
||||
child: visit == null
|
||||
? SingleChildScrollView(
|
||||
padding: withFloatingBarClearance(
|
||||
context,
|
||||
const EdgeInsets.all(16),
|
||||
),
|
||||
padding: pager == null
|
||||
? withTopBarClearance(context, const EdgeInsets.all(16))
|
||||
: withBarClearance(context, const EdgeInsets.all(16)),
|
||||
child: Text(noChangeDetail(run)),
|
||||
)
|
||||
: SingleChildScrollView(
|
||||
@@ -187,7 +200,9 @@ class _ChangesViewerState extends State<ChangesViewer> {
|
||||
key: ValueKey<String>(
|
||||
'changes-visit-${visit.stage}-${visit.sequence}',
|
||||
),
|
||||
padding: withFloatingBarClearance(context, EdgeInsets.zero),
|
||||
padding: hasVisitPager
|
||||
? withBarClearance(context, EdgeInsets.zero)
|
||||
: withTopBarClearance(context, EdgeInsets.zero),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -208,15 +223,19 @@ class _ChangesViewerState extends State<ChangesViewer> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// Previous/next visit sit at the bottom right, under the visit.
|
||||
if (!widget.finalOnly && visit != null)
|
||||
ChangesVisitPager(
|
||||
index: _visitIndex,
|
||||
count: captures.length,
|
||||
onPrevious: () => _stepVisit(-1),
|
||||
onNext: () => _stepVisit(1),
|
||||
),
|
||||
],
|
||||
);
|
||||
if (pager == null) return content;
|
||||
return FloatingBarOverlay(
|
||||
bar: Align(
|
||||
alignment: AlignmentDirectional.centerEnd,
|
||||
heightFactor: 1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: GlassPill(cupertino: usesCupertinoHost(context), child: pager),
|
||||
),
|
||||
),
|
||||
child: content,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user