merge(app): land run action styles

This commit is contained in:
2026-10-23 12:48:00 +01:00
9 changed files with 27 additions and 13 deletions
@@ -58,12 +58,13 @@ class RunArtifactsButton extends StatelessWidget {
);
if (usesCupertinoHost(context)) {
return CupertinoButton.tinted(
sizeStyle: CupertinoButtonSize.small,
key: runArtifactsButtonKey,
onPressed: open,
child: const Text(artifactGalleryTitle),
);
}
return FilledButton.tonalIcon(
return OutlinedButton.icon(
key: runArtifactsButtonKey,
onPressed: open,
icon: const Icon(Icons.inventory_2_outlined),
@@ -104,14 +104,20 @@ class _CancelRunActionState extends State<CancelRunAction> {
return const SizedBox.shrink();
}
if (_usesCupertino(context)) {
return CupertinoButton.filled(
// The web tints Cancel as the one destructive run action.
return CupertinoButton.tinted(
sizeStyle: CupertinoButtonSize.small,
key: cancelActionKey,
color: CupertinoColors.systemRed,
onPressed: _open,
child: const Text(cancelActionLabel),
);
}
return FilledButton(
return OutlinedButton(
key: cancelActionKey,
style: OutlinedButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.error,
),
onPressed: _open,
child: const Text(cancelActionLabel),
);
@@ -120,13 +120,14 @@ class _RetryRunActionState extends State<RetryRunAction> {
return const SizedBox.shrink();
}
if (_usesCupertino(context)) {
return CupertinoButton.filled(
return CupertinoButton.tinted(
sizeStyle: CupertinoButtonSize.small,
key: retryActionKey,
onPressed: _open,
child: const Text(retryActionLabel),
);
}
return FilledButton(
return OutlinedButton(
key: retryActionKey,
onPressed: _open,
child: const Text(retryActionLabel),
@@ -81,7 +81,8 @@ class _RunTitleActionState extends State<RunTitleAction> {
Widget build(BuildContext context) {
if (runTitleId(widget.run) == null) return const SizedBox.shrink();
if (_usesCupertino(context)) {
return CupertinoButton(
return CupertinoButton.tinted(
sizeStyle: CupertinoButtonSize.small,
key: runTitleActionKey,
onPressed: _open,
child: const Text(runTitleActionLabel),
@@ -62,7 +62,7 @@ class RunChangesButton extends StatelessWidget {
),
);
}
return FilledButton.tonalIcon(
return OutlinedButton.icon(
key: runChangesButtonKey,
onPressed: open,
icon: const Icon(Icons.difference_outlined),
@@ -33,7 +33,9 @@ class RunDetailActions extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Standard native spacing keeps adjacent outlines and fills distinct.
// Every run action uses one native style, as the web's `.run-action`:
// outlined on Material, tinted on Cupertino; Cancel alone is tinted
// destructive. Standard native spacing keeps adjacent buttons distinct.
// Only actions that render are included: a hidden zero-size child still
// consumes Wrap spacing and would double the visible gap.
Wrap(
@@ -71,7 +71,8 @@ class _ScheduleRunActionState extends State<ScheduleRunAction> {
if (!canScheduleRun(widget.run)) return const SizedBox.shrink();
final cupertino = usesCupertinoHost(context);
final action = cupertino
? CupertinoButton(
? CupertinoButton.tinted(
sizeStyle: CupertinoButtonSize.small,
key: scheduleRunActionKey,
onPressed: _open,
child: const Text(scheduleRunActionLabel),
@@ -65,7 +65,8 @@ void main() {
);
expect(find.byKey(cancelActionKey), findsOneWidget);
expect(find.byType(FilledButton), findsOneWidget);
// One native run-action style: outlined on Material.
expect(find.byType(OutlinedButton), findsOneWidget);
expect(gateway.calls, isEmpty);
await tester.tap(find.byKey(cancelActionKey));
@@ -116,7 +117,7 @@ void main() {
expect(find.byKey(cancelActionKey), findsOneWidget);
expect(find.byType(CupertinoButton), findsOneWidget);
expect(find.byType(FilledButton), findsNothing);
expect(find.byType(OutlinedButton), findsNothing);
await tester.tap(find.byKey(cancelActionKey));
await tester.pumpAndSettle();
@@ -67,7 +67,8 @@ void main() {
await pumpRetry(tester, gateway: gateway, changed: changed);
expect(find.byKey(retryActionKey), findsOneWidget);
expect(find.byType(FilledButton), findsOneWidget);
// One native run-action style: outlined on Material.
expect(find.byType(OutlinedButton), findsOneWidget);
expect(gateway.calls, isEmpty);
await tester.tap(find.byKey(retryActionKey));
@@ -162,7 +163,7 @@ void main() {
expect(find.byKey(retryActionKey), findsOneWidget);
expect(find.byType(CupertinoButton), findsOneWidget);
expect(find.byType(FilledButton), findsNothing);
expect(find.byType(OutlinedButton), findsNothing);
await tester.tap(find.byKey(retryActionKey));
await tester.pumpAndSettle();