Commit Graph

43 Commits

Author SHA1 Message Date
Jonas Bark
a8c18633e0 fix(store): show a finished setup on the home board, and stop the corner eating the status bar
Four things the first pass got wrong.

The home screen is the first board on the listing, and it was advertising
an unconfigured app: an amber "3 steps left — Controller & Trainer app
still need setting up" banner, nine controller cards (the set the card
goldens further down need, not a rider's bars), a steering gauge reading
"Calibrating…" where the Click V2's contour belongs, and an "Unlock it
with Zwift" card. The scene now runs with one controller — the Click V2,
which `screenshotMode` already shows as "Controller" — its unlock-mode
choice made and its unlock persisted, the trainer bridged and the
MyWhoosh Link connected. Every one of those buys off a step the home
chain was counting, so the banner is green and the controller card draws
its contour.

The device's corner radius was a fraction of the viewport WIDTH, which is
fine on a portrait phone and wrong on a landscape tablet: 78 logical
units on the 917-wide iPad viewport, where golden_screenshot's status bar
image puts the battery 23 units in from the right. It ate the battery.
Radius and bezel now scale off the viewport's SHORT side — a bezel is a
physical property of the device, not of the orientation it is held in —
and phones and tablets get their own radius fractions, because a real
phone is dramatically rounder than a real tablet. store_board_test.dart
holds every slot's corner arc clear of that status bar corner, with the
insets measured off the package's own topbar assets.

Version to 6.4.2+146, which the boards print in the overview header — the
fixture was still claiming 6.1.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 14:09:42 +02:00
Jonas Bark
b805019ec7 feat(store): refresh the App Store / Play Store screenshot boards
Ports the marketing board BikeOtter moved to, onto the slots and scenes
this project already emits. The board is now written entirely in
fractions of the canvas — the five board slots are 440x956, 414x896,
1280x800, 917x688 and 853x533 logical, so anything in pixels lands
somewhere different on each.

The look:
  * gradient corner to corner instead of straight down, so the board has
    a light side and a dark side rather than a horizon;
  * a white radial glow under everything — the falloff is what makes it
    read, so it holds better than half its strength through the inner
    half before dropping;
  * the device tilted -3 degrees, with the rotation's overhang taken off
    the top so the painted top edge still lands at the band foot (a
    Transform resizes nothing);
  * the bezel as padding rather than a foregroundDecoration border,
    which used to eat 8 logical px of app on every edge and clip the app
    bar at tablet width; plus a drop shadow and a bottom bleed, so the
    board reads as a product shot;
  * one accent phrase per headline in a light cyan from the brand
    family — always the subject of the claim, never the verb;
  * a 24-degree hue ramp across the listing, so six boards read as a
    series instead of one image repeated.

Marketing copy and the brand style move to test/store_copy.dart, and the
slot table to custom_frame.dart, so the new board tests can read both
without booting the app. Two French headlines were shortened to fit the
character cap.

test/store_board_test.dart asserts the composition arithmetically on
every slot — the goldens are generated on demand and the suite that
writes them is tagged out of a normal run, so nothing else looks at the
layout, and its failure mode is silent.

