merge(app): land visit pane alignment
This commit is contained in:
@@ -49,6 +49,9 @@ class PipelineDetailTabs extends StatelessWidget {
|
|||||||
|
|
||||||
Widget _cupertinoControl() {
|
Widget _cupertinoControl() {
|
||||||
return CupertinoSegmentedControl<PipelineDetailTab>(
|
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,
|
groupValue: selected,
|
||||||
onValueChanged: onSelected,
|
onValueChanged: onSelected,
|
||||||
children: {
|
children: {
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ Widget runDetailFieldTab({
|
|||||||
CupertinoListSection.insetGrouped(
|
CupertinoListSection.insetGrouped(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16, 0, 16, 16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: _CupertinoSelectableText(text),
|
child: _CupertinoSelectableText(text),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -165,18 +165,15 @@ class _RunVisitPaneState extends State<RunVisitPane> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Column(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8, 0, 0, 0),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Column(
|
children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Text(
|
||||||
children: [
|
widget.visit.title,
|
||||||
Text(
|
key: const Key('run-visit-title'),
|
||||||
widget.visit.title,
|
style: style.heading,
|
||||||
key: const Key('run-visit-title'),
|
),
|
||||||
style: style.heading,
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ class RunVisitSectionStrip extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
|
|
||||||
Widget _cupertinoControl() => CupertinoSegmentedControl<RunVisitSection>(
|
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,
|
groupValue: selected,
|
||||||
onValueChanged: onSelected,
|
onValueChanged: onSelected,
|
||||||
children: {
|
children: {
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ void main() {
|
|||||||
}
|
}
|
||||||
expect(find.text('Verdict'), findsOneWidget);
|
expect(find.text('Verdict'), findsOneWidget);
|
||||||
expect(find.text('Diagnostic'), 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', (
|
testWidgets('${platform.name} duration hides without both timestamps', (
|
||||||
|
|||||||
Reference in New Issue
Block a user