Merge branch 'main' into pipelines/run-20261111-1951-material-cleanup-shared-ui-primitives-65fb
# Conflicts: # app/test/features/runs/ui/run_path_mini_test.dart
This commit is contained in:
@@ -2,7 +2,6 @@ import '../../ui/adaptive/segmented_bar.dart';
|
|||||||
import '../../shell/destination.dart';
|
import '../../shell/destination.dart';
|
||||||
import '../../shell/detail_page.dart';
|
import '../../shell/detail_page.dart';
|
||||||
import '../../shell/list_detail.dart';
|
import '../../shell/list_detail.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../core/api_gateway.dart';
|
import '../../core/api_gateway.dart';
|
||||||
@@ -329,7 +328,6 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
|||||||
key: const Key('pipelines-refresh'),
|
key: const Key('pipelines-refresh'),
|
||||||
label: 'Refresh',
|
label: 'Refresh',
|
||||||
icon: Icons.refresh,
|
icon: Icons.refresh,
|
||||||
cupertinoIcon: CupertinoIcons.refresh,
|
|
||||||
onPressed: _controller.load,
|
onPressed: _controller.load,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../core/api_gateway.dart';
|
import '../../../core/api_gateway.dart';
|
||||||
@@ -176,7 +175,6 @@ class _RunPipelineActionState extends State<RunPipelineAction> {
|
|||||||
key: runPipelineActionKey,
|
key: runPipelineActionKey,
|
||||||
label: 'Run ${widget.detail.displayName}',
|
label: 'Run ${widget.detail.displayName}',
|
||||||
icon: Icons.play_arrow_rounded,
|
icon: Icons.play_arrow_rounded,
|
||||||
cupertinoIcon: CupertinoIcons.play_fill,
|
|
||||||
onPressed: _open,
|
onPressed: _open,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../ui/adaptive/segmented_bar_overflow.dart';
|
import '../../../ui/adaptive/segmented_bar_overflow.dart';
|
||||||
@@ -6,14 +5,13 @@ import '../../../ui/adaptive/segmented_bar_overflow.dart';
|
|||||||
/// One icon action in the Pipelines bar's actions pill: a Material
|
/// One icon action in the Pipelines bar's actions pill: a Material
|
||||||
/// [IconButton] with its tooltip. A narrow bar moves it into its More menu.
|
/// [IconButton] with its tooltip. A narrow bar moves it into its More menu.
|
||||||
///
|
///
|
||||||
/// [cupertinoIcon] is retained in the signature for callers that still pass
|
|
||||||
/// it; the Material icon is drawn.
|
|
||||||
Widget pipelineBarIconButton(
|
Widget pipelineBarIconButton(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required Key key,
|
required Key key,
|
||||||
required String label,
|
required String label,
|
||||||
required IconData icon,
|
required IconData icon,
|
||||||
required IconData cupertinoIcon,
|
// Compatibility for callers outside this lane; Material is always drawn.
|
||||||
|
IconData? cupertinoIcon,
|
||||||
required VoidCallback? onPressed,
|
required VoidCallback? onPressed,
|
||||||
}) {
|
}) {
|
||||||
return SegmentedOverflowAction(
|
return SegmentedOverflowAction(
|
||||||
@@ -44,7 +42,6 @@ Widget pipelineSchedulesButton(BuildContext context, VoidCallback? onPressed) =>
|
|||||||
key: const Key('pipelines-open-schedules'),
|
key: const Key('pipelines-open-schedules'),
|
||||||
label: 'Schedules',
|
label: 'Schedules',
|
||||||
icon: Icons.schedule,
|
icon: Icons.schedule,
|
||||||
cupertinoIcon: CupertinoIcons.calendar,
|
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -55,6 +52,5 @@ Widget pipelineSettingsButton(BuildContext context, VoidCallback? onPressed) =>
|
|||||||
key: const Key('pipelines-open-settings'),
|
key: const Key('pipelines-open-settings'),
|
||||||
label: 'Settings',
|
label: 'Settings',
|
||||||
icon: Icons.settings_outlined,
|
icon: Icons.settings_outlined,
|
||||||
cupertinoIcon: CupertinoIcons.gear,
|
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import '../../../core/servers/server_context.dart';
|
import '../../../core/servers/server_context.dart';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../core/api_gateway.dart';
|
import '../../../core/api_gateway.dart';
|
||||||
@@ -409,7 +408,6 @@ class _PipelineDetailPanelState extends State<PipelineDetailPanel> {
|
|||||||
? 'View runs of this pipeline'
|
? 'View runs of this pipeline'
|
||||||
: 'View runs of ${detail.name}',
|
: 'View runs of ${detail.name}',
|
||||||
icon: Icons.list_alt_outlined,
|
icon: Icons.list_alt_outlined,
|
||||||
cupertinoIcon: CupertinoIcons.list_bullet,
|
|
||||||
onPressed: widget.onViewPipelineRuns == null
|
onPressed: widget.onViewPipelineRuns == null
|
||||||
? null
|
? null
|
||||||
: () => widget.onViewPipelineRuns!(detail.id),
|
: () => widget.onViewPipelineRuns!(detail.id),
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// The detail sections: Summary, the pinned definition Graph and Source.
|
/// The detail sections: Summary, the pinned definition Graph and Source.
|
||||||
enum PipelineDetailTab {
|
enum PipelineDetailTab {
|
||||||
summary('Summary', Icons.summarize_outlined, CupertinoIcons.doc_text),
|
summary('Summary', Icons.summarize_outlined),
|
||||||
graph('Graph', Icons.hub_outlined, CupertinoIcons.flowchart),
|
graph('Graph', Icons.hub_outlined),
|
||||||
source('Source', Icons.code, CupertinoIcons.chevron_left_slash_chevron_right);
|
source('Source', Icons.code);
|
||||||
|
|
||||||
const PipelineDetailTab(this.label, this.icon, this.cupertinoIcon);
|
const PipelineDetailTab(this.label, this.icon);
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
|
|
||||||
/// The tab's glyph, the only thing the bottom bar draws (the label is its
|
/// The tab's glyph, the only thing the bottom bar draws (the label is its
|
||||||
/// accessible name); distinct from the shell's Pipelines tab beneath it.
|
/// accessible name); distinct from the shell's Pipelines tab beneath it.
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
|
|
||||||
/// Retained for callers; the Material [icon] is drawn.
|
|
||||||
final IconData cupertinoIcon;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ class _HumanDecisionActionState extends State<HumanDecisionAction> {
|
|||||||
context: context,
|
context: context,
|
||||||
run: widget.run,
|
run: widget.run,
|
||||||
gateway: widget.gateway,
|
gateway: widget.gateway,
|
||||||
cupertino: widget.cupertino ?? false,
|
|
||||||
onRunChanged: _acceptRun,
|
onRunChanged: _acceptRun,
|
||||||
isCurrent: () => _owns(decision.runId),
|
isCurrent: () => _owns(decision.runId),
|
||||||
);
|
);
|
||||||
@@ -104,7 +103,7 @@ Future<void> showRunDecisionPrompt({
|
|||||||
required JsonMap run,
|
required JsonMap run,
|
||||||
required ApiGateway gateway,
|
required ApiGateway gateway,
|
||||||
required ValueChanged<JsonMap> onRunChanged,
|
required ValueChanged<JsonMap> onRunChanged,
|
||||||
required bool cupertino,
|
bool? cupertino,
|
||||||
bool Function()? isCurrent,
|
bool Function()? isCurrent,
|
||||||
}) async {
|
}) async {
|
||||||
final decision = pendingDecision(run);
|
final decision = pendingDecision(run);
|
||||||
@@ -118,7 +117,6 @@ Future<void> showRunDecisionPrompt({
|
|||||||
await showHumanDecisionPrompt(
|
await showHumanDecisionPrompt(
|
||||||
context: context,
|
context: context,
|
||||||
decision: decision,
|
decision: decision,
|
||||||
cupertino: cupertino,
|
|
||||||
onSubmit: submission.submit,
|
onSubmit: submission.submit,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ typedef DecisionSubmit = Future<ActionRefusal?> Function(DecisionDraft draft);
|
|||||||
Future<void> showHumanDecisionPrompt({
|
Future<void> showHumanDecisionPrompt({
|
||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
required PendingDecision decision,
|
required PendingDecision decision,
|
||||||
required bool cupertino,
|
bool? cupertino,
|
||||||
required DecisionSubmit onSubmit,
|
required DecisionSubmit onSubmit,
|
||||||
}) {
|
}) {
|
||||||
final prompt = _DecisionPrompt(decision: decision, onSubmit: onSubmit);
|
final prompt = _DecisionPrompt(decision: decision, onSubmit: onSubmit);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import '../../shell/destination.dart';
|
|||||||
import '../../shell/detail_page.dart';
|
import '../../shell/detail_page.dart';
|
||||||
import '../../shell/empty_detail_pane.dart';
|
import '../../shell/empty_detail_pane.dart';
|
||||||
import '../../shell/list_detail.dart';
|
import '../../shell/list_detail.dart';
|
||||||
import '../../ui/adaptive/host.dart';
|
|
||||||
import '../attention/notify/notification_controller.dart';
|
import '../attention/notify/notification_controller.dart';
|
||||||
import '../../ui/layout/content_width.dart';
|
import '../../ui/layout/content_width.dart';
|
||||||
import '../attention/runtime/attention_controller.dart';
|
import '../attention/runtime/attention_controller.dart';
|
||||||
@@ -219,7 +218,6 @@ class _RunsScreenState extends State<RunsScreen> {
|
|||||||
run: current,
|
run: current,
|
||||||
gateway: widget.gateway,
|
gateway: widget.gateway,
|
||||||
onRunChanged: controller.acceptRunDetail,
|
onRunChanged: controller.acceptRunDetail,
|
||||||
cupertino: usesCupertinoHost(context),
|
|
||||||
isCurrent: () => mounted && controller.selectedRunId == selected,
|
isCurrent: () => mounted && controller.selectedRunId == selected,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart' show CupertinoColors;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../core/api_gateway.dart';
|
import '../../../core/api_gateway.dart';
|
||||||
@@ -26,7 +25,7 @@ class RunDecisionNotice extends StatelessWidget {
|
|||||||
// colour, the title over its meta line, and the action on the trailing
|
// colour, the title over its meta line, and the action on the trailing
|
||||||
// edge. The strip is already the frame, so the banner draws no card,
|
// edge. The strip is already the frame, so the banner draws no card,
|
||||||
// border or tint of its own.
|
// border or tint of its own.
|
||||||
final color = CupertinoColors.systemTeal.resolveFrom(context);
|
final color = Theme.of(context).colorScheme.tertiary;
|
||||||
final metaStyle = Theme.of(context).textTheme.bodySmall;
|
final metaStyle = Theme.of(context).textTheme.bodySmall;
|
||||||
return Container(
|
return Container(
|
||||||
key: const Key('run-decision-banner'),
|
key: const Key('run-decision-banner'),
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// The run-detail sections in the web's order: Summary first, the run Graph
|
/// The run-detail sections in the web's order: Summary first, the run Graph
|
||||||
@@ -8,23 +7,17 @@ import 'package:flutter/material.dart';
|
|||||||
/// are the same words. `renderedRunDetailTabs` decides which keys the strip
|
/// are the same words. `renderedRunDetailTabs` decides which keys the strip
|
||||||
/// draws, so Input and Output stay addressable without being tabs.
|
/// draws, so Input and Output stay addressable without being tabs.
|
||||||
enum RunDetailTab {
|
enum RunDetailTab {
|
||||||
summary('Summary', Icons.summarize_outlined, CupertinoIcons.doc_text),
|
summary('Summary', Icons.summarize_outlined),
|
||||||
graph('Graph', Icons.account_tree_outlined, CupertinoIcons.arrow_branch),
|
graph('Graph', Icons.account_tree_outlined),
|
||||||
input('Input', Icons.input, CupertinoIcons.arrow_down_doc),
|
input('Input', Icons.input),
|
||||||
output('Output', Icons.output, CupertinoIcons.arrow_up_doc),
|
output('Output', Icons.output),
|
||||||
timeline('Timeline', Icons.timeline, CupertinoIcons.list_bullet),
|
timeline('Timeline', Icons.timeline),
|
||||||
artifacts('Artifacts', Icons.inventory_2_outlined, CupertinoIcons.cube_box),
|
artifacts('Artifacts', Icons.inventory_2_outlined),
|
||||||
changes(
|
changes('Changes', Icons.difference_outlined);
|
||||||
'Changes',
|
|
||||||
Icons.difference_outlined,
|
|
||||||
CupertinoIcons.arrow_right_arrow_left,
|
|
||||||
);
|
|
||||||
|
|
||||||
const RunDetailTab(this.label, this.icon, this.cupertinoIcon);
|
const RunDetailTab(this.label, this.icon);
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
|
|
||||||
/// The tab's glyph, so a tab is recognisable at a glance.
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final IconData cupertinoIcon;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
@@ -18,30 +17,20 @@ import '../../../ui/adaptive/floating_bar_layout.dart';
|
|||||||
/// client follows: the turn's Input and Output, its Artifacts, the files this
|
/// client follows: the turn's Input and Output, its Artifacts, the files this
|
||||||
/// visit changed, its Session and the authored Definition.
|
/// visit changed, its Session and the authored Definition.
|
||||||
enum RunVisitSection {
|
enum RunVisitSection {
|
||||||
summary('Summary', Icons.summarize_outlined, CupertinoIcons.doc_text),
|
summary('Summary', Icons.summarize_outlined),
|
||||||
more('More', Icons.more_horiz, CupertinoIcons.ellipsis_circle),
|
more('More', Icons.more_horiz),
|
||||||
input('Input', Icons.input, CupertinoIcons.arrow_down_doc),
|
input('Input', Icons.input),
|
||||||
output('Output', Icons.output, CupertinoIcons.arrow_up_doc),
|
output('Output', Icons.output),
|
||||||
artifacts('Artifacts', Icons.inventory_2_outlined, CupertinoIcons.cube_box),
|
artifacts('Artifacts', Icons.inventory_2_outlined),
|
||||||
changes(
|
changes('Changes', Icons.difference_outlined),
|
||||||
'Changes',
|
session('Session', Icons.forum_outlined),
|
||||||
Icons.difference_outlined,
|
definition('Definition', Icons.description_outlined);
|
||||||
CupertinoIcons.arrow_right_arrow_left,
|
|
||||||
),
|
|
||||||
session('Session', Icons.forum_outlined, CupertinoIcons.text_bubble),
|
|
||||||
definition(
|
|
||||||
'Definition',
|
|
||||||
Icons.description_outlined,
|
|
||||||
CupertinoIcons.doc_plaintext,
|
|
||||||
);
|
|
||||||
|
|
||||||
const RunVisitSection(this.label, this.icon, this.cupertinoIcon);
|
const RunVisitSection(this.label, this.icon);
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
|
|
||||||
/// The section's glyph, so a tab is recognisable at a glance.
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final IconData cupertinoIcon;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The stage page's tabs: the app's floating glass tab bar, full width on a
|
/// The stage page's tabs: the app's floating glass tab bar, full width on a
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Material cleanup: runs and pipelines
|
||||||
|
|
||||||
|
- Removed Cupertino imports, alternate icon metadata, and the Cupertino
|
||||||
|
separator/teal color use from the assigned runs and pipelines widgets.
|
||||||
|
- Kept `pipelineBarIconButton`'s optional ignored `cupertinoIcon` parameter for
|
||||||
|
callers in other feature lanes; it has no rendering effect and can be removed
|
||||||
|
after those callers migrate.
|
||||||
|
- Updated the mirrored path and icon-bar tests to assert Material-rendered
|
||||||
|
behavior without Cupertino expectations.
|
||||||
|
- Focused checks: `tool/memwatch/full.sh` with the four affected feature tests
|
||||||
|
plus `test/ui/adaptive/icon_only_tab_bars_test.dart`: 28 passed, 0 failed.
|
||||||
|
- Analyzer: `tool/analyze.sh` clean.
|
||||||
|
- No UI redesign or capture was performed; changes preserve existing layout and
|
||||||
|
interactions apart from removing unused alternate-host data.
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:pipelines_app/features/runs/ui/run_path_mini.dart';
|
import 'package:pipelines_app/features/runs/ui/run_path_mini.dart';
|
||||||
|
import 'package:pipelines_app/ui/status/run_status_icon.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final run = {
|
final run = {
|
||||||
@@ -44,7 +45,13 @@ void main() {
|
|||||||
final scheme = Theme.of(
|
final scheme = Theme.of(
|
||||||
tester.element(find.byKey(const Key('run-path-mini'))),
|
tester.element(find.byKey(const Key('run-path-mini'))),
|
||||||
).colorScheme;
|
).colorScheme;
|
||||||
expect(colors, contains(scheme.tertiary.toARGB32()));
|
expect(
|
||||||
expect(colors, contains(scheme.error.toARGB32()));
|
colors,
|
||||||
|
contains(runStatusColor('succeeded', scheme).toARGB32()),
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
colors,
|
||||||
|
contains(runStatusColor('failed', scheme).toARGB32()),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,19 +119,12 @@ void main() {
|
|||||||
final shell = {
|
final shell = {
|
||||||
for (final destination in shellTabDestinations) ...[
|
for (final destination in shellTabDestinations) ...[
|
||||||
destinationDetails(destination).icon,
|
destinationDetails(destination).icon,
|
||||||
destinationDetails(destination).cupertinoIcon,
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
final details = [
|
final details = [
|
||||||
for (final tab in renderedRunDetailTabs) ...[tab.icon, tab.cupertinoIcon],
|
for (final tab in renderedRunDetailTabs) tab.icon,
|
||||||
for (final section in shownVisitSections) ...[
|
for (final section in shownVisitSections) ...[section.icon],
|
||||||
section.icon,
|
for (final tab in PipelineDetailTab.values) tab.icon,
|
||||||
section.cupertinoIcon,
|
|
||||||
],
|
|
||||||
for (final tab in PipelineDetailTab.values) ...[
|
|
||||||
tab.icon,
|
|
||||||
tab.cupertinoIcon,
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
for (final icon in details) {
|
for (final icon in details) {
|
||||||
expect(shell.contains(icon), isFalse, reason: '$icon');
|
expect(shell.contains(icon), isFalse, reason: '$icon');
|
||||||
|
|||||||
Reference in New Issue
Block a user