Miler rider app: surface system, visible design language, backend lifecycle
Design system - MilerSurface ladder (canvas → working → raised → floating) with MilerPanel as layer 1; canvas moved to #DEE3EA so white separates at 1.290:1. - Visible vocabulary applied across Home, Deliveries, Activity, Account and the sheets: hero heads (tabular numeral + small caption, clamped at 1.3x), canvas wells for anything that opens, small filled tags for shelf labels, demoted placeholders. Recorded in DESIGN_SYSTEM.md §6. - One icon family: 222 Material glyphs migrated to Lucide; none left outside lib/xpress. - Colour semantics corrected: amber only for what is genuinely owed, brand red reserved for the live stop, disabled primaries go neutral rather than pale. Data and lifecycle - lib/data/lifecycle.dart reads mutations for what they prove; route_order.dart makes admin sequence the single ordering authority; service_day.dart, and stop_area.dart rewritten against live Coimbatore addresses (digit-token stripping, city stoplist, street suffixes, stammer collapse). - countLabel states the load once, in bags. Testing - 1440 tests passing; golden shot harnesses for Home, Deliveries, Activity, sheets and verify, with test/failures/ now gitignored (diff debris). - New pins: home_gutter_test, stop_area_test, plus updated structural bounds. Note: this commit also carries pre-existing working-tree deletions that were present before this work (API_SPEC.md, README.md, demo test fixtures). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
@@ -93,7 +94,9 @@ void main() {
|
||||
expect(hero, greaterThan(sizeOf(tester, 'NEXT STOP')));
|
||||
expect(
|
||||
hero,
|
||||
greaterThan(sizeOf(tester, '78, Cross Cut Road, Gandhipuram, Coimbatore')),
|
||||
greaterThan(
|
||||
sizeOf(tester, '78, Cross Cut Road, Gandhipuram, Coimbatore'),
|
||||
),
|
||||
);
|
||||
expect(hero, greaterThan(sizeOf(tester, 'Green Leaf Grocers')));
|
||||
expect(hero, greaterThan(sizeOf(tester, 'Delivered · 3 stops left')));
|
||||
@@ -104,27 +107,36 @@ void main() {
|
||||
expect(hero / sizeOf(tester, 'Green Leaf Grocers'), greaterThan(1.6));
|
||||
});
|
||||
|
||||
testWidgets('finished work is quiet — grey text, green only in the tick', (
|
||||
// ── Finished work confirms, and then gets out of the way ──
|
||||
//
|
||||
// The status line was 12.5sp grey with a 16sp tick — the same treatment as
|
||||
// every other caption on the screen, so the one line confirming the act the
|
||||
// rider had just performed read as metadata about it. He does need to
|
||||
// confirm it registered; that is the entire reason the line exists.
|
||||
//
|
||||
// It is a tinted capsule now, in its semantic colour — the app's own state
|
||||
// vocabulary, shared with the route chips and the confirm sheet. What has NOT
|
||||
// changed is the ranking this test was really protecting: the capsule is
|
||||
// short and set at 13.5sp, and the next stop underneath is 28sp near-black.
|
||||
testWidgets('finished work confirms without out-ranking the next stop', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpDone(tester);
|
||||
|
||||
final status = tester.widget<Text>(find.text('Delivered · 3 stops left'));
|
||||
// Not the success colour. "Delivered" is something the rider did himself
|
||||
// thirty seconds ago; he needs to be able to confirm it, not be told it.
|
||||
expect(status.style!.color, ColorConstants.secondaryText);
|
||||
expect(status.style!.color, ColorConstants.acceptGreen);
|
||||
expect(status.style!.fontSize, lessThan(16));
|
||||
|
||||
// The tick is the whole of the green.
|
||||
final tick = tester.widget<Icon>(
|
||||
find.byIcon(Icons.check_circle_rounded).first,
|
||||
find.byIcon(LucideIcons.circleCheck).first,
|
||||
);
|
||||
expect(tick.color, ColorConstants.acceptGreen);
|
||||
|
||||
// The live destination, by contrast, is near-black.
|
||||
expect(
|
||||
tester.widget<Text>(find.text('Sundar Textiles')).style!.color,
|
||||
ColorConstants.slateText,
|
||||
);
|
||||
// The live destination is still the thing the eye lands on: near-black, and
|
||||
// twice the size of the confirmation above it.
|
||||
final next = tester.widget<Text>(find.text('Sundar Textiles'));
|
||||
expect(next.style!.color, ColorConstants.slateText);
|
||||
expect(next.style!.fontSize, greaterThan(status.style!.fontSize! * 1.8));
|
||||
});
|
||||
|
||||
testWidgets('nothing in the body is boxed', (tester) async {
|
||||
@@ -168,7 +180,7 @@ void main() {
|
||||
}
|
||||
expect(find.text('2'), findsOneWidget);
|
||||
expect(find.text('3'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.chevron_right_rounded), findsNWidgets(2));
|
||||
expect(find.byIcon(LucideIcons.chevronRight), findsNWidgets(2));
|
||||
});
|
||||
|
||||
testWidgets('the stop type is a label, not a filled badge', (tester) async {
|
||||
|
||||
Reference in New Issue
Block a user