Note: regenerating also picked up app-content drift on the `device`
scene (the "3 steps left" banner, a Calibrating gauge and the "Unlock it
with Zwift" card). That is the redesigned home screen reacting to the
marketing fixture's state, not the board change, and still needs a
decision on what that scene should feature.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 13:19:47 +02:00
Jonas Bark
0808a49f27 test: the screenshot suites are generators, not tests — skip them by default
test/screenshot_test.dart and the five *_snapshot_test.dart files render PNGs
for the app stores, the blog and the docs. Only screenshot_test.dart asserts
anything, and what it asserts is a golden that flaps between machines; the rest
have no expectations at all. They are also the slowest files in the suite —
real fonts, real themes, one render per locale.

Tag them `screenshots` and skip that tag from dart_test.yaml, which flutter test
does read. The skip lands at suite level, so main() never runs and the snapshot
harness bootstrap is never paid. Regenerate with --run-skipped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 19:51:22 +02:00
Jonas Bark
b99d54f6ee screenshots, changelog adjustments 2026-06-30 09:51:46 +02:00
Jonas Bark
9116688d63 fix(shifting): apply front-derailleur settings live; bound chainrings; handle combo errors
- FrontShiftCard now applies its toggle/chainring changes to the live
  FitnessBikeDefinition (not just the persisted config), so enabling the
  virtual front derailleur takes effect immediately instead of only after a
  reconnect/mode-switch — the combo gate read the config while the action
  checked the def, so the just-enabled feature reported itself disabled.
- Bound the small-ring stepper to the large ring so small can't exceed large
  (which inverted the ratio and made the shift a no-op).
- Error-handle the fire-and-forget front-shift combo so a throw is recorded
  instead of becoming an unobserved async error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 19:58:26 +02:00
Jonas Bark
137481ff77 test: localized overview/main-screen goldens (real device names) for 6 controllers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:55:54 +02:00
Jonas Bark
7e9a81dae4 test: render real per-app connection-method tiles for Rouvy & TrainingPeaks snapshots
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:36:59 +02:00
Jonas Bark
20e8f9e7fe test: localized Rouvy & TrainingPeaks setup widget goldens
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:28:28 +02:00
Jonas Bark
2954deb1f2 test: full connection-card goldens (with action badges) for 8 controllers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:14:08 +02:00
Jonas Bark
3b715ebf0d test: generate MyWhoosh setup widgets per locale (en,de,es,fr,it)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 17:40:40 +02:00
Jonas Bark
646a9cfca5 test: golden scenes for MyWhoosh setup widgets
Extract the trainer-app picker into a public TrainerAppSelect widget so it
renders standalone, and add mywhoosh-trainer-select and
mywhoosh-network-connection golden scenes for the website setup guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 17:07:03 +02:00
Jonas Bark
72d9407b53 test(screenshot): blog widget snapshots for the front derailleur
Extract FrontShiftCard from the gear-ratios page so it can render in
isolation, and add two golden scenes that capture single widgets for the
6.2 blog: the front-derailleur setting card and the second-window gear
overlay (2×N notation). Each renders the widget in a keyed RepaintBoundary
for a tight, page-free capture.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 15:57:49 +02:00
Jonas Bark
743f74d03c Don't show toast popups during screenshots
Suppress the overview's alert toasts in screenshotMode and drop the Device
scene's "Connecting to:"/"Connection finished:" test notifications, so the
store screenshots no longer show a "Connecting to: Controller" popup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:51:49 +02:00
Jonas Bark
91336836ee Localize keymap strings + trial banner in screenshots
- Show the Base version in screenshots (re-assert IAPManager.isPurchased in the
  shoot() helper, which core.settings.reset() had cleared — so the overview no
  longer shows "N day trial available").
- Localize previously-hardcoded strings (en source; de/es/fr/it/pl are drafts):
  - InGameAction labels (~50): title is now a localized getter backed by
    englishTitle (Steer Right, Change Camera, Tuck, ...).
  - ButtonTrigger (Single/Double Click, Long Press).
  - Button-simulator action categories (Shifting/Steering/Other).
  - The "N day trial available" banner string.
- Regenerated all localized screenshots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:43:27 +02:00
Jonas Bark
b201cb3e53 Generate localized store screenshots (golden_screenshot 11)
- Bump golden_screenshot 8.2.0 -> ^11.0.1 (drops the Yaru dependency, hence the
  linux plugin-registrant change).
- screenshot_test.dart now renders each scene for 6 locales (en/de/es/fr/it/pl)
  via a shoot() helper, writing screenshots/<locale>/<scene>-<device>.png.
  Marketing titles are translated per locale (de/es/fr/it/pl are drafts).
  - main.dart: screenshotLocale global drives the app locale in screenshot mode
    (was hardcoded to English).
  - v11 only loads fonts found in the rendered tree, so loadAssets() runs after
    the first pump.
- Virtual Shifting scene shows the gear UI instead of the "trainer doesn't
  advertise FTMS" warning: added ProxyDevice.debugAttachFitnessBike (test seam,
  no server side-effects) and hide the MyWhoosh gearing hint in screenshot mode.
