A launch that opens in brand, and a sheet that stops resizing

── The splash, in three beats ──

Crimson edge to edge with the truck running across it in white; the invert;
then the mark.

The red starts before Flutter does. Four surfaces painted white before any
Dart runs — launch_background at both API levels, windowSplashScreenBackground
on Android 12+ in light and dark, and the iOS launch storyboard — and leaving
any one of them white makes the launch a white flash followed by a red one.
That flash is the only part of a launch a customer consciously notices.

The invert is one gesture rather than a fade. A white truck on a background
turning white is an invisible truck, so the ground lightens as the truck
darkens, off one controller, and the screen turns itself inside out with the
truck still on it. Fading it would have left the screen empty for the moment
before the mark.

The truck's colour is no longer its own: it is painted through srcIn, so the
file's palette is discarded and only alpha survives. A replacement Lottie now
needs no preparation, and tool/lottie_brand.py is off this path.

`splash.json` is a seamless 3.9s loop — frame 0 is frame 60, the truck never
arrives or departs — so there is no completion to hand over on. _truckBeat is
a decision about how long a launch may hold somebody, not a property of the
file. The comment claiming six seconds was wrong on both counts.

── Three things the splash was getting wrong quietly ──

It showed the wrong logo: doormile-icon.png, the previous mark, to a customer
who had just tapped the new one. tool/icons.py now cuts doormile-mark.png from
the same master alpha as the launcher icon, so they cannot drift again.

The fallback loader was invisible on red. _RoadLoader painted in DmColors.brand
on what used to be a white screen; on crimson that is crimson on crimson, and
it drew nothing at all on exactly the devices that had fallen back to it.

The mark appeared and left in the same frame — _minimum was the sum of the
beats exactly, so the clock ran out as the entrance finished. Hence _markHold.

── The truck was not in the middle ──

Not a layout bug: both beats sit in a Center and always did. The artwork is
drawn low and to the right inside its own 500x500 composition, so a centred
widget rendered an off-centre picture — 30pt right, 36pt down.

splash_centring_test.dart renders a frame at phone size and density, finds the
ink and fails if either beat drifts. It is the only form of test that could
have caught this, and the one that will catch it again when the Lottie is
replaced, which is when the correction goes stale. Two things it taught:
one enormous pump does not let the splash's async start-up chain advance, and
capturing at pixelRatio 1 rasterizes the speed lines too faintly to detect,
which truncates the bounding box and moves the measured centre by 12pt.

── The destination sheet stops resizing ──

Tapping ONE TOUCH opened a tall sheet that snapped shorter a few frames later.
DmAsyncList renders four skeleton rows while it loads — 302pt — and the states
that replace them are nearer 200; the sheet was Flexible, so it was as tall as
whichever state its content happened to be in, and the modal is still
animating up while that swap happens.

The list now lives in a box of one height. That also removes a second resize:
the sheet grew from 48% of the screen to 74% when a state was picked. Both
steps now measure 64% and it never changes size again.

And DmAsyncList takes initialItems, fed by AppState.cachedCities: FutureBuilder
reports `waiting` on its first build even for an already-complete future, so a
warm cache still flashed a skeleton over data it already had.

Three skeleton rows here rather than four — sheet_stability_test caught that
302pt overflows the smallest box the clamp can produce.
This commit is contained in:
2026-09-28 12:54:03 +05:30
parent 49b0de0d8f
commit 8427824951
41 changed files with 772 additions and 132 deletions

View File

@@ -50,6 +50,12 @@ distinctive thing on the mark and the first thing a circular mask would take.
but the alpha channel, so a full-colour foreground themes as a solid blob. The
monochrome asset is the same silhouette with the colour thrown away.
**The splash** gets the mark on its own, crimson on transparent. Not a
separate export: the splash used to show a logo
file that was nobody's job to keep in step, and by the time the launcher icon
was redrawn it was showing the previous mark to a customer who had just tapped
the new one. Both come off this master's alpha, so they cannot drift.
**Web** gets both — a plain icon that is the artwork, and a `maskable` one
padded the way Android's is, for the same reason.
"""
@@ -397,12 +403,55 @@ def build_web(flat: Image.Image, field: tuple[int, int, int]) -> None:
write(resize(flat, favicon.width), os.path.join(out, 'favicon.png'))
# How much of the mark's own canvas is margin, in the splash cut-outs.
#
# Tighter than the launcher icon, which has a mask eating its edges. Nothing
# crops these — the splash sizes them directly — so the margin only has to stop
# the strokes touching the box.
MARK_PAD = 0.06
def build_marks(placed: Image.Image, field: tuple[int, int, int]) -> None:
"""The mark alone, on transparent, in the field's own crimson.
Cropped to the ink and re-padded, so the splash can size the file and get
the mark at that size rather than at whatever fraction of it the master's
own padding left over.
"""
out = os.path.join(ROOT, 'assets/images')
alpha = placed.split()[3]
box = alpha.point(lambda a: 255 if a > 8 else 0).getbbox()
if box is None:
raise SystemExit('no mark to cut')
x0, y0, x1, y1 = box
side = max(x1 - x0, y1 - y0)
pad = round(side * MARK_PAD)
side += pad * 2
cx, cy = (x0 + x1) / 2, (y0 + y1) / 2
cut = alpha.crop((
round(cx - side / 2), round(cy - side / 2),
round(cx + side / 2), round(cy + side / 2),
)).resize((1024, 1024), Image.LANCZOS)
log('Splash marks')
for name, rgb in (('doormile-mark.png', field),):
layer = Image.merge('RGBA', (
Image.new('L', cut.size, rgb[0]),
Image.new('L', cut.size, rgb[1]),
Image.new('L', cut.size, rgb[2]),
cut,
))
write(layer, os.path.join(out, name))
def main() -> None:
flat, placed, field, radius = build_master()
build_ios(flat)
build_android_legacy(flat)
build_android_adaptive(placed, radius)
build_android_xml(field)
build_marks(placed, field)
build_web(flat, field)
log('\ndone')

View File

@@ -8,8 +8,9 @@ python3 - <<'PY'
import shutil, os
src, dst = 'test/snapshots', 'design/screens'
pairs = [
('00-splash-animation.png', '00-splash-animation.png'),
('00b-splash-mark.png', '00b-splash-mark.png'),
('00-splash-truck.png', '00-splash-truck.png'),
('00b-splash-invert.png', '00b-splash-invert.png'),
('00c-splash-mark.png', '00c-splash-mark.png'),
('01-sign-in.png', '01-sign-in.png'),
('01b-sign-up.png', '02-sign-up.png'),
('02-verify.png', '03-verify-code.png'),