Remove Cupertino UI branches
Keep the Material-only status, text, and scale paths while preserving public signatures and the Cupertino colors still required by the status API.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# Cupertino branches out of ui/status, ui/text and ui/scale
|
||||
|
||||
The app is Material-only, so the Cupertino sides of these shared widgets never
|
||||
ran. Removed them; the Material path is unchanged.
|
||||
|
||||
## Changes
|
||||
|
||||
- `lib/ui/status/outcome_palette.dart`: `colorFor` always reads
|
||||
`Theme.of(context)` (brightness and `onSurfaceVariant`) instead of choosing a
|
||||
`CupertinoTheme`/`CupertinoColors.secondaryLabel` branch when there is no
|
||||
`MaterialApp` ancestor. Dropped the `flutter/cupertino.dart` import.
|
||||
- `lib/ui/status/run_status_icon.dart`: `RunStatusIcon` always draws
|
||||
`_materialIcon`; removed `usesCupertinoHost`, `_cupertinoIcon` and the
|
||||
`ui/adaptive/host.dart` import.
|
||||
- `lib/ui/text/markdown_source_view.dart`: `MarkdownModeSwitch` always uses the
|
||||
Material `SegmentedButton`; removed the `CupertinoSlidingSegmentedControl`
|
||||
branch, the `cupertino.dart` import and the host helper import.
|
||||
- `lib/ui/scale/ui_scale.dart`: the `UiScaleHost` doc comment names only
|
||||
`MaterialApp.builder`.
|
||||
|
||||
No public constructor or signature changed (`runStatusColor`, `RunStatusIcon`,
|
||||
`RunStatusKicker`, `MarkdownSourceView`, `MarkdownModeSwitch`, `OutcomePalette`,
|
||||
`UiScaleHost` stay as they were), so callers in other directories still compile.
|
||||
|
||||
## Cupertino that stays (Material path uses it)
|
||||
|
||||
- `runStatusColor` returns `CupertinoDynamicColor` and uses `CupertinoColors`
|
||||
(`systemGreen`, `systemRed`, `systemBlue`, `systemYellow`, `systemOrange`,
|
||||
`systemGrey`). Every caller outside these directories calls
|
||||
`.resolveFrom(context)`, so the return type and the colour values must stay
|
||||
until the later run that removes the remaining Cupertino code.
|
||||
|
||||
No `CupertinoIcons` or `Cupertino` widgets remain under the three directories.
|
||||
|
||||
## Checks
|
||||
|
||||
- `tool/memwatch/full.sh 'test/ui/status test/ui/text test/ui/scale '`:
|
||||
PASS, 19 passed, 0 failed, 0 skipped.
|
||||
- Cross-directory users of the edited widgets:
|
||||
`test/features/runs/ui/run_timeline_row_test.dart`,
|
||||
`test/features/runs/ui/runs_list_widget_test.dart`,
|
||||
`test/features/runs/ui/run_cancel_wiring_test.dart`,
|
||||
`test/features/runs/ui/run_list_row_test.dart`,
|
||||
`test/features/attention/ui/needs_you_sheet_test.dart`,
|
||||
`test/features/graph/domain/run_graph_order_test.dart`: PASS, 31 passed,
|
||||
0 failed, 0 skipped.
|
||||
- `tool/analyze.sh`: clean, exit 0 (31s).
|
||||
- `dart format` on the four edited files: 0 changed.
|
||||
|
||||
No Cupertino test variant in the matching test directories existed to delete.
|
||||
The cross-directory `for (final cupertino in [false, true])` loops host other
|
||||
lanes' still-live Cupertino branches (`AppListRow`, `RunsList`, `NeedsYouPage`,
|
||||
cancel dialogs); none asserts Cupertino-specific behaviour of the edited
|
||||
widgets, so they were kept and pass on both hosts.
|
||||
|
||||
Affected UI states: run status glyphs and kicker (light/dark), outcome chips in
|
||||
the run timeline, the run detail's kicker, the Rendered | Raw markdown switch,
|
||||
and the UI-scale host. Material rendering is unchanged; ui-review captures
|
||||
`/runs` in light and dark.
|
||||
Reference in New Issue
Block a user