- prepare_store_screenshots.sh maps each store locale from its language folder
  (de-DE <- screenshots/de, ...).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 11:22:56 +02:00
Jonas Bark
c3683af6e3 Make screenshot golden tests runnable under the integration binding
Two infrastructure fixes so test/screenshot_test.dart runs correctly:

- golden_screenshot 8.2.0's testGoldens resets debugDisableShadows = true in
  its finally, which is only correct for the automated binding. This suite runs
  under the live IntegrationTestWidgetsFlutterBinding (needed for the real-async
  Supabase/settings bootstrap in main), whose painting-vars invariant requires
  debugDisableShadows == false — so every test failed at teardown with
  "a painting debug variable was changed by the test". Shadow a local testGoldens
  that leaves it false; shadows still enabled during capture so goldens are
  identical.
- Load AppLocalizations up front, since core.whooshLink reads
  AppLocalizations.current before any widget loads the delegate (otherwise a
  single test run in isolation throws "No instance of AppLocalizations").

Running these goldens also requires the Apple SF Pro fonts locally
(`dart run golden_screenshot:download_apple_fonts`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 21:47:38 +02:00
Jonas Bark
a795b3c681 refactor: route FBD-specific callers through emulator.fitnessBike
activeDefinition now returns the CompositeBleDefinition; consumers
that need the FitnessBikeDefinition specifically use the fitnessBike
convenience getter. Bumps prop submodule to pick up the composite
machinery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 17:55:53 +02:00
Jonas Bark
c27c65e06e screenshot adjustments 2026-04-26 11:47:54 +02:00
Jonas Bark
85fa2e023e updated screenshots 2026-03-13 20:47:27 +01:00
Jonas Bark
2e7adcc047 screenshots 2026-03-12 13:55:05 +01:00
Jonas Bark
135419e817 updated screenshots 2026-03-12 11:57:36 +01:00
Jonas Bark
511e44f6aa translations 2026-03-12 11:25:05 +01:00
Jonas Bark
92e80647d2 login with facebook, UI fixes 2026-03-06 14:40:30 +01:00
Jonas Bark
2203cb245c wrong translation 2025-12-20 18:08:13 +01:00
Jonas Bark
14e703c856 screenshots 2025-12-20 10:13:20 +01:00
Jonas Bark
e648bb3b86 screenshot fix 2025-12-18 15:39:16 +01:00
Jonas Bark
6c3e150eb1 unit test fixes 2025-12-18 15:30:14 +01:00
Jonas Bark
5a67f2ee76 remove remains of swift_control 2025-12-14 16:22:07 +01:00
Jonas Bark
dd573d207d update screenshots 2025-12-09 17:59:10 +01:00
Jonas Bark
ed5ca112c9 cleanup 2025-12-07 14:41:06 +01:00
Jonas Bark
ca4a001636 screenshot work 2025-12-06 13:42:18 +01:00
Jonas Bark
4a0b50c6be work on mDNS 2025-12-05 10:51:40 +01:00
Jonas Bark
53d1bfa875 work on screenshots 2025-12-04 21:51:16 +00:00
Jonas Bark
65a95c3826 screenshot adjustments 2025-12-01 18:14:16 +00:00
Jonas Bark
9c2a62bd94 less god objects 2025-11-29 13:12:09 +00:00
Jonas Bark
97edca6293 ignore device for session fix, logs page 2025-11-29 09:35:38 +00:00
Jonas Bark
6c8ccf425a inline permission requests, make them optional unless required 2025-11-28 22:00:48 +00:00
Jonas Bark
a6c783656a screenshot adjustments 2025-11-23 22:03:21 +00:00
Jonas Bark
d3edd5867b screenshot adjustments 2025-11-23 21:56:21 +00:00
Jonas Bark
7c33ffcdcc missing BikeControl renaming 2025-11-23 21:33:56 +00:00
Jonas Bark
9a7fcf19c7 more name change work 2025-11-23 08:08:03 +00:00
Jonas Bark
1141f12530 screenshot adjustments 2025-11-17 14:33:23 +01:00
Jonas Bark
75f7820fd3 more work on screenshots 2025-11-17 13:55:27 +01:00