mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 21:14:01 +01:00
Last of the four drifted apps. The theme was ColorScheme.fromSeed(teal) plus fifteen ad hoc colour literals that mostly bypassed it -- not one widget outside main.dart read colorScheme at all, so the seed barely affected what you saw. It now uses design_system-v0.1.0's buildLightTheme(), and the literals that have a real theme role read it off the scheme. Light, not dark, deliberately: the receipt screens carry black-on-white helper text, so inverting brightness would make it unreadable. The Colors.black54 sites are exactly those, now onSurfaceVariant. The error family maps cleanly -- Colors.red to error, red.shade50 to errorContainer with onErrorContainer text on it, and the swipe-to-delete background+icon to error/onError so the fill and the glyph drawn on it cannot drift apart. The four category dots (deepOrange/amber/blueGrey/teal) stay literals, with a comment saying why: they encode which category an item is, not a theme role, and a single-accent system has no four distinct hues to lend them. Mapping them onto primary/secondary/tertiary would make the categories stop being distinguishable, which is their only job. They are tracked in nielsen-audit.md as needing a categorical ramp. Note this decouples the default dot from the old seed -- both were Colors.teal, so they used to match by coincidence rather than by design. Verified: 60/60 tests, 100% line coverage across 11 lib files, analyze clean apart from four pre-existing unnecessary_unawaited infos. A temporary assertion pumped the real app and read primary=ffb8862e and surface=fff6f4f3 off a live Scaffold, confirming the palette changed rather than merely compiling. Colour literals: 15 -> 4. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XS1m7b1piBtAL22USLW6jL
21 lines
2.3 KiB
JSON
21 lines
2.3 KiB
JSON
{
|
|
"title": "billsplit adopts the shared design_system palette",
|
|
"objective": "billsplit is the last of four Flutter apps that had drifted off the frozen palette. It renders from a teal-seeded ColorScheme plus fifteen ad hoc colour literals that largely bypass the theme entirely. Success is billsplit rendering from design_system-v0.1.0's buildLightTheme(), with every literal that carries a theme role reading it off the ColorScheme instead, and with no behavioural, layout or coverage regression.",
|
|
"acceptance_criteria": [
|
|
"lib/main.dart builds its theme from design_system's buildLightTheme() rather than ColorScheme.fromSeed(seedColor: Colors.teal).",
|
|
"The rendered app's colorScheme.primary is ffb8862e and surface is fff6f4f3, proven by pumping the real BillSplitApp and reading the theme off a live element -- not by inspecting source.",
|
|
"Error-family literals map to error / onError / errorContainer / onErrorContainer; de-emphasised text maps to onSurfaceVariant.",
|
|
"The swipe-to-delete background and the icon drawn on it use error and onError respectively, so they cannot be changed independently.",
|
|
"flutter test reports 60/60 passing.",
|
|
"python3 -m python_pkg.billsplit_coverage reports 100% line coverage across all lib files.",
|
|
"flutter analyze --fatal-infos introduces no new findings beyond the pre-existing unnecessary_unawaited infos."
|
|
],
|
|
"out_of_scope": [
|
|
"Switching billsplit to a dark theme. It is light-only by design; its helper text is black-on-white and would become unreadable.",
|
|
"Mapping the four category-dot colours (deepOrange/amber/blueGrey/teal) onto ColorScheme slots. They encode category identity rather than a theme role, and a single-accent system has no four distinct hues for them. Recorded in unified-design-system/nielsen-audit.md as needing a categorical ramp instead.",
|
|
"Fixing the pre-existing unnecessary_unawaited analyzer infos, which come from SDK drift and are present across several repos.",
|
|
"Any change to split logic, e-paragon parsing, xlsx export, or app state."
|
|
],
|
|
"verifier": "flutter analyze --fatal-infos && flutter test (60/60) && python3 -m python_pkg.billsplit_coverage (100%, 11 files), plus a temporary widget test asserting primary=ffb8862e and surface=fff6f4f3 on the pumped app, deleted after it passed. CI re-runs the first three via .github/workflows/billsplit-ci.yml."
|
|
}
|