merge(app): land diagnostic collapsible
This commit is contained in:
@@ -212,37 +212,30 @@ Widget _summaryFacts(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A long recorded block (the Diagnostic) starts collapsed under its label.
|
||||||
Widget _materialBlock(BuildContext context, DetailSummaryRow row) {
|
Widget _materialBlock(BuildContext context, DetailSummaryRow row) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return Padding(
|
return ExpansionTile(
|
||||||
key: ValueKey('run-detail-summary-${_slug(row.label)}'),
|
key: ValueKey('run-detail-summary-${_slug(row.label)}'),
|
||||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
title: Text(row.label),
|
||||||
child: Column(
|
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
childrenPadding: const EdgeInsetsDirectional.fromSTEB(16, 0, 16, 16),
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Container(
|
||||||
row.label,
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: theme.colorScheme.surfaceContainerHighest,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: SelectableText(
|
||||||
|
row.value,
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
style: theme.textTheme.bodySmall?.copyWith(
|
||||||
color: theme.colorScheme.onSurfaceVariant,
|
fontFamily: appMonospaceFamily,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
),
|
||||||
Container(
|
],
|
||||||
width: double.infinity,
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: theme.colorScheme.surfaceContainerHighest,
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: SelectableText(
|
|
||||||
row.value,
|
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
|
||||||
fontFamily: appMonospaceFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,36 +272,28 @@ Widget _cupertinoIdentity(BuildContext context, String identity) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A long recorded block (the Diagnostic) starts collapsed under its label.
|
||||||
Widget _cupertinoBlock(BuildContext context, DetailSummaryRow row) {
|
Widget _cupertinoBlock(BuildContext context, DetailSummaryRow row) {
|
||||||
final theme = CupertinoTheme.of(context);
|
final theme = CupertinoTheme.of(context);
|
||||||
return Padding(
|
return CupertinoExpansionTile(
|
||||||
key: ValueKey('run-detail-summary-${_slug(row.label)}'),
|
key: ValueKey('run-detail-summary-${_slug(row.label)}'),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16, 12, 16, 12),
|
title: Text(row.label),
|
||||||
child: Column(
|
child: Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsetsDirectional.fromSTEB(16, 0, 16, 16),
|
||||||
children: [
|
child: Container(
|
||||||
Text(
|
width: double.infinity,
|
||||||
row.label,
|
padding: const EdgeInsets.all(12),
|
||||||
style: theme.textTheme.tabLabelTextStyle.copyWith(
|
decoration: BoxDecoration(
|
||||||
color: CupertinoColors.secondaryLabel.resolveFrom(context),
|
color: CupertinoColors.tertiarySystemFill.resolveFrom(context),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
row.value,
|
||||||
|
style: theme.textTheme.textStyle.copyWith(
|
||||||
|
fontFamily: appMonospaceFamily,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
),
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: CupertinoColors.tertiarySystemFill.resolveFrom(context),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
row.value,
|
|
||||||
style: theme.textTheme.textStyle.copyWith(
|
|
||||||
fontFamily: appMonospaceFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ void main() {
|
|||||||
expect(find.text(finished!), findsOneWidget);
|
expect(find.text(finished!), findsOneWidget);
|
||||||
expect(find.text('2m 5s'), findsOneWidget);
|
expect(find.text('2m 5s'), findsOneWidget);
|
||||||
expect(find.text('run 12'), findsOneWidget);
|
expect(find.text('run 12'), findsOneWidget);
|
||||||
|
// The Diagnostic starts collapsed under its label.
|
||||||
|
expect(find.text('Traceback: boom'), findsNothing);
|
||||||
|
final diagnostic = find.text('Diagnostic');
|
||||||
|
await tester.ensureVisible(diagnostic);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await tester.tap(diagnostic);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
expect(find.text('Traceback: boom'), findsOneWidget);
|
expect(find.text('Traceback: boom'), findsOneWidget);
|
||||||
|
|
||||||
// The web run detail has no usage block, so no metrics tile is drawn.
|
// The web run detail has no usage block, so no metrics tile is drawn.
|
||||||
|
|||||||
Reference in New Issue
Block a user