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:
@@ -31,8 +31,9 @@ void main() {
|
||||
designSize: const Size(390, 844),
|
||||
builder: (_, _) => MaterialApp(
|
||||
builder: (context, child) => MediaQuery(
|
||||
data: MediaQuery.of(context)
|
||||
.copyWith(textScaler: TextScaler.linear(textScale)),
|
||||
data: MediaQuery.of(
|
||||
context,
|
||||
).copyWith(textScaler: TextScaler.linear(textScale)),
|
||||
child: child!,
|
||||
),
|
||||
home: StopVerificationPage(pickup: stop),
|
||||
@@ -42,19 +43,22 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
Map<String, dynamic> stopOf(String type, {int delivery = 0, int pickup = 0}) =>
|
||||
<String, dynamic>{
|
||||
'orderid': 'T-1',
|
||||
'type': type,
|
||||
'pickupcustomer': 'Venkateswara Traders & General Merchants',
|
||||
'pickupaddress':
|
||||
'12/3B, Second Cross Street, Ram Nagar, Near Bus Stand, '
|
||||
'Coimbatore, Tamil Nadu 641009',
|
||||
if (delivery > 0) 'deliveryqty': '$delivery',
|
||||
if (pickup > 0) 'pickupqty': '$pickup',
|
||||
'Quantity': '${pickup > 0 ? pickup : delivery}',
|
||||
'collectionamt': '2450',
|
||||
};
|
||||
Map<String, dynamic> stopOf(
|
||||
String type, {
|
||||
int delivery = 0,
|
||||
int pickup = 0,
|
||||
}) => <String, dynamic>{
|
||||
'orderid': 'T-1',
|
||||
'type': type,
|
||||
'pickupcustomer': 'Venkateswara Traders & General Merchants',
|
||||
'pickupaddress':
|
||||
'12/3B, Second Cross Street, Ram Nagar, Near Bus Stand, '
|
||||
'Coimbatore, Tamil Nadu 641009',
|
||||
if (delivery > 0) 'deliveryqty': '$delivery',
|
||||
if (pickup > 0) 'pickupqty': '$pickup',
|
||||
'Quantity': '${pickup > 0 ? pickup : delivery}',
|
||||
'collectionamt': '2450',
|
||||
};
|
||||
|
||||
for (final scale in const [1.0, 1.3, 1.5, 2.0]) {
|
||||
testWidgets('the collect leg lays out at ${scale}x', (tester) async {
|
||||
@@ -68,35 +72,37 @@ void main() {
|
||||
});
|
||||
}
|
||||
|
||||
testWidgets('the whole collect leg is reachable by scrolling',
|
||||
(tester) async {
|
||||
testWidgets('the whole collect leg is reachable by scrolling', (
|
||||
tester,
|
||||
) async {
|
||||
await pump(tester, stopOf('pickup', pickup: 2));
|
||||
|
||||
// The last section of the longest leg. If the scroll view were sized wrong
|
||||
// — which is the failure mode of a Column inside a Column inside an
|
||||
// Expanded — this would never come into view.
|
||||
await tester.dragUntilVisible(
|
||||
find.text('PICKUP CODE'),
|
||||
find.text('Pickup code'),
|
||||
find.byType(SingleChildScrollView),
|
||||
const Offset(0, -200),
|
||||
);
|
||||
expect(find.text('PICKUP CODE'), findsOneWidget);
|
||||
expect(find.text('Pickup code'), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('the action bar never scrolls away with the form',
|
||||
(tester) async {
|
||||
testWidgets('the action bar never scrolls away with the form', (
|
||||
tester,
|
||||
) async {
|
||||
await pump(tester, stopOf('pickup', pickup: 2));
|
||||
|
||||
final barAtRest = tester.getRect(find.text('Take a photo of the parcels'));
|
||||
await tester.drag(find.byType(SingleChildScrollView), const Offset(0, -400));
|
||||
await tester.drag(
|
||||
find.byType(SingleChildScrollView),
|
||||
const Offset(0, -400),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// The blocking hint lives in the pinned bar, so it is still exactly where
|
||||
// it was: what the rider must do next cannot scroll off a doorstep screen.
|
||||
expect(
|
||||
tester.getRect(find.text('Take a photo of the parcels')),
|
||||
barAtRest,
|
||||
);
|
||||
expect(tester.getRect(find.text('Take a photo of the parcels')), barAtRest);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user