merge(app): land visit pane alignment

This commit is contained in:
2026-10-23 13:29:57 +01:00
5 changed files with 27 additions and 13 deletions
@@ -49,6 +49,9 @@ class PipelineDetailTabs extends StatelessWidget {
Widget _cupertinoControl() {
return CupertinoSegmentedControl<PipelineDetailTab>(
// The strip already insets 16; the control's default inset would push
// the tabs out of line with the content.
padding: EdgeInsets.zero,
groupValue: selected,
onValueChanged: onSelected,
children: {
@@ -129,7 +129,7 @@ Widget runDetailFieldTab({
CupertinoListSection.insetGrouped(
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 0, 16, 16),
padding: const EdgeInsets.all(16),
child: _CupertinoSelectableText(text),
),
],
+9 -12
View File
@@ -165,18 +165,15 @@ class _RunVisitPaneState extends State<RunVisitPane> {
),
],
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(8, 0, 0, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.visit.title,
key: const Key('run-visit-title'),
style: style.heading,
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.visit.title,
key: const Key('run-visit-title'),
style: style.heading,
),
],
),
],
),
@@ -63,6 +63,9 @@ class RunVisitSectionStrip extends StatelessWidget {
);
Widget _cupertinoControl() => CupertinoSegmentedControl<RunVisitSection>(
// The strip already insets 16; the control's default inset would push
// the tabs out of line with the content.
padding: EdgeInsets.zero,
groupValue: selected,
onValueChanged: onSelected,
children: {
@@ -31,6 +31,17 @@ void main() {
}
expect(find.text('Verdict'), findsOneWidget);
expect(find.text('Diagnostic'), findsOneWidget);
// The title, its facts and the section tabs share one leading edge; the
// Cupertino control's own default inset used to push the tabs 16 in.
final title = tester.getTopLeft(find.text('plan · visit 1')).dx;
expect(
tester.getTopLeft(find.textContaining('Status: completed')).dx,
title,
);
// A centred segment label sits ~49 in from a 16 inset control (65), but
// 81 behind the control's default 16 inset.
expect(tester.getTopLeft(find.text('Input')).dx, lessThan(title + 56));
});
testWidgets('${platform.name} duration hides without both timestamps', (