Repository navigation
The first-run tour picks its script by the layout's own rule - #648
Merged
Merged
Conversation
Part of #610 (review T1). Start tour on the Welcome card chose the script with innerWidth < 768, while the layout follows MOBILE_MEDIA_QUERY: a phone held sideways got the desktop script on the phone layout, and a 721-767 px window the phone script on the desktop layout. It now reads the layout's query. Two e2e cases through the real Welcome card fail on the previous code.
Deploying cozy-loop-studio with
|
| Latest commit: |
8550fde
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4ca0ce9d.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://t1-tour-script-by-layout.cozy-loop-studio.pages.dev |
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #610 (review item T1).
What was wrong
Start touron the first-run Welcome card picked its script withinnerWidth < 768(GuidedTour.tsx:18), while the layout followsMOBILE_MEDIA_QUERY(src/ui/media.ts):max-width: 720px, ormax-height: 500pxandmax-width: 950pxwith a coarse pointer, a phone held sideways. The two disagreed in two ranges. Reproduced on mainf0415d17with a fresh browser per window, the real first-run card, andStart tourclicked:On the phone held sideways, step 1 was the desktop's "Pieces — Click one, or drag it onto the canvas, to add it" on the phone layout, which cannot edit, as a centred card with nothing highlighted.
The change
GuidedTour.tsx:PLATFORM()readsMOBILE_MEDIA_QUERY, the layout's own rule, whenStart touris pressed. The 768 rule is gone; nothing else used it.Restart the tourexists only in the desktop layout and runs the desktop script, More's only in the phone layout and runs the phone script.docs/guided-tour.md§GT3 says which rule picks the script.Out of scope, as decided:
Tests
e2e/guided-tour.spec.ts, "guided tour — the script follows the layout (review T1, #610)", two tests through the real Welcome card:Both failed on main's code (
platformwasdesktopon the phone held sideways andmobileat 740 px), and both pass now.The ten windows of the reproduction, run again on this branch: every one has the layout and the tour agreeing.
Local:
check:*script: 0 failed;tsc -b: clean;guided-tour,tour-announcement,contextual-inline-help,share,share-protected,portable-file;mobile-inspector-overlay(the tour over a selection) andmobile, whose screenshot comparisons ran against their committed images.