Compare commits

..
37 changed files with 405 additions and 948 deletions

No files matched your search

+9 -16
View File
@@ -4,36 +4,32 @@ Explore maps your app: a screenshot of every screen, connected by the taps betwe
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/readme-hero-dark.svg">
<img alt="Explore's Map of a euxy pull request, animated: the screen cards appear row by row, the new /lane-editor/0 marked Added beside the removed /lane-editor and the modified /new-pattern, the transitions between them wipe in, then a click selects /lane-editor/0: a blue ring circles it, its transitions turn blue while the rest fade to hairlines, and the Inspector slides in on it, shown as a window on a soft stage" src="docs/screenshots/readme-hero-light.svg">
<img alt="Explore's Map of a euxy pull request, animated: the screen cards appear row by row, the new About screen marked Added among the modified Patterns screens, the transitions between them wipe in, then a click selects About, its transitions light up and the Inspector slides in on it, shown as a window on a soft stage" src="docs/screenshots/readme-hero-light.svg">
</picture>
**See a real report:** [euxy](https://explore-example--euxy.expo.app/p/rfcoic27ccgnrmzgijubxkmuzmptcrva?platform=ios), a MIDI sequencer, reviewed by Explore. It is redeployed with the current Viewer on every merge to main.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/readme-compare-dark.svg">
<img alt="The euxy New Pattern sheet wiping from its capture before the pull request to its capture after it: the suggested pattern name and the row of pattern icons differ, and those regions are outlined on the after capture" src="docs/screenshots/readme-compare-light.svg">
<img alt="The euxy Patterns screen wiping from its capture before the pull request to its capture after it: each pattern row's tempo moves out of the subtitle into its own column on the right, then the changed subtitles are outlined" src="docs/screenshots/readme-compare-light.svg">
</picture>
**Compare**: each changed screen before and after, with the changed regions outlined on the after.
**Compare**: each changed screen before and after, with the changed regions outlined.
<table>
<tr>
<td width="50%" valign="top">
<a href="docs/screenshots/readme-screens-light.png">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/readme-screens-dark.png">
<img width="100%" alt="The Screens view of a euxy review showing Changed 7 of All 19: the app/ route tree on the left, and beside it a grid of the changed screens in the same order, each with its route below the screenshot: a red dot for the removed /lane-editor, orange for the modified /new-pattern and /channel-surf, green for the new /lane-editor/0, and Changed in dark under /p and /patterns" src="docs/screenshots/readme-screens-light.png">
<img width="100%" alt="The Screens view of a euxy review: the app/ route tree on the left under Changed 9 and All 19, and a grid of screen cards beside it in the same order, each with its route below the screenshot and a dot before it: green for the new /about, orange for modified screens such as /activity-log, /settings and /patterns, red for the removed /channel-surf" src="docs/screenshots/readme-screens-light.png">
</picture>
</a>
<strong>Screens</strong>: every capture in one grid, or only the changed ones, beside the route tree, with a dot for what changed.
<strong>Screens</strong>: every capture in one grid, beside the route tree, with a dot for what changed.
</td>
<td width="50%" valign="top">
<a href="docs/screenshots/readme-pr-comment-light.png">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/readme-pr-comment-dark.png">
<img width="100%" alt="Explore's GitHub PR comment on a euxy PR: the heading 2 screens changed with a Review in Explore link; a line of links to each device's report (iPhone 17, three iPhone Duo poses and Android) and to the two commits compared; then the changed screens as a list, /tempo with the text it added and the devices it is on, fading out below" src="docs/screenshots/readme-pr-comment-light.png">
<img width="100%" alt="Explore's GitHub PR comment on a euxy PR: a heading with how many screens changed and a Review in Explore link, a line naming each device with a link to its report, and the changed screens as a short list, fading out below them" src="docs/screenshots/readme-pr-comment-light.png">
</picture>
</a>
<strong>A comment on every PR</strong>: with <a href="#set-up-ci">CI</a>, the report links and the added, removed and modified screens.
</td>
</tr>
@@ -45,9 +41,7 @@ Explore maps your app: a screenshot of every screen, connected by the taps betwe
Paste this into Claude Code, Codex, Cursor, or any tool that can fetch a URL. In the Viewer, **Hand off to AI** fills it in for you:
```text
Review the visual changes in PR #<number> of <owner>/<repo>.
Expo Explore report:
<report link>
Review the visual changes in this PR. Expo Explore report: <report link>
Fetch the link first. It explains the report's JSON API. Go through the changed screens,
compare the before and after screenshots, and tell me which changes look intended and
@@ -304,7 +298,7 @@ platforms:
easProfile: explore-android # android.buildType: apk in eas.json
```
- The workflows run one capture job per platform, and the PR gets one comment that links each platform's report and lists the changed screens of both.
- The workflows run one capture job per platform, and the PR gets one comment with a section per platform.
- A failed platform fails the check; the other platform's report still publishes.
- An Android-only app sets `app.platform: android` with no `platforms` map.
@@ -325,8 +319,7 @@ targets:
- A target takes the `app` fields it does not set, and `device.name` when it is of `app.platform`; a target of another platform sets its own `bundleId` and `easProfile` (an Android one's device defaults to `pixel_7`). `pose` is `closed`, `half-open` or `open`. `label` names it in reports (by default its device and pose).
- Ids are up to 32 lowercase letters, digits and dashes, start with a letter, and are not `base`, `head` or `report`. A config names at most 8 targets. A config with `platforms` has one target per platform, named `ios` and `android`.
- The workflows run one capture job per target. The PR comment links each target's report and says which targets a change is on, and each report links its sibling targets' reports.
- A review runs at most `capture.maxSessions` EAS Simulator sessions at once across its targets (default 5, a typical plan's limit); see the [config reference](docs/quickstart-ci.md#config-reference).
- The workflows run one capture job per target, the PR comment has a section per target, and each report links its sibling targets' reports.
- A target can also set its own `controller` and `simulator` over `capture`'s, such as Android on agent-device beside iOS targets on Argent. `--controller` and `--simulator` override every target's for one run.
- `capture --target duo-open` reviews one target on this machine; `--platform ios` the iOS ones. On your machine a review's targets run at once (at most `--parallel N`), and targets of one platform and EAS profile share each commit's build; in CI each target is its own job. A target that fails outright costs only its own report.
- A device controller that stops answering on one screen costs that route, up to three times per capture: Explore restarts the app, goes on with the next route, and records what happened in `capture-diagnostics/controller-recoveries.jsonl`.
+1 -1
View File
@@ -132,7 +132,7 @@ platforms:
easProfile: explore-android
```
Commands that capture or publish (`source:verify`, `capture:review`, `capture:baseline`, `ci:report`, `ci:publish`) take `--platform ios|android`; with one configured platform it is optional, with two it is required (`PLATFORM_REQUIRED`). `expo-explore config:platforms` prints the configured list as JSON, which the workflows use as their matrix. Artifacts carry the platform (`explore-capture-<run>-<attempt>-android`, `explore-baseline-<sha>-ios`); an iOS job still reuses an older unsuffixed baseline. The PR comment is one list of changed screens that says which platforms each is on, and a hosted preview serves both reports from one link.
Commands that capture or publish (`source:verify`, `capture:review`, `capture:baseline`, `ci:report`, `ci:publish`) take `--platform ios|android`; with one configured platform it is optional, with two it is required (`PLATFORM_REQUIRED`). `expo-explore config:platforms` prints the configured list as JSON, which the workflows use as their matrix. Artifacts carry the platform (`explore-capture-<run>-<attempt>-android`, `explore-baseline-<sha>-ios`); an iOS job still reuses an older unsuffixed baseline. The PR comment has one section per platform, and a hosted preview serves both reports from one link.
### Several devices (targets)
+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600" width="1000" height="600" role="img" aria-label="The /new-pattern screen of euxy wiping from its capture before the pull request to its capture after it, with the changed regions outlined"><style>.after{animation:wipe 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes wipe{0.00%{clip-path:inset(0 100% 0 0)}14.29%{clip-path:inset(0 100% 0 0)}37.14%{clip-path:inset(0 0 0 0)}82.86%{clip-path:inset(0 0 0 0)}97.14%{clip-path:inset(0 100% 0 0)}100.00%{clip-path:inset(0 100% 0 0)}}.divider{opacity:0;animation:divider 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes divider{0.00%{transform:translateX(0);opacity:0}11.43%{transform:translateX(0);opacity:1}14.29%{transform:translateX(0);opacity:1}37.14%{transform:translateX(248px);opacity:1}41.43%{transform:translateX(248px);opacity:0}82.86%{transform:translateX(248px);opacity:0}85.71%{transform:translateX(248px);opacity:1}97.14%{transform:translateX(0);opacity:1}100.00%{transform:translateX(0);opacity:0}}.regions{animation:regions 7s ease-in-out infinite}@keyframes regions{0.00%{opacity:0}38.57%{opacity:0}44.29%{opacity:1}51.43%{opacity:.3}58.57%{opacity:1}81.43%{opacity:1}85.71%{opacity:0}100.00%{opacity:0}}.before-label{opacity:.3;animation:before-label 7s linear infinite}.after-label{animation:after-label 7s linear infinite}@keyframes before-label{0.00%{opacity:1}25.71%{opacity:1}28.57%{opacity:.3}88.57%{opacity:.3}91.43%{opacity:1}100.00%{opacity:1}}@keyframes after-label{0.00%{opacity:.3}25.71%{opacity:.3}28.57%{opacity:1}88.57%{opacity:1}91.43%{opacity:.3}100.00%{opacity:.3}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><clipPath id="stage"><rect width="1000" height="600" rx="16"/></clipPath><clipPath id="phone"><rect x="376" y="30" width="248" height="540" rx="40"/></clipPath><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="8" stdDeviation="14" flood-color="rgba(1,4,9,0.6)"/></filter></defs><g clip-path="url(#stage)"><rect width="1000" height="600" fill="#151B23"/><rect x="376" y="30" width="248" height="540" rx="40" fill="#151B23" filter="url(#shadow)"/><g clip-path="url(#phone)"><image href="data:image/jpeg;base64,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 truncated
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600" width="1000" height="600" role="img" aria-label="The /patterns screen of euxy wiping from its capture before the pull request to its capture after it, with the changed regions outlined"><style>.after{animation:wipe 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes wipe{0.00%{clip-path:inset(0 100% 0 0)}14.29%{clip-path:inset(0 100% 0 0)}37.14%{clip-path:inset(0 0 0 0)}82.86%{clip-path:inset(0 0 0 0)}97.14%{clip-path:inset(0 100% 0 0)}100.00%{clip-path:inset(0 100% 0 0)}}.divider{opacity:0;animation:divider 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes divider{0.00%{transform:translateX(0);opacity:0}11.43%{transform:translateX(0);opacity:1}14.29%{transform:translateX(0);opacity:1}37.14%{transform:translateX(248px);opacity:1}41.43%{transform:translateX(248px);opacity:0}82.86%{transform:translateX(248px);opacity:0}85.71%{transform:translateX(248px);opacity:1}97.14%{transform:translateX(0);opacity:1}100.00%{transform:translateX(0);opacity:0}}.regions{animation:regions 7s ease-in-out infinite}@keyframes regions{0.00%{opacity:0}38.57%{opacity:0}44.29%{opacity:1}51.43%{opacity:.3}58.57%{opacity:1}81.43%{opacity:1}85.71%{opacity:0}100.00%{opacity:0}}.before-label{opacity:.3;animation:before-label 7s linear infinite}.after-label{animation:after-label 7s linear infinite}@keyframes before-label{0.00%{opacity:1}25.71%{opacity:1}28.57%{opacity:.3}88.57%{opacity:.3}91.43%{opacity:1}100.00%{opacity:1}}@keyframes after-label{0.00%{opacity:.3}25.71%{opacity:.3}28.57%{opacity:1}88.57%{opacity:1}91.43%{opacity:.3}100.00%{opacity:.3}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><clipPath id="stage"><rect width="1000" height="600" rx="16"/></clipPath><clipPath id="phone"><rect x="376" y="30" width="248" height="540" rx="40"/></clipPath><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="8" stdDeviation="14" flood-color="rgba(1,4,9,0.6)"/></filter></defs><g clip-path="url(#stage)"><rect width="1000" height="600" fill="#151B23"/><rect x="376" y="30" width="248" height="540" rx="40" fill="#151B23" filter="url(#shadow)"/><g clip-path="url(#phone)"><image href="data:image/jpeg;base64,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 truncated

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 107 KiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600" width="1000" height="600" role="img" aria-label="The /new-pattern screen of euxy wiping from its capture before the pull request to its capture after it, with the changed regions outlined"><style>.after{animation:wipe 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes wipe{0.00%{clip-path:inset(0 100% 0 0)}14.29%{clip-path:inset(0 100% 0 0)}37.14%{clip-path:inset(0 0 0 0)}82.86%{clip-path:inset(0 0 0 0)}97.14%{clip-path:inset(0 100% 0 0)}100.00%{clip-path:inset(0 100% 0 0)}}.divider{opacity:0;animation:divider 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes divider{0.00%{transform:translateX(0);opacity:0}11.43%{transform:translateX(0);opacity:1}14.29%{transform:translateX(0);opacity:1}37.14%{transform:translateX(248px);opacity:1}41.43%{transform:translateX(248px);opacity:0}82.86%{transform:translateX(248px);opacity:0}85.71%{transform:translateX(248px);opacity:1}97.14%{transform:translateX(0);opacity:1}100.00%{transform:translateX(0);opacity:0}}.regions{animation:regions 7s ease-in-out infinite}@keyframes regions{0.00%{opacity:0}38.57%{opacity:0}44.29%{opacity:1}51.43%{opacity:.3}58.57%{opacity:1}81.43%{opacity:1}85.71%{opacity:0}100.00%{opacity:0}}.before-label{opacity:.3;animation:before-label 7s linear infinite}.after-label{animation:after-label 7s linear infinite}@keyframes before-label{0.00%{opacity:1}25.71%{opacity:1}28.57%{opacity:.3}88.57%{opacity:.3}91.43%{opacity:1}100.00%{opacity:1}}@keyframes after-label{0.00%{opacity:.3}25.71%{opacity:.3}28.57%{opacity:1}88.57%{opacity:1}91.43%{opacity:.3}100.00%{opacity:.3}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><clipPath id="stage"><rect width="1000" height="600" rx="16"/></clipPath><clipPath id="phone"><rect x="376" y="30" width="248" height="540" rx="40"/></clipPath><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="8" stdDeviation="14" flood-color="rgba(17,17,17,0.14)"/></filter></defs><g clip-path="url(#stage)"><rect width="1000" height="600" fill="#F6F8FA"/><rect x="376" y="30" width="248" height="540" rx="40" fill="#F6F8FA" filter="url(#shadow)"/><g clip-path="url(#phone)"><image href="data:image/jpeg;base64,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 truncated
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600" width="1000" height="600" role="img" aria-label="The /patterns screen of euxy wiping from its capture before the pull request to its capture after it, with the changed regions outlined"><style>.after{animation:wipe 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes wipe{0.00%{clip-path:inset(0 100% 0 0)}14.29%{clip-path:inset(0 100% 0 0)}37.14%{clip-path:inset(0 0 0 0)}82.86%{clip-path:inset(0 0 0 0)}97.14%{clip-path:inset(0 100% 0 0)}100.00%{clip-path:inset(0 100% 0 0)}}.divider{opacity:0;animation:divider 7s cubic-bezier(.65,0,.35,1) infinite}@keyframes divider{0.00%{transform:translateX(0);opacity:0}11.43%{transform:translateX(0);opacity:1}14.29%{transform:translateX(0);opacity:1}37.14%{transform:translateX(248px);opacity:1}41.43%{transform:translateX(248px);opacity:0}82.86%{transform:translateX(248px);opacity:0}85.71%{transform:translateX(248px);opacity:1}97.14%{transform:translateX(0);opacity:1}100.00%{transform:translateX(0);opacity:0}}.regions{animation:regions 7s ease-in-out infinite}@keyframes regions{0.00%{opacity:0}38.57%{opacity:0}44.29%{opacity:1}51.43%{opacity:.3}58.57%{opacity:1}81.43%{opacity:1}85.71%{opacity:0}100.00%{opacity:0}}.before-label{opacity:.3;animation:before-label 7s linear infinite}.after-label{animation:after-label 7s linear infinite}@keyframes before-label{0.00%{opacity:1}25.71%{opacity:1}28.57%{opacity:.3}88.57%{opacity:.3}91.43%{opacity:1}100.00%{opacity:1}}@keyframes after-label{0.00%{opacity:.3}25.71%{opacity:.3}28.57%{opacity:1}88.57%{opacity:1}91.43%{opacity:.3}100.00%{opacity:.3}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><clipPath id="stage"><rect width="1000" height="600" rx="16"/></clipPath><clipPath id="phone"><rect x="376" y="30" width="248" height="540" rx="40"/></clipPath><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="8" stdDeviation="14" flood-color="rgba(17,17,17,0.14)"/></filter></defs><g clip-path="url(#stage)"><rect width="1000" height="600" fill="#F6F8FA"/><rect x="376" y="30" width="248" height="540" rx="40" fill="#F6F8FA" filter="url(#shadow)"/><g clip-path="url(#phone)"><image href="data:image/jpeg;base64,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 truncated

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 109 KiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" width="1600" height="900" role="img" aria-label="Explore's Map of a euxy pull request: the screen cards appear row by row, the transitions between them wipe in, then a click selects /lane-editor/0 and the Inspector opens on it"><style>.c0{transform-origin:0 0;animation:c0 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c0{0.00%{opacity:0;transform:scale(.92)}4.44%{opacity:0;transform:scale(.92)}8.19%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c1{transform-origin:0 0;animation:c1 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c1{0.00%{opacity:0;transform:scale(.92)}7.86%{opacity:0;transform:scale(.92)}11.61%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c2{transform-origin:0 0;animation:c2 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c2{0.00%{opacity:0;transform:scale(.92)}7.19%{opacity:0;transform:scale(.92)}10.94%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c3{transform-origin:0 0;animation:c3 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c3{0.00%{opacity:0;transform:scale(.92)}9.27%{opacity:0;transform:scale(.92)}13.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c4{transform-origin:0 0;animation:c4 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c4{0.00%{opacity:0;transform:scale(.92)}4.77%{opacity:0;transform:scale(.92)}8.52%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c5{transform-origin:0 0;animation:c5 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c5{0.00%{opacity:0;transform:scale(.92)}8.19%{opacity:0;transform:scale(.92)}11.94%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c6{transform-origin:0 0;animation:c6 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c6{0.00%{opacity:0;transform:scale(.92)}9.60%{opacity:0;transform:scale(.92)}13.35%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c7{transform-origin:0 0;animation:c7 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c7{0.00%{opacity:0;transform:scale(.92)}9.94%{opacity:0;transform:scale(.92)}13.69%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c8{transform-origin:0 0;animation:c8 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c8{0.00%{opacity:0;transform:scale(.92)}10.27%{opacity:0;transform:scale(.92)}14.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c9{transform-origin:0 0;animation:c9 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c9{0.00%{opacity:0;transform:scale(.92)}10.61%{opacity:0;transform:scale(.92)}14.36%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c10{transform-origin:0 0;animation:c10 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c10{0.00%{opacity:0;transform:scale(.92)}6.85%{opacity:0;transform:scale(.92)}10.60%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c11{transform-origin:0 0;animation:c11 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c11{0.00%{opacity:0;transform:scale(.92)}10.94%{opacity:0;transform:scale(.92)}14.69%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c12{transform-origin:0 0;animation:c12 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c12{0.00%{opacity:0;transform:scale(.92)}11.27%{opacity:0;transform:scale(.92)}15.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c13{transform-origin:0 0;animation:c13 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c13{0.00%{opacity:0;transform:scale(.92)}11.61%{opacity:0;transform:scale(.92)}15.36%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c14{transform-origin:0 0;animation:c14 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c14{0.00%{opacity:0;transform:scale(.92)}7.52%{opacity:0;transform:scale(.92)}11.27%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.full{animation:full 12s cubic-bezier(.45,0,.25,1) infinite}@keyframes full{0.00%{clip-path:inset(0 0 100% 0)}13.75%{clip-path:inset(0 0 100% 0)}24.58%{clip-path:inset(0 0 0 0)}100.00%{clip-path:inset(0 0 0 0)}}.ptr{opacity:0;animation:ptr 12s cubic-bezier(.4,0,.2,1) infinite}@keyframes ptr{0.00%{opacity:0;transform:translate(853.5px,575.2px)}28.75%{opacity:0;transform:translate(853.5px,575.2px)}30.42%{opacity:1;transform:translate(853.5px,575.2px)}38.75%{opacity:1;transform:translate(593.5px,355.2px)}39.58%{opacity:1;transform:translate(593.5px,355.2px) scale(.82)}40.83%{opacity:1;transform:translate(593.5px,355.2px)}48.75%{opacity:0;transform:translate(593.5px,355.2px)}100.00%{opacity:0;transform:translate(593.5px,355.2px)}}.sel{animation:sel 12s linear infinite}@keyframes sel{0.00%{opacity:0}39.58%{opacity:0}40.42%{opacity:1}100.00%{opacity:1}}.insp{animation:insp 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes insp{0.00%{opacity:0;transform:translateX(48px)}40.00%{opacity:0;transform:translateX(48px)}45.00%{opacity:1;transform:translateX(0)}100.00%{opacity:1;transform:translateX(0)}}.cover{oLine truncated
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" width="1600" height="900" role="img" aria-label="Explore's Map of a euxy pull request: the screen cards appear row by row, the transitions between them wipe in, then a click selects /about and the Inspector opens on it"><style>.c0{transform-origin:0 0;animation:c0 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c0{0.00%{opacity:0;transform:scale(.92)}4.33%{opacity:0;transform:scale(.92)}8.08%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c1{transform-origin:0 0;animation:c1 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c1{0.00%{opacity:0;transform:scale(.92)}4.00%{opacity:0;transform:scale(.92)}7.75%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c2{transform-origin:0 0;animation:c2 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c2{0.00%{opacity:0;transform:scale(.92)}4.67%{opacity:0;transform:scale(.92)}8.42%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c3{transform-origin:0 0;animation:c3 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c3{0.00%{opacity:0;transform:scale(.92)}6.08%{opacity:0;transform:scale(.92)}9.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c4{transform-origin:0 0;animation:c4 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c4{0.00%{opacity:0;transform:scale(.92)}6.41%{opacity:0;transform:scale(.92)}10.16%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c5{transform-origin:0 0;animation:c5 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c5{0.00%{opacity:0;transform:scale(.92)}6.75%{opacity:0;transform:scale(.92)}10.50%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c6{transform-origin:0 0;animation:c6 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c6{0.00%{opacity:0;transform:scale(.92)}7.08%{opacity:0;transform:scale(.92)}10.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c7{transform-origin:0 0;animation:c7 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c7{0.00%{opacity:0;transform:scale(.92)}3.66%{opacity:0;transform:scale(.92)}7.41%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c8{transform-origin:0 0;animation:c8 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c8{0.00%{opacity:0;transform:scale(.92)}7.41%{opacity:0;transform:scale(.92)}11.16%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c9{transform-origin:0 0;animation:c9 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c9{0.00%{opacity:0;transform:scale(.92)}7.75%{opacity:0;transform:scale(.92)}11.50%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c10{transform-origin:0 0;animation:c10 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c10{0.00%{opacity:0;transform:scale(.92)}8.08%{opacity:0;transform:scale(.92)}11.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c11{transform-origin:0 0;animation:c11 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c11{0.00%{opacity:0;transform:scale(.92)}8.42%{opacity:0;transform:scale(.92)}12.17%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.full{animation:full 12s cubic-bezier(.45,0,.25,1) infinite}@keyframes full{0.00%{clip-path:inset(0 0 100% 0)}10.83%{clip-path:inset(0 0 100% 0)}21.67%{clip-path:inset(0 0 0 0)}100.00%{clip-path:inset(0 0 0 0)}}.ptr{opacity:0;animation:ptr 12s cubic-bezier(.4,0,.2,1) infinite}@keyframes ptr{0.00%{opacity:0;transform:translate(978.5px,714.0px)}25.83%{opacity:0;transform:translate(978.5px,714.0px)}27.50%{opacity:1;transform:translate(978.5px,714.0px)}35.83%{opacity:1;transform:translate(718.5px,505.2px)}36.67%{opacity:1;transform:translate(718.5px,505.2px) scale(.82)}37.92%{opacity:1;transform:translate(718.5px,505.2px)}45.83%{opacity:0;transform:translate(718.5px,505.2px)}100.00%{opacity:0;transform:translate(718.5px,505.2px)}}.sel{animation:sel 12s ease-out infinite}@keyframes sel{0.00%{opacity:0}36.67%{opacity:0}39.17%{opacity:1}100.00%{opacity:1}}.insp{animation:insp 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes insp{0.00%{opacity:0;transform:translateX(48px)}37.08%{opacity:0;transform:translateX(48px)}42.08%{opacity:1;transform:translateX(0)}100.00%{opacity:1;transform:translateX(0)}}.cover{opacity:0;animation:cover 12s linear infinite}@keyframes cover{0.00%{opacity:1}1.67%{opacity:0}94.17%{opacity:0}100.00%{opacity:1}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><image id="empty" width="1376" height="774" href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAALine truncated

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" width="1600" height="900" role="img" aria-label="Explore's Map of a euxy pull request: the screen cards appear row by row, the transitions between them wipe in, then a click selects /lane-editor/0 and the Inspector opens on it"><style>.c0{transform-origin:0 0;animation:c0 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c0{0.00%{opacity:0;transform:scale(.92)}4.44%{opacity:0;transform:scale(.92)}8.19%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c1{transform-origin:0 0;animation:c1 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c1{0.00%{opacity:0;transform:scale(.92)}7.86%{opacity:0;transform:scale(.92)}11.61%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c2{transform-origin:0 0;animation:c2 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c2{0.00%{opacity:0;transform:scale(.92)}7.19%{opacity:0;transform:scale(.92)}10.94%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c3{transform-origin:0 0;animation:c3 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c3{0.00%{opacity:0;transform:scale(.92)}9.27%{opacity:0;transform:scale(.92)}13.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c4{transform-origin:0 0;animation:c4 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c4{0.00%{opacity:0;transform:scale(.92)}4.77%{opacity:0;transform:scale(.92)}8.52%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c5{transform-origin:0 0;animation:c5 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c5{0.00%{opacity:0;transform:scale(.92)}8.19%{opacity:0;transform:scale(.92)}11.94%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c6{transform-origin:0 0;animation:c6 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c6{0.00%{opacity:0;transform:scale(.92)}9.60%{opacity:0;transform:scale(.92)}13.35%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c7{transform-origin:0 0;animation:c7 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c7{0.00%{opacity:0;transform:scale(.92)}9.94%{opacity:0;transform:scale(.92)}13.69%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c8{transform-origin:0 0;animation:c8 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c8{0.00%{opacity:0;transform:scale(.92)}10.27%{opacity:0;transform:scale(.92)}14.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c9{transform-origin:0 0;animation:c9 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c9{0.00%{opacity:0;transform:scale(.92)}10.61%{opacity:0;transform:scale(.92)}14.36%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c10{transform-origin:0 0;animation:c10 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c10{0.00%{opacity:0;transform:scale(.92)}6.85%{opacity:0;transform:scale(.92)}10.60%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c11{transform-origin:0 0;animation:c11 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c11{0.00%{opacity:0;transform:scale(.92)}10.94%{opacity:0;transform:scale(.92)}14.69%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c12{transform-origin:0 0;animation:c12 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c12{0.00%{opacity:0;transform:scale(.92)}11.27%{opacity:0;transform:scale(.92)}15.02%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c13{transform-origin:0 0;animation:c13 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c13{0.00%{opacity:0;transform:scale(.92)}11.61%{opacity:0;transform:scale(.92)}15.36%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c14{transform-origin:0 0;animation:c14 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c14{0.00%{opacity:0;transform:scale(.92)}7.52%{opacity:0;transform:scale(.92)}11.27%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.full{animation:full 12s cubic-bezier(.45,0,.25,1) infinite}@keyframes full{0.00%{clip-path:inset(0 0 100% 0)}13.75%{clip-path:inset(0 0 100% 0)}24.58%{clip-path:inset(0 0 0 0)}100.00%{clip-path:inset(0 0 0 0)}}.ptr{opacity:0;animation:ptr 12s cubic-bezier(.4,0,.2,1) infinite}@keyframes ptr{0.00%{opacity:0;transform:translate(853.5px,575.2px)}28.75%{opacity:0;transform:translate(853.5px,575.2px)}30.42%{opacity:1;transform:translate(853.5px,575.2px)}38.75%{opacity:1;transform:translate(593.5px,355.2px)}39.58%{opacity:1;transform:translate(593.5px,355.2px) scale(.82)}40.83%{opacity:1;transform:translate(593.5px,355.2px)}48.75%{opacity:0;transform:translate(593.5px,355.2px)}100.00%{opacity:0;transform:translate(593.5px,355.2px)}}.sel{animation:sel 12s linear infinite}@keyframes sel{0.00%{opacity:0}39.58%{opacity:0}40.42%{opacity:1}100.00%{opacity:1}}.insp{animation:insp 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes insp{0.00%{opacity:0;transform:translateX(48px)}40.00%{opacity:0;transform:translateX(48px)}45.00%{opacity:1;transform:translateX(0)}100.00%{opacity:1;transform:translateX(0)}}.cover{oLine truncated
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" width="1600" height="900" role="img" aria-label="Explore's Map of a euxy pull request: the screen cards appear row by row, the transitions between them wipe in, then a click selects /about and the Inspector opens on it"><style>.c0{transform-origin:0 0;animation:c0 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c0{0.00%{opacity:0;transform:scale(.92)}4.33%{opacity:0;transform:scale(.92)}8.08%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c1{transform-origin:0 0;animation:c1 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c1{0.00%{opacity:0;transform:scale(.92)}4.00%{opacity:0;transform:scale(.92)}7.75%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c2{transform-origin:0 0;animation:c2 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c2{0.00%{opacity:0;transform:scale(.92)}4.67%{opacity:0;transform:scale(.92)}8.42%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c3{transform-origin:0 0;animation:c3 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c3{0.00%{opacity:0;transform:scale(.92)}6.08%{opacity:0;transform:scale(.92)}9.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c4{transform-origin:0 0;animation:c4 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c4{0.00%{opacity:0;transform:scale(.92)}6.41%{opacity:0;transform:scale(.92)}10.16%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c5{transform-origin:0 0;animation:c5 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c5{0.00%{opacity:0;transform:scale(.92)}6.75%{opacity:0;transform:scale(.92)}10.50%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c6{transform-origin:0 0;animation:c6 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c6{0.00%{opacity:0;transform:scale(.92)}7.08%{opacity:0;transform:scale(.92)}10.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c7{transform-origin:0 0;animation:c7 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c7{0.00%{opacity:0;transform:scale(.92)}3.66%{opacity:0;transform:scale(.92)}7.41%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c8{transform-origin:0 0;animation:c8 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c8{0.00%{opacity:0;transform:scale(.92)}7.41%{opacity:0;transform:scale(.92)}11.16%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c9{transform-origin:0 0;animation:c9 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c9{0.00%{opacity:0;transform:scale(.92)}7.75%{opacity:0;transform:scale(.92)}11.50%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c10{transform-origin:0 0;animation:c10 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c10{0.00%{opacity:0;transform:scale(.92)}8.08%{opacity:0;transform:scale(.92)}11.83%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.c11{transform-origin:0 0;animation:c11 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes c11{0.00%{opacity:0;transform:scale(.92)}8.42%{opacity:0;transform:scale(.92)}12.17%{opacity:1;transform:scale(1)}100.00%{opacity:1;transform:scale(1)}}.full{animation:full 12s cubic-bezier(.45,0,.25,1) infinite}@keyframes full{0.00%{clip-path:inset(0 0 100% 0)}10.83%{clip-path:inset(0 0 100% 0)}21.67%{clip-path:inset(0 0 0 0)}100.00%{clip-path:inset(0 0 0 0)}}.ptr{opacity:0;animation:ptr 12s cubic-bezier(.4,0,.2,1) infinite}@keyframes ptr{0.00%{opacity:0;transform:translate(978.5px,714.0px)}25.83%{opacity:0;transform:translate(978.5px,714.0px)}27.50%{opacity:1;transform:translate(978.5px,714.0px)}35.83%{opacity:1;transform:translate(718.5px,505.2px)}36.67%{opacity:1;transform:translate(718.5px,505.2px) scale(.82)}37.92%{opacity:1;transform:translate(718.5px,505.2px)}45.83%{opacity:0;transform:translate(718.5px,505.2px)}100.00%{opacity:0;transform:translate(718.5px,505.2px)}}.sel{animation:sel 12s ease-out infinite}@keyframes sel{0.00%{opacity:0}36.67%{opacity:0}39.17%{opacity:1}100.00%{opacity:1}}.insp{animation:insp 12s cubic-bezier(.2,.8,.2,1) infinite}@keyframes insp{0.00%{opacity:0;transform:translateX(48px)}37.08%{opacity:0;transform:translateX(48px)}42.08%{opacity:1;transform:translateX(0)}100.00%{opacity:1;transform:translateX(0)}}.cover{opacity:0;animation:cover 12s linear infinite}@keyframes cover{0.00%{opacity:1}1.67%{opacity:0}94.17%{opacity:0}100.00%{opacity:1}}@media (prefers-reduced-motion: reduce){*{animation:none!important}}</style><defs><image id="empty" width="1376" height="774" href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAALine truncated

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 642 KiB

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@expo/explore",
"version": "0.20.0",
"version": "0.20.0-next.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@expo/explore",
"version": "0.20.0",
"version": "0.20.0-next.0",
"license": "MIT",
"dependencies": {
"@expo/repack-app": "0.10.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@expo/explore",
"version": "0.20.0",
"version": "0.20.0-next.0",
"description": "Source-driven mobile app maps, deterministic CI capture, and visual reviews",
"license": "MIT",
"type": "module",
+8 -30
View File
@@ -25,40 +25,19 @@ function keyframes(name, loop, frames) {
return `@keyframes ${name}{${frames.map(([at, css]) => `${((at / loop) * 100).toFixed(2)}%{${css}}`).join("")}}`;
}
/**
* The Map card of `route`: the screenshot button of the node whose id is that route's surface in `review`. The button
* is named after the screen's title, which is not the route when the report has plain titles.
*/
export function mapCard(page, review, route) {
const surface = review.surfaces.find(s => (s.head ?? s.base)?.route === route && s.colorScheme !== "dark");
if (!surface) throw new Error(`The report has no screen at ${route}.`);
return page.locator(`.react-flow__node-screen[data-id="${surface.id}"] .screen-screenshot-target`);
}
/**
* Photographs the hero's states from a Viewer page whose Map has its camera set and nothing selected: the Map without
* its screens, without its edges, and whole; then it clicks `select`, which opens the Inspector without moving the
* camera, and photographs that (`card` is its screenshot button, from mapCard). Returns the frames and where each screen card, the Inspector and the selected card are.
* camera, and photographs that. Returns the frames and where each screen card, the Inspector and the selected card are.
*/
export async function captureHeroFrames(page, { select, card: target, viewport }) {
export async function captureHeroFrames(page, { select, viewport }) {
const shoot = () => page.screenshot({ type: "jpeg", quality: JPEG_QUALITY });
// Park the pointer on bare canvas, found once the camera is set: over a card it takes a grey ring and darkens the
// card's transitions, over a transition it darkens that one, and over a control it can raise a tooltip.
const rest = await page.evaluate(({ width, height }) => {
for (let y = height - 120; y > 120; y -= 20) for (let x = 40; x < width - 40; x += 20) {
if (document.elementFromPoint(x, y)?.classList.contains("react-flow__pane")) return { x, y };
}
return null;
}, viewport);
if (!rest) throw new Error("The hero's Map has no bare canvas to park the pointer on.");
const neutral = async () => {
await page.mouse.move(rest.x, rest.y);
await page.waitForTimeout(200);
if (await page.locator(".canvas-hovering, .graph-node-hover-subject").count()) throw new Error("The pointer at rest still hovers the Map.");
};
const neutral = () => page.mouse.move(viewport.width - 4, viewport.height - 4);
const rect = locator => locator.boundingBox().then(b => b && { x: Math.round(b.x), y: Math.round(b.y), width: Math.round(b.width), height: Math.round(b.height) });
const camera = () => page.locator(".react-flow__viewport").evaluate(el => el.style.transform);
const target = page.locator(`.screen-screenshot-target[title="${select}"]`);
// A card under the pointer dims the others and highlights its edges; let that fade before the first frame.
await neutral();
await page.waitForTimeout(1000);
const at = await camera();
@@ -145,9 +124,8 @@ export function heroSvg(frames, theme, alt) {
]));
defs.push(`<clipPath id="canvas"><rect x="0" y="0" width="${p.x}" height="${v.height}"/></clipPath>`);
defs.push(`<clipPath id="panel"><rect ${box(p)}/></clipPath>`);
// The selection lands as the Viewer draws it, at once: a ring and its transitions in the accent, nothing fading.
css.push(`.sel{animation:sel ${LOOP}s linear infinite}`);
css.push(keyframes("sel", LOOP, [[0, "opacity:0"], [CLICK + 0.1, "opacity:0"], [CLICK + 0.2, "opacity:1"], [LOOP, "opacity:1"]]));
css.push(`.sel{animation:sel ${LOOP}s ease-out infinite}`);
css.push(keyframes("sel", LOOP, [[0, "opacity:0"], [CLICK + 0.1, "opacity:0"], [CLICK + 0.4, "opacity:1"], [LOOP, "opacity:1"]]));
css.push(`.insp{animation:insp ${LOOP}s cubic-bezier(.2,.8,.2,1) infinite}`);
css.push(keyframes("insp", LOOP, [[0, "opacity:0;transform:translateX(48px)"], [CLICK + 0.15, "opacity:0;transform:translateX(48px)"], [CLICK + 0.75, "opacity:1;transform:translateX(0)"], [LOOP, "opacity:1;transform:translateX(0)"]]));
layers.push(`<use class="sel" href="#inspecting" clip-path="url(#canvas)"/>`);
@@ -259,7 +237,7 @@ export async function compareSvg(browser, report, surface, theme, alt) {
+ `<g class="divider"><rect x="${x - 1.5}" y="${y}" width="3" height="${PH}" fill="${t.accent}"/><circle cx="${x}" cy="${y + PH / 2}" r="13" fill="${t.accent}"/>`
+ `<path d="M${x - 5} ${y + PH / 2 - 4}l-3 4l3 4M${x + 5} ${y + PH / 2 - 4}l3 4l-3 4" stroke="#fff" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>`
+ `<g class="regions">${regions}</g>`
+ label("before-label", "end", x - 44, "Before", `${pullRequest.base.ref} · ${pullRequest.base.sha.slice(0, 7)}`)
+ label("before-label", "end", x - 44, "Before", `${pullRequest.base.ref} ·${pullRequest.base.sha.slice(0, 7)}`)
+ label("after-label", "start", x + PW + 44, "After", `PR #${pullRequest.number} · ${pullRequest.head.sha.slice(0, 7)}`, `${count} changed region${count === 1 ? "" : "s"}`)
+ "</g></svg>";
}
+15 -28
View File
@@ -13,14 +13,12 @@
// It becomes readme-compare-*.svg, its before capture wiping to its after capture
// --pr a GitHub PR URL whose Explore comment becomes readme-pr-comment-light.png (public repository): the comment
// at its own size on a soft stage, cut off with a fade after the list of changed screens
// --only the pictures to write, comma-separated, of hero, compare, screens and pr-comment; default all of them (the
// PR comment only with --pr). --only pr-comment needs no --report
import { chromium } from "@playwright/test";
import { readFile, writeFile } from "node:fs/promises";
import { parseArgs } from "node:util";
import { fileURLToPath } from "node:url";
import { startReportViewer } from "../test/ci/lib/report-viewer.mjs";
import { captureHeroFrames, compareSurface, compareSvg, heroSvg, mapCard, openReport } from "./readme-animations.mjs";
import { captureHeroFrames, compareSurface, compareSvg, heroSvg, openReport } from "./readme-animations.mjs";
const { values: args } = parseArgs({
options: {
@@ -29,36 +27,25 @@ const { values: args } = parseArgs({
compare: { type: "string", default: "patterns" },
pr: { type: "string" },
zoom: { type: "string", default: "73" },
only: { type: "string" },
},
});
const PICTURES = ["hero", "compare", "screens", "pr-comment"];
const only = args.only?.split(",").map(name => name.trim()).filter(Boolean);
const unknown = only?.filter(name => !PICTURES.includes(name)) ?? [];
if (unknown.length) {
console.error(`Unknown --only ${unknown.join(", ")}; pass some of ${PICTURES.join(", ")}.`);
process.exit(2);
}
const wanted = name => !only || only.includes(name);
const fromReport = PICTURES.filter(name => name !== "pr-comment").some(wanted);
if (fromReport && !args.report) {
if (!args.report) {
console.error("Pass --report <review report zip>. See skills/readme-refresh/SKILL.md for where the euxy report comes from.");
process.exit(2);
}
const out = fileURLToPath(new URL("../docs/screenshots/", import.meta.url));
const SHOTS = [
{ name: "hero", file: "readme-hero", hash: "#/map", viewport: { width: 1376, height: 774 }, click: page => page.getByRole("button", { name: "Fit canvas" }), select: args.select, zoom: Number(args.zoom), animated: true },
// Screens shows its Changed filter, so the added, removed and modified dots are all in view wherever the tree sorts them.
{ name: "screens", file: "readme-screens", hash: "#/screens", viewport: { width: 1760, height: 1000 }, click: page => page.locator(".screens-chip", { hasText: "Changed" }) },
].filter(shot => wanted(shot.name));
{ file: "readme-hero", hash: "#/map", viewport: { width: 1376, height: 774 }, click: "Fit canvas", select: args.select, zoom: Number(args.zoom), animated: true },
{ file: "readme-screens", hash: "#/screens", viewport: { width: 1760, height: 1000 } },
];
const bytes = fromReport ? await readFile(args.report) : undefined;
const report = bytes && await openReport(bytes);
const { server, url } = bytes ? await startReportViewer({ bytes, watch: false }) : {};
const bytes = await readFile(args.report);
const report = await openReport(bytes);
const { server, url } = await startReportViewer({ bytes, watch: false });
const browser = await chromium.launch();
try {
for (const theme of wanted("compare") ? ["light", "dark"] : []) {
for (const theme of ["light", "dark"]) {
const surface = compareSurface(report.review, args.compare, theme);
const path = `${out}readme-compare-${theme}.svg`;
await writeFile(path, await compareSvg(browser, report, surface, theme,
@@ -73,20 +60,20 @@ try {
await page.waitForSelector(".react-flow__node, .compare-stage, .screens-cell", { timeout: 60_000 });
await page.waitForTimeout(4000);
if (shot.click) {
await shot.click(page).click();
await page.getByRole("button", { name: shot.click }).click();
await page.mouse.move(400, shot.viewport.height - 30);
await page.waitForTimeout(1500);
}
if (shot.select && !shot.animated) {
// Selecting a screen opens the Inspector without moving the fitted camera. The animated hero selects it last.
await mapCard(page, report.review, shot.select).click();
await page.locator(`.screen-screenshot-target[title="${shot.select}"]`).click();
await page.mouse.move(400, shot.viewport.height - 30);
await page.waitForTimeout(1500);
}
if (shot.zoom) {
// Zoom around the selected screen with the wheel, which keeps it under the pointer, then pan it left and up, clear
// of the minimap and the bottom bar. The camera stops at the first wheel step past the zoom asked for.
const box = await mapCard(page, report.review, shot.select).boundingBox();
const box = await page.locator(`.screen-screenshot-target[title="${shot.select}"]`).boundingBox();
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
for (let step = 0; step < 60; step++) {
if (Number((await page.locator(".zoom-button span").first().textContent()).replace("%", "")) >= shot.zoom) break;
@@ -101,14 +88,14 @@ try {
}
const path = `${out}${shot.file}-${theme}.${shot.animated ? "svg" : "png"}`;
if (shot.animated) {
const frames = await captureHeroFrames(page, { select: shot.select, card: mapCard(page, report.review, shot.select), viewport: shot.viewport });
const frames = await captureHeroFrames(page, { select: shot.select, viewport: shot.viewport });
await writeFile(path, heroSvg(frames, theme,
`Explore's Map of a euxy pull request: the screen cards appear row by row, the transitions between them wipe in, then a click selects ${shot.select} and the Inspector opens on it`));
} else await page.screenshot({ path });
console.log(path);
await context.close();
}
for (const theme of args.pr && wanted("pr-comment") ? ["light", "dark"] : []) {
for (const theme of args.pr ? ["light", "dark"] : []) {
// Signed-out github.com follows prefers-color-scheme.
const context = await browser.newContext({ viewport: { width: 1000, height: 1400 }, deviceScaleFactor: 2, colorScheme: theme });
const page = await context.newPage();
@@ -135,7 +122,7 @@ try {
}
} finally {
await browser.close();
await server?.close?.();
await server.close?.();
}
/**
+7 -7
View File
@@ -12,8 +12,8 @@ This is a repository-maintenance skill (it is not shipped in the npm package; `s
The README's screenshots and its live example (`https://explore-example--euxy.expo.app/p/<token>`, deployed by `.github/workflows/example-report.yml`) must show the same report. The example serves the `viewer-preview-fixtures` release, the same reports every pull request's Viewer preview uses, so start there:
```sh
gh release download viewer-preview-fixtures --pattern reports.json --output - | jq -r '.[0] | "\(.target) \(.source)"' # e.g. iphone brentvatne/euxy#163
mkdir -p ~/euxy-report && gh release download viewer-preview-fixtures --pattern iphone.zip --dir ~/euxy-report --clobber
gh release download viewer-preview-fixtures --pattern reports.json --output - | jq -r '.[0].source' # e.g. brentvatne/euxy#154
mkdir -p ~/euxy-report && gh release download viewer-preview-fixtures --pattern ios.zip --dir ~/euxy-report --clobber
```
Keep those fixtures when their euxy PR still shows a real change (an added or removed screen, modified screens with outlined regions). To move to a newer euxy PR, open its Explore comment and follow **iOS report** to the hosted link `https://euxy-explore--<id>.expo.app/p/<token>`. Then refresh the fixtures from that link and download them again:
@@ -28,13 +28,13 @@ Do not pick a same-tree demo PR, where every change is noise. The refreshed fixt
```sh
npm ci
node scripts/readme-screenshots.mjs --report ~/euxy-report/iphone.zip --select /lane-editor/0 --compare new-pattern --pr https://github.com/brentvatne/euxy/pull/<n>
node scripts/readme-screenshots.mjs --report ~/euxy-report/ios.zip --select /about --compare patterns --pr https://github.com/brentvatne/euxy/pull/<n>
```
- `--select` is the route the hero's pointer clicks on the Map (the Inspector opens on it): choose an added or clearly modified screen. The script zooms in around it, so it must be a screen the Map shows.
- `--compare` is the key in the Viewer's `#/compare/<key>` URL for a **modified** screen with outlined regions (open the report, click the screen in Compare, copy the key): the route without its slash. The script fails if the report has no visually modified screen at that route.
- `--pr` screenshots the Explore comment on that PR: the fixtures' `source`, or a newer euxy PR when that comment predates the current layout. `--only pr-comment --pr <url>` rewrites only the comment pictures (it needs no `--report`); `--only` takes any of `hero`, `compare`, `screens` and `pr-comment`. Headless Chromium needs a colour emoji font for the result glyphs (`sudo apt-get install fonts-noto-color-emoji` on Debian/Ubuntu); a comment with hollow boxes where 🟩 should be is not acceptable.
- The script serves the report through the Viewer's Vite dev server, so no build is needed. It writes a `-light` and a `-dark` file for every picture (the PR comment too: signed-out github.com follows `prefers-color-scheme`). The README shows each pair with `<picture>`: a `<source media="(prefers-color-scheme: dark)">` for the dark file and an `<img>` with the alt text and the light file, which is what GitHub Mobile shows (it ignores the dark source), so the light file is the one that must always be right. The Screens and PR comment pictures, shown at half the column, are each wrapped in an `<a>` to their light PNG so a reader can open them full size; GitHub links a plain Markdown image itself, but not a `<picture>`.
- `--pr` screenshots the Explore comment on that PR: the fixtures' `source`. Headless Chromium needs a colour emoji font for the result glyphs (`sudo apt-get install fonts-noto-color-emoji` on Debian/Ubuntu); a comment with hollow boxes where 🟩 should be is not acceptable.
- The script serves the report through the Viewer's Vite dev server, so no build is needed. It writes a `-light` and a `-dark` file for every picture (the PR comment too: signed-out github.com follows `prefers-color-scheme`). The README shows each pair with `<picture>`: a `<source media="(prefers-color-scheme: dark)">` for the dark file and an `<img>` with the alt text and the light file, which is what GitHub Mobile shows (it ignores the dark source), so the light file is the one that must always be right.
Two of the pictures are animated SVGs, built by `scripts/readme-animations.mjs` in the same run; there is nothing else to run when the screenshots change:
@@ -53,7 +53,7 @@ npx @expo/explore reports list # your sa
export EXPLORE_CACHE_DIR=$(mktemp -d) # a scratch store for the image, not your own runs
cd ~/code/euxy # inside euxy, so the commit messages are found
npx @expo/explore reports add ~/.cache/expo-explore/reports/<that id>/ios.zip
npx @expo/explore reports add ~/euxy-report/iphone.zip # the PR report from step 1
npx @expo/explore reports add ~/euxy-report/ios.zip # the PR report from step 1
npx @expo/explore reports add <an explore:binary report directory> # an exploration, so all three kinds show
cd - && npm run build:cli && node scripts/readme-reports-rows.mjs > /tmp/reports-rows.html
```
@@ -61,7 +61,7 @@ cd - && npm run build:cli && node scripts/readme-reports-rows.mjs > /tmp/reports
- The script renders the picker as the CLI draws it (96 columns, the newest run selected) and writes the terminal body as HTML: each coloured piece is exactly its characters wide, so columns line up, and the wordmark is drawn as cell rectangles, since a design tool's font does not draw `█▀▄` cell for cell.
- In Paper, replace the frame named "Terminal" inside each artboard's window with that HTML, check both artboards in a screenshot (crisp wordmark, aligned columns, the selected row highlighted to the end, coloured counts), and export both at 2x as `readme-reports-light.png` and `readme-reports-dark.png`. The window's title bar reads `npx @expo/explore reports`, as people run it.
Look at every PNG you produced before committing, light and dark: the Screens grid must show the added, removed and modified status dots, the PR comment must show the heading links, the line of device links and the list of changed screens. Describe each in its Markdown alt text as what the picture shows, not what the feature is.
Look at every PNG you produced before committing, light and dark: the Screens grid must show the added, removed and modified status dots, the PR comment must show the heading links and result glyphs. Describe each in its Markdown alt text as what the picture shows, not what the feature is.
## 3. Pass over the content as a first-time user
-8
View File
@@ -242,14 +242,6 @@ test("Compare steps through changed screens and their changed areas", { timeout:
await expect(outlines.nth(1)).toHaveClass(/active/);
await page.keyboard.press("k");
await expect(outlines.nth(0)).toHaveClass(/active/);
// Esc in the bottom bar's More menu closes the menu and only the menu.
const more = page.getByRole("button", { name: "More", exact: true });
await more.click();
await expect(page.getByRole("menu", { name: "More" })).toBeVisible();
await page.keyboard.press("Escape");
await expect(page.getByRole("menu", { name: "More" })).toHaveCount(0);
await expect(more).toBeFocused();
await expect(outlines.nth(0)).toHaveClass(/active/);
await page.keyboard.press("Escape");
await expect(compare.locator(".visual-change-outline.active")).toHaveCount(0);
+19 -50
View File
@@ -178,63 +178,32 @@ test.describe("Inspector resize", () => {
await expect.poll(() => panelWidth(page)).toBe(500);
});
test.describe("in a window too narrow for the toolbar beside a half-window Inspector", () => {
test.describe("in a window too narrow for the toolbar beside a wide Inspector", () => {
test.use({ viewport: { width: 820, height: 800 } });
/** The widest the panel may be here: the window less the bottom bar and a 12px gap either side. */
async function widestBesideToolbar(page: Page) {
const toolbarBox = (await page.getByRole("toolbar", { name: "Canvas tools" }).boundingBox())!;
return Math.floor(820 - (toolbarBox.width + 2 * 12));
}
async function expectToolbarBesidePanel(page: Page) {
test("the toolbar never moves past the canvas' left edge", async ({ page }) => {
await page.goto("/map?screen=area-0-screen-1");
await expect(panel(page)).toBeVisible();
const toolbar = page.getByRole("toolbar", { name: "Canvas tools" });
await expect(toolbar).toBeVisible();
await expect(toolbar.getByRole("button", { name: "More", exact: true })).toBeVisible();
const toolbarBox = (await toolbar.boundingBox())!;
const panelBox = (await panel(page).boundingBox())!;
expect(toolbarBox.x).toBeGreaterThanOrEqual(12 - 1);
expect(toolbarBox.x + toolbarBox.width + 12).toBeLessThanOrEqual(panelBox.x + 1);
}
test("End stops the Inspector where the toolbar still fits beside it, with More in reach", async ({ page }) => {
await page.goto("/map?screen=area-0-screen-1");
await expect(panel(page)).toBeVisible();
const widest = await widestBesideToolbar(page);
// Half the window would be 410; the toolbar needs more of the canvas than that leaves.
expect(widest).toBeLessThan(410);
expect(widest).toBeGreaterThan(320);
await expect(handle(page)).toHaveAttribute("aria-valuemax", String(widest));
await handle(page).focus();
await page.keyboard.press("End");
await expect.poll(() => panelWidth(page)).toBe(widest);
await expect(handle(page)).toHaveAttribute("aria-valuenow", String(widest));
await page.keyboard.press("ArrowLeft");
await expect.poll(() => panelWidth(page)).toBe(widest);
await expectToolbarBesidePanel(page);
// Narrowed again, the toolbar keeps its gap to the panel.
await expect.poll(() => panelWidth(page)).toBe(410);
// Either it fits between the window's edge and the panel, or it gives way, as it does when
// the panels leave the canvas too little room.
await expect.poll(async () => {
if (await toolbar.count() === 0) return true;
const toolbarBox = (await toolbar.boundingBox())!;
const panelBox = (await panel(page).boundingBox())!;
return toolbarBox.x >= 0 && toolbarBox.x + toolbarBox.width <= panelBox.x;
}).toBe(true);
// Narrowed again, the toolbar returns.
await page.keyboard.press("Home");
await expect.poll(() => panelWidth(page)).toBe(320);
await expectToolbarBesidePanel(page);
});
test("a drag or a saved width stops there too", async ({ page }) => {
await page.goto("/map?screen=area-0-screen-1");
await expect(panel(page)).toBeVisible();
const widest = await widestBesideToolbar(page);
await dragEdge(page, -300);
await expect.poll(() => panelWidth(page)).toBe(widest);
expect(await storedWidth(page)).toBe(String(widest));
await expectToolbarBesidePanel(page);
await page.evaluate((key) => localStorage.setItem(key, "800"), STORAGE_KEY);
await page.reload();
await expect(panel(page)).toBeVisible();
await expect.poll(() => panelWidth(page)).toBe(widest);
await expectToolbarBesidePanel(page);
// A wider window gives the saved width more room again.
await page.setViewportSize({ width: 1280, height: 800 });
await expect.poll(() => panelWidth(page)).toBe(640);
await expect(toolbar).toBeVisible();
const toolbarBox = (await toolbar.boundingBox())!;
const panelBox = (await panel(page).boundingBox())!;
expect(toolbarBox.x).toBeGreaterThanOrEqual(0);
expect(toolbarBox.x + toolbarBox.width + 12).toBeCloseTo(panelBox.x, 0);
});
});
+124 -392
View File
@@ -197,20 +197,15 @@ async function expectMapSelectionRing(page: Page) {
await page.mouse.move(1, 1);
}
/** Picks a theme in the bottom bar's More menu, then closes the menu. */
/** The camera chrome's theme button steps Auto → Dark → Light; press it until the page shows the option. */
async function chooseTheme(page: Page, option: "light" | "dark") {
await page.getByRole("button", { name: "More", exact: true }).click();
const menu = page.getByRole("menu", { name: "More" });
await menu.getByRole("menuitemradio", { name: option === "light" ? "Light" : "Dark", exact: true }).click();
await page.keyboard.press("Escape");
await expect(menu).toHaveCount(0);
await expect(page.locator("html")).toHaveAttribute("data-theme", option);
}
/** There is no button to bring the Inspector back; a selection, Return or I opens it. */
async function openInspector(page: Page) {
await page.keyboard.press("i");
await expect(page.locator(".right-panel")).toBeVisible();
const root = page.locator("html");
for (let presses = 0; presses < 3; presses += 1) {
if (await root.getAttribute("data-theme") === option) return;
await page.getByRole("button", { name: "Toggle theme" }).click();
await page.waitForTimeout(50);
}
await expect(root).toHaveAttribute("data-theme", option);
}
/** Bottom toolbar → persistent canvas view control. */
@@ -1673,7 +1668,7 @@ test("collapses the Inspector when a screen is cleared but still allows an empty
await expect.poll(() => new URL(page.url()).searchParams.has("screen")).toBe(false);
await expect(page.locator(".right-panel")).toHaveCount(0);
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
await expect.poll(() => new URL(page.url()).searchParams.has("screen")).toBe(false);
});
@@ -1859,12 +1854,13 @@ test("keeps persistent canvas chrome out of the sliding canvas snapshot", async
await page.setViewportSize({ width: 1600, height: 900 });
await page.goto("/map");
await expect(page.locator(".canvas-minimap-shell")).toBeVisible();
await expect(page.locator(".app-content > .canvas-camera-controls")).toBeVisible();
await expect(page.locator(".right-float")).toBeVisible();
const transitionNames = await page.locator([
".canvas-minimap-shell",
".app-content > .canvas-camera-controls",
".canvas-toolbar",
".right-float",
].join(",")).evaluateAll((elements) => elements.map((element) => ({
className: element.className,
viewTransitionName: getComputedStyle(element).viewTransitionName,
@@ -1873,6 +1869,7 @@ test("keeps persistent canvas chrome out of the sliding canvas snapshot", async
expect.objectContaining({ viewTransitionName: "canvas-minimap" }),
expect.objectContaining({ viewTransitionName: "canvas-camera-controls" }),
expect.objectContaining({ viewTransitionName: "canvas-toolbar" }),
expect.objectContaining({ viewTransitionName: "right-floating-controls" }),
]));
const animations = await captureCanvasViewAnimations(page, "Screens");
@@ -1893,6 +1890,7 @@ test("keeps persistent canvas chrome out of the sliding canvas snapshot", async
const movingPersistentChrome = animations.filter((animation) => (
animation.pseudoElement?.includes("(canvas-camera-controls)")
|| animation.pseudoElement?.includes("(canvas-toolbar)")
|| animation.pseudoElement?.includes("(right-floating-controls)")
));
expect(movingPersistentChrome).toEqual([]);
});
@@ -1918,7 +1916,7 @@ test("centres selected screens after panel changes and makes the primary Fit sel
await expectSelectedScreenCentered(page);
await expectPanelFitMatchesPrimaryFit(page, canvas);
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
await expectSelectedScreenCentered(page);
await expectPanelFitMatchesPrimaryFit(page, canvas);
@@ -2257,7 +2255,7 @@ test("keeps current Map and Screens projections overlap-free without deleting sc
await expect(page).toHaveURL(/\/screens/);
await expect(page.locator(".screens-page .screens-cell")).toHaveCount(SCREEN_COUNT);
await expect.poll(() => overlapCount(".screens-page .screens-cell")).toBe(0);
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
await expect.poll(() => overlapCount(".screens-page .screens-cell")).toBe(0);
});
@@ -2339,7 +2337,7 @@ test("shows the minimap on the Map without a visibility preference", async ({ pa
test("keeps minimap and canvas chrome inside the responsive visible frame", async ({ page }) => {
await page.setViewportSize({ width: 900, height: 820 });
await page.goto("/map");
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
const minimap = page.getByTestId("canvas-minimap");
const toolbar = page.getByRole("toolbar", { name: "Canvas tools" });
@@ -2379,7 +2377,6 @@ test("keeps minimap and canvas chrome inside the responsive visible frame", asyn
const cameraBeforeTheme = await viewport.getAttribute("style");
const maskBeforePanel = await minimap.locator(".canvas-minimap-visible-mask path").getAttribute("d");
const lightBackground = await minimap.evaluate((element) => getComputedStyle(element).backgroundColor);
// The bar has moved clear of the Inspector, so its More menu is in reach.
await chooseTheme(page, "dark");
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
await expect(viewport).toHaveAttribute("style", cameraBeforeTheme!);
@@ -2493,9 +2490,7 @@ test("animates panel Fits once in both directions", async ({ page }) => {
}).__panelFitCameraObserver = observer;
});
// Closed, the Inspector has no button: I opens it.
if (buttonName === "Expand inspector") await page.keyboard.press("i");
else await page.getByRole("button", { name: buttonName, exact: true }).click();
await page.getByRole("button", { name: buttonName, exact: true }).click();
await expectLayout();
await page.waitForTimeout(520);
const samples = await page.evaluate(() => {
@@ -2629,9 +2624,7 @@ test("refits every unselected canvas when the Inspector opens or closes", async
host.__overviewPanelCamera = { values, observer };
}, canvas);
// Closed, the Inspector has no button: I opens it.
if (buttonName === "Expand inspector") await page.keyboard.press("i");
else await page.getByRole("button", { name: buttonName, exact: true }).click();
await page.getByRole("button", { name: buttonName, exact: true }).click();
if (buttonName === "Expand inspector") {
await expect(page.locator(".right-panel")).toBeVisible();
} else {
@@ -2723,7 +2716,7 @@ test("starts the opening Inspector Fit immediately and settles in one flight", a
.__inspectorPaintSamples = samples;
});
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
await page.waitForTimeout(600);
const samples = await page.evaluate(() => (
@@ -2765,41 +2758,47 @@ test("starts the opening Inspector Fit immediately and settles in one flight", a
expect(moving[0]!.elapsed - visible[0]!.elapsed).toBeLessThan(80);
});
test("aligns the pill and the Map's camera controls on one center line, mirrored at the edges", async ({ page }) => {
test("aligns the pill, camera controls, and collapsed Inspector chrome on one center line", async ({ page }) => {
await page.goto("/map?screen=settings-root");
await page.getByRole("button", { name: "Close inspector" }).click();
const pill = page.locator(".left-panel-collapsed-pill");
const camera = page.getByRole("group", { name: "Canvas camera controls" });
const fit = camera.getByRole("button", { name: "Fit canvas", exact: true });
const inspector = page.locator(".right-float");
const share = camera.getByRole("button", { name: "Toggle theme", exact: true });
await expect(pill).toBeVisible();
await expect(camera).toBeVisible();
// The closed Inspector leaves nothing behind in the top right.
await expect(page.getByRole("button", { name: "Expand inspector" })).toHaveCount(0);
await expect(inspector).toBeVisible();
const [pillBox, cameraBox, fitBox] = await Promise.all([
const [pillBox, cameraBox, inspectorBox, shareBox] = await Promise.all([
pill.boundingBox(),
camera.boundingBox(),
fit.boundingBox(),
inspector.boundingBox(),
share.boundingBox(),
]);
expect(pillBox).not.toBeNull();
expect(cameraBox).not.toBeNull();
expect(fitBox).not.toBeNull();
expect(inspectorBox).not.toBeNull();
expect(shareBox).not.toBeNull();
expect(Math.abs(pillBox!.y - 14)).toBeLessThanOrEqual(1);
expect(Math.abs(pillBox!.height - 42)).toBeLessThanOrEqual(1);
expect(Math.abs(cameraBox!.y - 14)).toBeLessThanOrEqual(1);
expect(Math.abs(cameraBox!.height - 42)).toBeLessThanOrEqual(1);
expect(Math.abs(fitBox!.height - 32)).toBeLessThanOrEqual(1);
expect(Math.abs(pillBox!.y + pillBox!.height / 2 - (cameraBox!.y + cameraBox!.height / 2))).toBeLessThanOrEqual(1);
// The controls sit as far from the right edge as the pill does from the left.
expect(Math.abs(page.viewportSize()!.width - (cameraBox!.x + cameraBox!.width) - pillBox!.x)).toBeLessThanOrEqual(1);
expect(Math.abs(inspectorBox!.y - 14)).toBeLessThanOrEqual(1);
expect(Math.abs(inspectorBox!.height - 42)).toBeLessThanOrEqual(1);
expect(Math.abs(shareBox!.height - 32)).toBeLessThanOrEqual(1);
const centerLine = cameraBox!.y + cameraBox!.height / 2;
for (const box of [pillBox!, inspectorBox!]) {
expect(Math.abs(box.y + box.height / 2 - centerLine)).toBeLessThanOrEqual(1);
}
});
test("floats the pill over the canvas and remembers the Inspector across a reload", async ({ page }) => {
await page.goto("/map");
await expect(page.locator(".right-panel")).toHaveCount(0);
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
// The pill and the Inspector share one panel surface.
const expandedPanelBackground = await page.locator(".left-panel-collapsed-pill").evaluate(
(element) => getComputedStyle(element).backgroundColor,
@@ -2834,20 +2833,31 @@ test("floats the pill over the canvas and remembers the Inspector across a reloa
await page.getByRole("button", { name: "Close inspector" }).click();
await expect(page.locator(".right-panel")).toHaveCount(0);
const canvasActions = page.getByRole("toolbar", { name: "Canvas actions" });
const cameraControls = page.getByRole("group", { name: "Canvas camera controls" });
const canvasToolbar = page.getByRole("toolbar", { name: "Canvas tools" });
const minimap = page.getByTestId("canvas-minimap");
// Closed, the Inspector leaves no toolbar of its own; the camera controls stay one floating group.
await expect(page.getByRole("toolbar", { name: "Canvas actions" })).toHaveCount(0);
await expect(canvasActions).toBeVisible();
await expect(cameraControls).toBeVisible();
await expect(canvasToolbar).toBeVisible();
await expect(minimap).toBeVisible();
await expect(canvasActions).toHaveCSS("background-color", expandedPanelBackground);
await expect(cameraControls).toHaveCSS("background-color", expandedPanelBackground);
await expect(cameraControls).toHaveCSS("border-top-width", "1px");
await expect(cameraControls.locator(".camera-control-divider").first()).toBeVisible();
await expect(canvasActions).toHaveCSS("border-top-width", "0px");
await expect(cameraControls).toHaveCSS("border-top-width", "0px");
await expect(cameraControls.locator(".camera-control-divider").first()).toBeHidden();
const [actionsBox, cameraBox] = await Promise.all([
canvasActions.boundingBox(),
cameraControls.boundingBox(),
]);
expect(actionsBox).not.toBeNull();
expect(cameraBox).not.toBeNull();
const toolbarJoin = actionsBox!.x - (cameraBox!.x + cameraBox!.width);
expect(toolbarJoin).toBeGreaterThanOrEqual(-1.5);
expect(toolbarJoin).toBeLessThanOrEqual(0.5);
const [leftShadow, rightShadow, toolbarShadow, toolbarBox, minimapBox] = await Promise.all([
page.locator(".left-panel-collapsed-pill").evaluate((element) => getComputedStyle(element).boxShadow),
cameraControls.evaluate((element) => getComputedStyle(element).boxShadow),
cameraControls.evaluate((element) => getComputedStyle(element, "::before").boxShadow),
canvasToolbar.evaluate((element) => getComputedStyle(element).boxShadow),
canvasToolbar.boundingBox(),
minimap.boundingBox(),
@@ -2864,7 +2874,7 @@ test("floats the pill over the canvas and remembers the Inspector across a reloa
await page.reload();
await expect(page.locator(".left-panel.collapsed")).toBeVisible();
await expect(page.locator(".right-panel")).toHaveCount(0);
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
});
@@ -2900,24 +2910,20 @@ test("keeps stateful shell control geometry stable across visual state changes",
expect(Math.abs(pillAlignment.logo - pillAlignment.pill)).toBeLessThanOrEqual(1);
expect(Math.abs(pillAlignment.name - pillAlignment.pill)).toBeLessThanOrEqual(1);
// Closed, the Inspector has no button; open, an X closes it.
await expect(page.getByRole("button", { name: "Expand inspector" })).toHaveCount(0);
await openInspector(page);
const rightClosed = await geometry(page.getByRole("button", { name: "Expand inspector" }));
await expect(page.getByRole("button", { name: "Expand inspector" })
.locator("svg.lucide-panel-right")).toHaveCount(1);
await page.getByRole("button", { name: "Expand inspector" }).click();
const rightOpen = await geometry(page.getByRole("button", { name: "Close inspector" }));
// Open, the same button shows an X that closes the Inspector.
await expect(page.getByRole("button", { name: "Close inspector" })
.locator("svg.lucide-x")).toHaveCount(1);
expect(rightOpen).toEqual(rightClosed);
// The More button keeps its size whether its menu is open or not, and the theme switch keeps
// its size whichever theme is checked.
const more = page.getByRole("button", { name: "More", exact: true });
const moreClosed = await geometry(more);
await more.click();
const moreOpen = await geometry(more);
expect(moreOpen).toEqual(moreClosed);
const themes = page.getByRole("menu", { name: "More" }).getByRole("group", { name: "Theme" });
const lightTheme = await geometry(themes);
await themes.getByRole("menuitemradio", { name: "Dark", exact: true }).click();
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
const darkTheme = await geometry(themes);
const themeButton = page.getByRole("button", { name: "Toggle theme" });
const lightTheme = await geometry(themeButton);
await themeButton.click();
const darkTheme = await geometry(themeButton);
expect(darkTheme).toEqual(lightTheme);
});
@@ -2930,7 +2936,7 @@ test("migrates the legacy shared panel preference once into the Inspector prefer
right: localStorage.getItem("expo-explore:right-panel-collapsed"),
}))).toEqual({ legacy: null, right: "true" });
await openInspector(page);
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.locator(".right-panel")).toBeVisible();
});
@@ -3004,18 +3010,14 @@ test("drives the shell from the keyboard, and says so on hover", async ({ page }
// Every remaining shortcut is discoverable: the tooltip prints the key next to the label.
await compareButton.hover();
await expect(page.locator(".tooltip-key")).toHaveText("C");
await page.getByRole("button", { name: "Expand inspector" }).hover();
await expect(page.locator(".tooltip-key")).toHaveText("I");
// The theme button names the mode in force, and T is its key.
const themeButton = page.getByRole("button", { name: "Toggle theme" });
await themeButton.hover();
await expect(page.locator(".tooltip-content")).toContainText("Theme: Auto");
await expect(page.locator(".tooltip-key")).toHaveText("T");
await page.mouse.move(0, 0);
// The More menu's theme row checks the mode in force, and prints T as its key.
const themeChoice = async () => {
await page.getByRole("button", { name: "More", exact: true }).click();
const menu = page.getByRole("menu", { name: "More" });
await expect(menu.getByRole("group", { name: "Theme" }).locator("kbd")).toHaveText("T");
const checked = await menu.getByRole("menuitemradio", { checked: true }).getAttribute("aria-label");
await page.keyboard.press("Escape");
await expect(menu).toHaveCount(0);
return checked;
};
expect(await themeChoice()).toBe("Auto");
const initialTheme = await page.locator("html").getAttribute("data-theme");
expect(initialTheme === "light" || initialTheme === "dark").toBe(true);
const otherTheme = initialTheme === "dark" ? "light" : "dark";
@@ -3024,7 +3026,9 @@ test("drives the shell from the keyboard, and says so on hover", async ({ page }
await expect(page.locator("html")).toHaveAttribute("data-theme", otherTheme);
await page.keyboard.press("t");
await expect(page.locator("html")).toHaveAttribute("data-theme", initialTheme!);
expect(await themeChoice()).toBe(initialTheme === "dark" ? "Dark" : "Light");
await themeButton.hover();
await expect(page.locator(".tooltip-content")).toContainText(initialTheme === "dark" ? "Theme: Dark" : "Theme: Light");
await page.mouse.move(0, 0);
// The retired theme and inspector chords no longer answer.
await page.keyboard.press(`${mod}+Alt+t`);
await expect(page.locator("html")).toHaveAttribute("data-theme", initialTheme!);
@@ -3077,7 +3081,7 @@ test("keeps fixed objects and canvas pan after a reload", async ({ page }) => {
test("delays the first tooltip, then shows subsequent tooltips instantly", async ({ page }) => {
await page.goto("/map");
const menu = page.locator(".left-panel-collapsed-pill").getByRole("button", { name: "Map", exact: true });
const changes = page.getByRole("button", { name: "Fit canvas", exact: true });
const changes = page.getByRole("button", { name: "Expand inspector" });
const tooltip = page.locator(".tooltip");
await menu.hover();
@@ -3087,7 +3091,7 @@ test("delays the first tooltip, then shows subsequent tooltips instantly", async
await expect(tooltip).not.toHaveAttribute("data-instant", "");
await changes.hover();
await expect(tooltip).toContainText("Fit canvas", { timeout: 150 });
await expect(tooltip).toContainText("Expand inspector", { timeout: 150 });
await expect(tooltip).toHaveAttribute("data-instant", "");
await expect(tooltip).toHaveCSS("animation-name", "none");
@@ -3096,7 +3100,7 @@ test("delays the first tooltip, then shows subsequent tooltips instantly", async
await changes.hover();
await page.waitForTimeout(150);
await expect(tooltip).toHaveCount(0);
await expect(tooltip).toContainText("Fit canvas");
await expect(tooltip).toContainText("Expand inspector");
await expect(tooltip).not.toHaveAttribute("data-instant", "");
});
@@ -3125,10 +3129,9 @@ test("follows system theme and polls lightweight status instead of the full map"
await chooseTheme(page, "light");
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
expect(await page.evaluate(() => localStorage.getItem("expo-explore:theme"))).toBe("light");
// The More menu checks the mode in force.
await page.getByRole("button", { name: "More", exact: true }).click();
await expect(page.getByRole("menuitemradio", { name: "Light", exact: true })).toHaveAttribute("aria-checked", "true");
await page.keyboard.press("Escape");
// The button shows the mode in force (Light), not the next one.
await expect(page.getByRole("button", { name: "Toggle theme" })
.locator("svg.lucide-sun")).toBeVisible();
await page.waitForTimeout(5_500);
expect(mapRequests).toBe(1);
@@ -3151,7 +3154,7 @@ test("zooms Map inspection up to 25600% without exceeding the ceiling", async ({
test.setTimeout(30_000);
await page.goto("/map");
await expect(page.locator(".map-canvas.canvas-projection-animating")).toHaveCount(0);
await expect(page.getByRole("group", { name: "Canvas camera controls" })).toBeVisible();
await expect(page.locator(".right-float")).toBeVisible();
await page.keyboard.press("Shift+0");
await expect(page.getByRole("button", { name: "Zoom — 100%" })).toBeVisible();
@@ -3172,11 +3175,10 @@ test("zooms Map inspection up to 25600% without exceeding the ceiling", async ({
await expect(zoom).toBeVisible();
expect(scaleFromTransform(await viewport.getAttribute("style"))).toBe(256);
const zoomBox = await zoom.boundingBox();
const cameraBox = await page.getByRole("group", { name: "Canvas camera controls" }).boundingBox();
const shareBox = await page.locator(".right-float").boundingBox();
expect(zoomBox).not.toBeNull();
expect(cameraBox).not.toBeNull();
expect(zoomBox!.x + zoomBox!.width).toBeLessThanOrEqual(cameraBox!.x + cameraBox!.width);
expect(cameraBox!.x + cameraBox!.width).toBeLessThanOrEqual(page.viewportSize()!.width);
expect(shareBox).not.toBeNull();
expect(zoomBox!.x + zoomBox!.width).toBeLessThanOrEqual(shareBox!.x);
await page.keyboard.press("Shift+0");
await expect(page.getByRole("button", { name: "Zoom — 100%" })).toBeVisible();
@@ -3480,13 +3482,15 @@ test("restores the fitted camera after internal navigation on the Map", async ({
});
});
test("the Map's top right holds only fit, center and zoom; theme and full screen are not in the inspector header", async ({ page }) => {
test("keeps theme and full screen in the persistent canvas controls, not the inspector header", async ({ page }) => {
await page.goto("/map");
// Closed, the Inspector leaves no toggle behind: the camera controls are all there is.
// Collapsed inspector: the camera controls and the panel toggle form one toolbar.
const collapsedCamera = page.getByRole("group", { name: "Canvas camera controls" });
await expect(collapsedCamera.getByRole("button")).toHaveCount(3);
await expect(page.getByRole("button", { name: "Expand inspector" })).toHaveCount(0);
await openInspector(page);
await expect(collapsedCamera.getByRole("button", { name: "Toggle theme", exact: true })).toBeVisible();
await expect(collapsedCamera.getByRole("button", { name: "Enter full screen", exact: true })).toBeVisible();
await expect(page.locator(".right-float button")).toHaveCount(1);
await expect(page.locator(".right-float button")).toHaveAccessibleName("Expand inspector");
await page.getByRole("button", { name: "Expand inspector" }).click();
await expect(page.getByRole("button", { name: /Share/ })).toHaveCount(0);
await expect(page.locator(".right-head button")).toHaveCount(1);
await expect(page.locator(".right-head button")).toHaveAccessibleName("Close inspector");
@@ -3504,19 +3508,18 @@ test("the Map's top right holds only fit, center and zoom; theme and full screen
await expect(cameraControls).toBeVisible();
await expect(cameraControls).not.toHaveCSS("background-color", "rgba(0, 0, 0, 0)");
await expect(cameraControls).toHaveCSS("border-top-width", "1px");
await expect(cameraControls.locator(".camera-control-divider")).toHaveCount(1);
await expect(cameraControls.locator(".camera-control-divider")).toHaveCount(3);
const cameraButtons = cameraControls.getByRole("button");
await expect(cameraButtons).toHaveCount(3);
await expect(cameraButtons.nth(0)).toHaveAccessibleName("Fit canvas");
await expect(cameraButtons.nth(1)).toHaveAccessibleName("Center canvas");
await expect(cameraButtons.nth(2)).toHaveAccessibleName(/^Zoom — /);
await expect(page.getByRole("button", { name: /Toggle theme|full screen/ })).toHaveCount(0);
await expect(cameraButtons).toHaveCount(5);
await expect(cameraButtons.nth(3)).toHaveAccessibleName("Toggle theme");
await expect(cameraButtons.nth(4)).toHaveAccessibleName("Enter full screen");
for (const button of await cameraButtons.all()) {
await expect(button).toHaveCSS("border-top-width", "0px");
await expect(button).toHaveCSS("background-color", "rgba(0, 0, 0, 0)");
}
await expect(page.locator(".app-content > .canvas-camera-controls")).toHaveCount(1);
await expect(page.locator(".right-panel .canvas-camera-controls")).toHaveCount(0);
await expect(page.locator(".right-panel .canvas-camera-controls, .right-float .canvas-camera-controls"))
.toHaveCount(0);
const zoomButton = cameraControls.getByRole("button", { name: /^Zoom — / });
await expect(zoomButton).toBeVisible();
await expect(zoomButton.locator("svg")).toHaveCount(0);
@@ -3570,10 +3573,11 @@ test("the Map's top right holds only fit, center and zoom; theme and full screen
await expect.poll(async () => scaleFromTransform(await viewport.getAttribute("style")))
.toBeCloseTo(pannedScale, 6);
// The theme changes the page theme without changing the route.
// The theme toggle changes the page theme without changing the route.
const canonical = page.url();
const themeBefore = await page.locator("html").getAttribute("data-theme");
await chooseTheme(page, themeBefore === "dark" ? "light" : "dark");
await cameraControls.getByRole("button", { name: "Toggle theme", exact: true }).click();
await expect(page.locator("html")).not.toHaveAttribute("data-theme", themeBefore!);
await expect(page).toHaveURL(canonical);
await expect(page.getByRole("dialog")).toHaveCount(0);
@@ -4085,10 +4089,10 @@ test("reload max-fits the comparison overview with the Inspector collapsed", asy
await page.setViewportSize({ width: 1600, height: 900 });
await page.goto("/map");
await expect(page.locator(".react-flow__node-screen")).toHaveCount(SCREEN_COUNT);
await expect(page.locator(".right-panel")).toHaveCount(0);
await expect(page.getByRole("button", { name: "Expand inspector" })).toBeVisible();
await page.reload();
await expect(page.locator(".react-flow__node-screen")).toHaveCount(SCREEN_COUNT);
await expect(page.locator(".right-panel")).toHaveCount(0);
await expect(page.getByRole("button", { name: "Expand inspector" })).toBeVisible();
const viewport = page.locator(".map-canvas .react-flow__viewport");
await expect(viewport).toBeVisible();
@@ -4682,10 +4686,10 @@ test.describe("phone layout", () => {
await page.goto("/map");
const tabs = page.getByRole("navigation", { name: "Views" });
await expect(tabs).toBeVisible();
// Desktop chrome is gone: the floating toolbar with its More menu, the camera controls and the
// minimap.
// Desktop chrome is gone: the floating toolbar with its shortcuts button, the camera controls
// and the minimap.
await expect(page.getByRole("toolbar", { name: "Canvas tools" })).toHaveCount(0);
await expect(page.getByRole("button", { name: "More", exact: true })).toHaveCount(0);
await expect(page.getByRole("button", { name: "Keyboard shortcuts" })).toHaveCount(0);
await expect(page.locator(".canvas-camera-controls")).toHaveCount(0);
await expect(tabs.getByRole("button", { name: /Compare/ })).toBeEnabled();
@@ -5200,312 +5204,40 @@ test.describe("phone layout", () => {
});
});
test("the theme is Auto until the More menu picks one: it follows the system, and a pick outlives a reload", async ({ page }) => {
test("the theme is Auto until the toggle picks one: it follows the system, then steps Dark → Light → Auto and keeps the pick", async ({ page }) => {
await page.emulateMedia({ colorScheme: "dark" });
await page.goto("/map");
const html = page.locator("html");
const more = page.getByRole("button", { name: "More", exact: true });
const menu = page.getByRole("menu", { name: "More" });
const theme = (name: "Auto" | "Light" | "Dark") => menu.getByRole("menuitemradio", { name, exact: true });
const button = page.getByRole("button", { name: "Toggle theme" });
await expect(html).toHaveAttribute("data-theme", "dark");
await more.click();
await expect(theme("Auto")).toHaveAttribute("aria-checked", "true");
await expect(button).toHaveAttribute("data-theme-preference", "system");
await button.hover();
await expect(page.locator(".tooltip-content")).toContainText("Theme: Auto (system)");
// Auto tracks the system while it is in force.
await page.emulateMedia({ colorScheme: "light" });
await expect(html).toHaveAttribute("data-theme", "light");
// A pick applies at once and keeps the menu open, so the switch shows it.
await theme("Dark").click();
await button.click();
await expect(html).toHaveAttribute("data-theme", "dark");
await expect(theme("Dark")).toHaveAttribute("aria-checked", "true");
await expect(theme("Auto")).toHaveAttribute("aria-checked", "false");
await theme("Light").click();
await expect(button).toHaveAttribute("data-theme-preference", "dark");
await expect(page.locator(".tooltip-content")).toContainText("Theme: Dark");
await button.click();
await expect(html).toHaveAttribute("data-theme", "light");
await theme("Auto").click();
await expect(theme("Auto")).toHaveAttribute("aria-checked", "true");
await expect(button).toHaveAttribute("data-theme-preference", "light");
await button.click();
await expect(button).toHaveAttribute("data-theme-preference", "system");
await expect(html).toHaveAttribute("data-theme", "light");
await page.emulateMedia({ colorScheme: "dark" });
await expect(html).toHaveAttribute("data-theme", "dark");
// A picked theme outlives a reload and ignores the system.
await theme("Light").click();
await page.keyboard.press("Escape");
await button.click();
await expect(button).toHaveAttribute("data-theme-preference", "dark");
await button.click();
await expect(button).toHaveAttribute("data-theme-preference", "light");
await page.reload();
await expect(html).toHaveAttribute("data-theme", "light");
await page.getByRole("button", { name: "More", exact: true }).click();
await expect(theme("Light")).toHaveAttribute("aria-checked", "true");
});
/** Stands in for the browser's full screen, which headless Chromium cannot enter, and records the calls. */
async function stubFullscreen(page: Page) {
await page.addInitScript(() => {
const host = window as typeof window & { __fullscreenCalls: string[] };
host.__fullscreenCalls = [];
let element: Element | null = null;
Object.defineProperty(Document.prototype, "fullscreenElement", { configurable: true, get: () => element });
Element.prototype.requestFullscreen = function requestFullscreen() {
host.__fullscreenCalls.push("enter");
element = document.documentElement;
document.dispatchEvent(new Event("fullscreenchange"));
return Promise.resolve();
};
Document.prototype.exitFullscreen = function exitFullscreen() {
host.__fullscreenCalls.push("exit");
element = null;
document.dispatchEvent(new Event("fullscreenchange"));
return Promise.resolve();
};
});
}
function fullscreenCalls(page: Page) {
return page.evaluate(() => (window as typeof window & { __fullscreenCalls: string[] }).__fullscreenCalls);
}
/** The visible buttons in the window's top-right corner, where the camera controls sit on the Map. */
async function topRightButtons(page: Page) {
return page.evaluate(() => [...document.querySelectorAll<HTMLElement>("button, [role='button']")]
.filter((element) => {
const box = element.getBoundingClientRect();
if (box.width === 0 || box.height === 0 || getComputedStyle(element).visibility === "hidden") return false;
return box.bottom <= 80 && box.right >= window.innerWidth - 240;
})
.map((element) => element.getAttribute("aria-label") ?? element.textContent?.trim() ?? ""));
}
test("the bottom bar's More menu holds the theme, full screen and keyboard shortcuts, each with its key", async ({ page }) => {
await stubFullscreen(page);
await page.emulateMedia({ colorScheme: "light" });
await page.goto("/map");
const toolbar = page.getByRole("toolbar", { name: "Canvas tools" });
const more = toolbar.getByRole("button", { name: "More", exact: true });
// The keyboard button became More; it is the bar's last button.
await expect(toolbar.getByRole("button", { name: "Keyboard shortcuts" })).toHaveCount(0);
await expect(toolbar.getByRole("button").last()).toHaveAccessibleName("More");
await expect(more).toHaveAttribute("aria-haspopup", "menu");
await expect(more).toHaveAttribute("aria-expanded", "false");
await more.click();
const menu = page.getByRole("menu", { name: "More" });
await expect(menu).toBeVisible();
await expect(more).toHaveAttribute("aria-expanded", "true");
// It opens above the bar, anchored to the button.
const [menuBox, moreBox, toolbarBox] = await Promise.all([menu.boundingBox(), more.boundingBox(), toolbar.boundingBox()]);
expect(menuBox!.y + menuBox!.height).toBeLessThan(toolbarBox!.y);
expect(Math.abs(menuBox!.x + menuBox!.width - (moreBox!.x + moreBox!.width))).toBeLessThanOrEqual(2);
// Rows: Theme (a group of three radio items), Full screen, Keyboard shortcuts, in sentence case.
const themes = menu.getByRole("group", { name: "Theme" });
expect(await themes.getByRole("menuitemradio").evaluateAll((items) => items.map((item) => item.getAttribute("aria-label"))))
.toEqual(["Auto", "Light", "Dark"]);
await expect(menu.getByRole("menuitem")).toHaveCount(2);
await expect(menu.getByRole("menuitem").nth(0)).toHaveAccessibleName("Full screen");
await expect(menu.getByRole("menuitem").nth(1)).toHaveAccessibleName("Keyboard shortcuts");
await expect(menu.getByRole("menuitemcheckbox")).toHaveAccessibleName("Inspector");
await expect(menu.locator(".more-menu-label")).toHaveText(["Theme", "Full screen", "Inspector", "Keyboard shortcuts"]);
await expect(menu.locator("kbd")).toHaveText(["T", "F", "I", "?"]);
for (const label of await menu.locator(".more-menu-label").all()) {
await expect(label).toHaveCSS("text-transform", "none");
}
// It opens on the current theme; the arrows walk the rows and the switch, Esc closes it and
// returns focus to More.
await expect(themes.getByRole("menuitemradio", { name: "Auto" })).toBeFocused();
await expect(themes.getByRole("menuitemradio", { name: "Auto" })).toHaveAttribute("aria-checked", "true");
await page.keyboard.press("ArrowRight");
await expect(themes.getByRole("menuitemradio", { name: "Light" })).toBeFocused();
await page.keyboard.press("ArrowDown");
await expect(menu.getByRole("menuitem", { name: "Full screen" })).toBeFocused();
await page.keyboard.press("ArrowDown");
await expect(menu.getByRole("menuitemcheckbox", { name: "Inspector" })).toBeFocused();
await page.keyboard.press("ArrowDown");
await expect(menu.getByRole("menuitem", { name: "Keyboard shortcuts" })).toBeFocused();
await page.keyboard.press("ArrowDown");
await expect(themes.getByRole("menuitemradio", { name: "Auto" })).toBeFocused();
await page.keyboard.press("Escape");
await expect(menu).toHaveCount(0);
await expect(more).toBeFocused();
await expect(more).toHaveAttribute("aria-expanded", "false");
// The switch sets the theme and keeps the menu open; T still flips it, and the switch follows.
await more.click();
await themes.getByRole("menuitemradio", { name: "Dark" }).click();
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
await expect(themes.getByRole("menuitemradio", { name: "Dark" })).toHaveAttribute("aria-checked", "true");
await expect(menu).toBeVisible();
await page.keyboard.press("t");
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
await expect(themes.getByRole("menuitemradio", { name: "Light" })).toHaveAttribute("aria-checked", "true");
// Full screen: the row enters it and closes the menu; the row then offers the way out.
await menu.getByRole("menuitem", { name: "Full screen" }).click();
await expect(menu).toHaveCount(0);
expect(await fullscreenCalls(page)).toEqual(["enter"]);
await more.click();
await expect(menu.getByRole("menuitem", { name: "Exit full screen" })).toBeVisible();
await page.keyboard.press("Escape");
// F is the same toggle from the keyboard.
await page.keyboard.press("f");
expect(await fullscreenCalls(page)).toEqual(["enter", "exit"]);
await page.keyboard.press("f");
expect(await fullscreenCalls(page)).toEqual(["enter", "exit", "enter"]);
await more.click();
await expect(menu.getByRole("menuitem", { name: "Exit full screen" })).toBeVisible();
await page.keyboard.press("Escape");
await page.keyboard.press("f");
// Keyboard shortcuts opens the reference, which lists F.
await more.click();
await menu.getByRole("menuitem", { name: "Keyboard shortcuts" }).click();
await expect(menu).toHaveCount(0);
const dialog = page.getByRole("dialog", { name: "Keyboard shortcuts" });
await expect(dialog).toBeVisible();
await expect(dialog.locator(".shortcuts-row", { hasText: "Enter or exit full screen" }).locator("kbd")).toHaveText("F");
await page.keyboard.press("Escape");
await expect(dialog).toHaveCount(0);
// ? still opens it too.
await page.keyboard.press("?");
await expect(dialog).toBeVisible();
});
for (const [setup, withoutFullscreen] of [
// iPhone Safari has no element full screen.
["no element full screen", async (page: Page) => page.addInitScript(() => {
delete (Element.prototype as Partial<Element>).requestFullscreen;
})],
// A frame not allowed full screen (an embedded Viewer) has the method, but every request fails.
["a frame without full screen", async (page: Page) => {
await stubFullscreen(page);
await page.addInitScript(() => {
Object.defineProperty(Document.prototype, "fullscreenEnabled", { configurable: true, get: () => false });
});
}],
] as const) {
test(`without the browser's full screen (${setup}), the More menu, F and the shortcuts leave it out`, async ({ page }) => {
await withoutFullscreen(page);
await page.goto("/map");
await page.getByRole("button", { name: "More", exact: true }).click();
const menu = page.getByRole("menu", { name: "More" });
await expect(menu.getByRole("menuitem")).toHaveCount(1);
await expect(menu.getByRole("menuitem", { name: /full screen/i })).toHaveCount(0);
await expect(menu.locator("kbd")).toHaveText(["T", "I", "?"]);
await page.keyboard.press("Escape");
await page.keyboard.press("f");
expect(await page.evaluate(() => (window as typeof window & { __fullscreenCalls?: string[] }).__fullscreenCalls ?? [])).toEqual([]);
await page.keyboard.press("?");
await expect(page.getByRole("dialog", { name: "Keyboard shortcuts" })).not.toContainText("full screen");
});
}
test("the More menu's keys are its own: on Compare, ← → step no screen behind it, and ? hands focus back to More", async ({ page }) => {
await page.setViewportSize({ width: 1440, height: 860 });
await serveWorkspace(page);
await page.goto("/compare?screen=current-profile");
const compare = page.locator(".compare-section");
const route = compare.locator(".compare-bar .compare-nav-route");
await expect(route).toHaveText("/current-profile");
const more = page.getByRole("button", { name: "More", exact: true });
const menu = page.getByRole("menu", { name: "More" });
// Compare has no Inspector, so the menu leaves its row out.
await more.click();
await expect(menu.getByRole("menuitemcheckbox", { name: "Inspector" })).toHaveCount(0);
// ← and → on a row that is not the theme switch do nothing, and step no screen behind the menu.
await page.keyboard.press("ArrowDown");
await expect(menu.getByRole("menuitem").first()).toBeFocused();
await page.keyboard.press("ArrowRight");
await page.keyboard.press("ArrowLeft");
await page.keyboard.press("ArrowRight");
await expect(menu).toBeVisible();
await expect(route).toHaveText("/current-profile");
await expect(page).toHaveURL(/screen=current-profile/);
await page.keyboard.press("Escape");
await expect(menu).toHaveCount(0);
// ? opens the shortcuts as the row does; closing them returns focus to More.
await more.click();
await page.keyboard.press("?");
const dialog = page.getByRole("dialog", { name: "Keyboard shortcuts" });
await expect(dialog).toBeVisible();
await expect(menu).toHaveCount(0);
await page.keyboard.press("Escape");
await expect(dialog).toHaveCount(0);
await expect(more).toBeFocused();
});
test("with nothing selected, the More menu's Inspector row opens the Inspector, and the open menu follows the bar it moves", async ({ page }) => {
await page.setViewportSize({ width: 1000, height: 820 });
await page.goto("/map");
const more = page.getByRole("button", { name: "More", exact: true });
const menu = page.getByRole("menu", { name: "More" });
const inspector = page.locator(".right-panel");
await expect(inspector).toHaveCount(0);
await more.click();
const row = menu.getByRole("menuitemcheckbox", { name: "Inspector" });
await expect(row).toHaveAttribute("aria-checked", "false");
await expect(row).toHaveAttribute("aria-keyshortcuts", "I");
await row.click();
await expect(menu).toHaveCount(0);
await expect(inspector).toBeVisible();
await more.click();
await expect(row).toHaveAttribute("aria-checked", "true");
await row.click();
await expect(inspector).toHaveCount(0);
// I opens the Inspector with the menu up; the bar moves left out of its way, and the menu with it.
await more.click();
await expect(menu).toBeVisible();
const before = (await more.boundingBox())!;
await page.keyboard.press("i");
await expect(inspector).toBeVisible();
await expect.poll(async () => (await more.boundingBox())!.x).toBeLessThan(before.x - 1);
await expect(menu).toBeVisible();
await expect.poll(async () => {
const [menuBox, moreBox] = await Promise.all([menu.boundingBox(), more.boundingBox()]);
return Math.abs(menuBox!.x + menuBox!.width - (moreBox!.x + moreBox!.width));
}).toBeLessThanOrEqual(2);
});
test("in a window too short for it, the More menu scrolls", async ({ page }) => {
await page.setViewportSize({ width: 1180, height: 150 });
await page.goto("/map");
await page.getByRole("button", { name: "More", exact: true }).click();
const popover = page.locator(".menu-popover.more-menu");
await expect(popover).toBeVisible();
expect(await popover.evaluate((element) => element.scrollHeight > element.clientHeight)).toBe(true);
const box = (await popover.boundingBox())!;
expect(box.y + box.height).toBeLessThanOrEqual(150);
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await page.mouse.wheel(0, 200);
await expect.poll(() => popover.evaluate((element) => element.scrollTop)).toBeGreaterThan(0);
await expect(page.getByRole("menu", { name: "More" }).getByRole("menuitem", { name: "Keyboard shortcuts" })).toBeInViewport({ ratio: 1 });
});
test("the top right is the camera's alone: fit, center and zoom on the Map, nothing on Screens or Compare", async ({ page }) => {
await page.setViewportSize({ width: 1440, height: 900 });
await serveWorkspace(page);
await page.goto("/map");
const camera = page.getByRole("group", { name: "Canvas camera controls" });
await expect(camera).toBeVisible();
expect(await topRightButtons(page)).toEqual(["Fit canvas", "Center canvas", expect.stringMatching(/^Zoom — \d+%$/)]);
// With the Inspector open the camera keeps to the canvas beside it; the Inspector's header has
// only its own actions.
await openInspector(page);
await expect(camera.getByRole("button")).toHaveCount(3);
await page.getByRole("button", { name: "Close inspector" }).click();
await expect(page.locator(".right-panel")).toHaveCount(0);
await chooseCanvasView(page, "Screens");
await expect(page).toHaveURL(/\/screens/);
await expect(page.locator(".screens-page .screens-cell").first()).toBeVisible();
await expect(page.locator(".canvas-camera-controls")).toHaveCount(0);
expect(await topRightButtons(page)).toEqual([]);
await page.goto("/compare?screen=current-profile");
await expect(page.getByRole("region", { name: /^Compare / })).toBeVisible();
await expect(page.locator(".canvas-camera-controls")).toHaveCount(0);
expect(await topRightButtons(page)).toEqual([]);
await expect(page.getByRole("button", { name: "Toggle theme" })).toHaveAttribute("data-theme-preference", "light");
});
test("/ finds screens on the Screens page: the tree and the grid narrow to the query, Enter picks the first match, Esc clears then closes", async ({ page }) => {
-10
View File
@@ -17,16 +17,6 @@ test("the bounds are in the panel's own pixels when the chrome is zoomed", () =>
assert.deepEqual(inspectorWidthBounds(1600, 0), inspectorWidthBounds(1600, 1));
});
test("the Inspector stops where the canvas keeps the bottom bar's room, never below the minimum", () => {
// 820 - 424 leaves 396, less than half of 820.
assert.deepEqual(inspectorWidthBounds(820, 1, 424), { min: INSPECTOR_WIDTH_MIN, max: 396 });
// In a wide window half of it is the tighter cap.
assert.deepEqual(inspectorWidthBounds(1440, 1, 424), { min: INSPECTOR_WIDTH_MIN, max: 720 });
// The room is in window pixels, the width in the panel's own: (1000 - 530) / 1.25 = 376.
assert.deepEqual(inspectorWidthBounds(1000, 1.25, 530), { min: INSPECTOR_WIDTH_MIN, max: 376 });
assert.deepEqual(inspectorWidthBounds(700, 1, 424), { min: INSPECTOR_WIDTH_MIN, max: INSPECTOR_WIDTH_MIN });
});
test("a width is clamped to the bounds and rounded to whole pixels", () => {
const bounds = { min: 320, max: 720 };
assert.equal(clampInspectorWidth(100, bounds), 320);
-4
View File
@@ -113,10 +113,6 @@ test("the palette's commands follow the canvas: Compare steps changes with the a
assert.ok(!ids(compare).includes("go:compare"));
assert.ok(ids(compare).includes("go:map"));
// Full screen, where the browser has it, prints F; without it there is no command.
assert.equal(commandItems({ ...base, canvas: "map", fullscreen: false }, actions).find((item) => item.id === "command:view:fullscreen").shortcut, "F");
assert.ok(!ids(map).includes("view:fullscreen"));
// A phone has no keyboard shortcuts to list.
assert.ok(ids(map).includes("go:shortcuts"));
assert.ok(!ids(commandItems({ ...base, canvas: "map", phone: true }, actions)).includes("go:shortcuts"));
-8
View File
@@ -70,11 +70,3 @@ test("⌥1–⌥8 open a target by its place, with ⌥ alone; D and ` are plain
assert.ok(matchesShortcut(key("KeyD"), SHORTCUTS.target.menu));
assert.ok(matchesShortcut(key("Backquote"), SHORTCUTS.target.last));
});
test("F is full screen, a plain key: ⌘F stays the browser's find", () => {
assert.equal(formatShortcut(SHORTCUTS.view.fullscreen, true), "F");
assert.ok(matchesShortcut(key("KeyF"), SHORTCUTS.view.fullscreen));
assert.ok(!matchesShortcut(key("KeyF", { metaKey: true }), SHORTCUTS.view.fullscreen));
assert.ok(!matchesShortcut(key("KeyF", { ctrlKey: true }), SHORTCUTS.view.fullscreen));
assert.ok(!matchesShortcut(key("KeyF", { shiftKey: true }), SHORTCUTS.view.fullscreen));
});
+13 -20
View File
@@ -7,13 +7,12 @@ import { isEmbeddedArtifactUrl, leaseEmbeddedArtifactUrl, optionalStorage, viewe
import { REPORT_SOURCE } from "./utils/report-source";
import { CanvasToolbar } from "./components/canvas/toolbar";
import { CanvasCameraControls } from "./components/canvas/camera-controls";
import { MoreMenu } from "./components/canvas/more-menu";
import { CanvasVisibleFrameProvider } from "./components/canvas/visible-frame-provider";
import { AppLoading } from "./components/shared/app-loading";
import { ReportLoadingShell } from "./components/shared/report-loading-shell";
import { screenLabel } from "./utils/screen-path";
import { AppPill, PLATFORM_NAMES, runTargets, siblingReportUrl, targetSwitch } from "./components/panels/app-pill";
import { fullscreenSupported, useFullscreen } from "./components/panels/shell-actions";
import { useFullscreen } from "./components/panels/shell-actions";
import { getCanvasZoomState, runCanvasZoomCommand } from "./utils/canvas-zoom";
import { commandItems, suggestedCommands } from "./utils/commands";
import { changedScreens, focusCounts as countFocusStatuses, isCapturedChange, type ChangedScreen } from "./utils/changed-screens";
@@ -384,8 +383,11 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
const revisionRef = useRef<{ runId: string; revision: number } | undefined>(undefined);
const pollingRef = useRef(false);
const theme = themePreference === "system" ? preferredSystemTheme : themePreference;
// The T key flips what is on screen, dark to light and back; only the More menu's theme switch
// (or the palette) returns to Auto.
// Auto → Dark → Light → Auto, as the button's tooltip spells out.
const toggleTheme = useCallback(() => {
setThemePreference(current => current === "system" ? "dark" : current === "dark" ? "light" : "system");
}, []);
// The T key flips what is on screen, dark to light and back; only the button returns to Auto.
const flipTheme = useCallback(() => {
setThemePreference(current => (current === "system" ? preferredSystemTheme : current) === "dark" ? "light" : "dark");
}, [preferredSystemTheme]);
@@ -1041,10 +1043,6 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
setHandoffOpen(true);
} else if (matchesShortcut(event, SHORTCUTS.appearance.theme)) {
flipTheme();
} else if (matchesShortcut(event, SHORTCUTS.view.fullscreen)) {
// The More menu and the palette offer full screen only where the browser has it.
if (phoneRef.current || !fullscreenSupported()) return;
toggleFullscreen();
} else if (matchesShortcut(event, SHORTCUTS.appearance.app)) {
// Only a report captured in both schemes has another appearance to show.
const { options, current } = appearanceRef.current;
@@ -1066,7 +1064,7 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
return () => {
window.removeEventListener("keydown", onKeyDown);
};
}, [chooseAppearance, clearSelectedScreen, flipTheme, navigate, searchOpen, selectCanvas, toggleFullscreen, toggleRightPanel]);
}, [chooseAppearance, clearSelectedScreen, flipTheme, navigate, searchOpen, selectCanvas, toggleRightPanel]);
// A side-panel row or a deep link is a "go to": the camera fits that screen and the step is
// kept. Screens inventory clicks only select in place; Map clicks also focus the chosen screen. Repeating a selected target refits it without adding history.
@@ -1576,7 +1574,7 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
theme: themePreference,
appearances: appearances.length > 1 ? appearances.map((option) => ({ id: option, label: appearanceLabel(option), current: option === appearance })) : [],
inspector: phone || comparingScreens ? undefined : { open: !rightCollapsed },
fullscreen: !phone && fullscreenSupported() ? fullscreen : undefined,
fullscreen: !phone && typeof document.documentElement.requestFullscreen === "function" ? fullscreen : undefined,
targets: (() => {
const run = runTargets(map.run);
const noun = run.targets.every((target) => target.id === target.platform) ? "platform" as const : "device" as const;
@@ -1694,8 +1692,10 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
/>
)}
</div>
{/* Top right holds the camera only, so only the Map has anything there. */}
{phone || route.canvas !== "map" ? null : <CanvasCameraControls />}
{phone ? null : (
<CanvasCameraControls inspectorCollapsed={comparing ? false : rightCollapsed} theme={theme} themePreference={themePreference} onToggleTheme={toggleTheme}
camera={route.canvas === "map"} />
)}
{phone ? (
<PhoneTabBar
canvas={route.canvas}
@@ -1706,13 +1706,7 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
canvas={route.canvas}
searchOpen={searchOpen}
{...(handoffAction ? { actions: handoffAction } : {})}
more={<MoreMenu
themePreference={themePreference}
onChangeTheme={setThemePreference}
{...(fullscreenSupported() ? { fullscreen: { active: fullscreen, onToggle: toggleFullscreen } } : {})}
{...(comparingScreens ? {} : { inspector: { open: !rightCollapsed, onToggle: toggleRightPanel } })}
onOpenShortcuts={() => setShortcutsOpen(true)}
/>}
onOpenShortcuts={() => setShortcutsOpen(true)}
onSelectCanvas={selectCanvas}
onOpenSearch={() => setSearchOpen(true)}
/>}
@@ -1720,7 +1714,6 @@ const ViewerApp = memo(function ViewerApp({ reportKey }: { reportKey: number })
{shortcutsOpen ? (
<ShortcutsDialog
context={{ canvas: route.canvas, review: reviewingInSidebar, hasChanges: compareOrder.length > 0, handoff: Boolean(handoffInput), appearances: appearances.length > 1,
fullscreen: !phone && fullscreenSupported(),
...(switchTargets ? { targets: switchTargets } : {}) }}
onClose={() => setShortcutsOpen(false)}
/>
@@ -6,9 +6,20 @@ import { formatShortcut, SHORTCUTS } from "../../utils/shortcuts";
import { KeyHint } from "../shared/key-hint";
import { Menu, type MenuItem } from "../shared/menu";
import { Tooltip } from "../shared/tooltip";
import { FullscreenToggleButton, ThemeToggleButton, type ShellActionsProps, type ShellTheme } from "../panels/shell-actions";
import { useCanvasVisibleFrame } from "./visible-frame-provider";
import { setFollowSelection, useFollowSelection } from "../../utils/follow-selection";
type CanvasCameraControlsProps = {
/** Makes room for the collapsed inspector controls at the window edge. */
inspectorCollapsed: boolean;
theme: ShellTheme;
themePreference: ShellActionsProps["themePreference"];
onToggleTheme: () => void;
/** Fit, center and zoom act on a canvas; a page (Screens) or Compare shows only the page actions. */
camera?: boolean;
};
const CAMERA_CONTROLS_MINIMUM_FRAME_WIDTH = 240;
function ZoomControl() {
@@ -103,11 +114,11 @@ function RecenterControl() {
}
/**
* Camera actions belong to the canvas, not to either inspector panel: fit, center and the zoom
* level, top right on the Map. Screens and Compare have no camera, so nothing renders there; the
* page-wide theme and full screen live in the bottom bar's "More" menu.
* Camera actions belong to the canvas, not to either inspector panel. The page-level theme and
* full screen actions share the toolbar, so it stays in one place whether the inspector is open
* or not.
*/
export function CanvasCameraControls() {
export function CanvasCameraControls({ inspectorCollapsed, theme, themePreference, onToggleTheme, camera = true }: CanvasCameraControlsProps) {
const { visibleFrame } = useCanvasVisibleFrame();
if (visibleFrame && visibleFrame.width < CAMERA_CONTROLS_MINIMUM_FRAME_WIDTH) return null;
const style = visibleFrame ? ({
@@ -115,12 +126,24 @@ export function CanvasCameraControls() {
} as CSSProperties) : undefined;
return (
<div className="canvas-camera-controls" style={style} role="group" aria-label="Canvas camera controls">
<div
className={`canvas-camera-controls${inspectorCollapsed ? " inspector-collapsed" : ""}`}
style={style}
role="group"
aria-label="Canvas camera controls">
<div className="canvas-camera-controls-inner">
<FitControl />
<RecenterControl />
<span className="camera-control-divider" aria-hidden="true" />
<ZoomControl />
{camera ? (
<>
<FitControl />
<span className="camera-control-divider" aria-hidden="true" />
<RecenterControl />
<span className="camera-control-divider" aria-hidden="true" />
<ZoomControl />
<span className="camera-control-divider" aria-hidden="true" />
</>
) : null}
<ThemeToggleButton theme={theme} themePreference={themePreference} onToggleTheme={onToggleTheme} className="camera-action-button" />
<FullscreenToggleButton className="camera-action-button" />
</div>
</div>
);
-180
View File
@@ -1,180 +0,0 @@
import { useCallback, useId, useRef, useState, type KeyboardEvent, type ReactNode } from "react";
import { Check, Ellipsis, Keyboard, Maximize, Minimize, Monitor, Moon, PanelRight, Sun } from "lucide-react";
import { Menu } from "../shared/menu";
import { Tooltip } from "../shared/tooltip";
import { formatShortcut, SHORTCUTS } from "../../utils/shortcuts";
import type { ThemePreference } from "../../utils/navigation";
const THEME_OPTIONS: { id: ThemePreference; label: string; title: string; icon: ReactNode }[] = [
{ id: "system", label: "Auto", title: "Auto (system)", icon: <Monitor /> },
{ id: "light", label: "Light", title: "Light", icon: <Sun /> },
{ id: "dark", label: "Dark", title: "Dark", icon: <Moon /> },
];
export type MoreMenuProps = {
themePreference: ThemePreference;
onChangeTheme: (theme: ThemePreference) => void;
/** Full screen's state and toggle; left out where the browser has no full screen. */
fullscreen?: { active: boolean; onToggle: () => void } | undefined;
/** The Inspector's state and toggle; left out where there is no Inspector (Compare). */
inspector?: { open: boolean; onToggle: () => void } | undefined;
onOpenShortcuts: () => void;
};
/**
* The bottom bar's last button: the page-wide settings that have no place on a canvas. Every row
* reads the same way, icon, label, control and key: the Viewer's theme (Auto, Light, Dark; T
* flips light and dark), full screen (F), the Inspector (I) and the keyboard shortcuts (?).
*/
export function MoreMenu(props: MoreMenuProps) {
const [open, setOpen] = useState(false);
const buttonRef = useRef<HTMLButtonElement>(null);
const listRef = useRef<HTMLDivElement>(null);
// The menu opens on the current theme, as a choice menu opens on its current choice.
const currentThemeRef = useRef<HTMLButtonElement>(null);
const themeLabelId = useId();
const close = useCallback(() => setOpen(false), []);
// ↑ and ↓ move between rows (the theme row's stop is its current choice), ← and → between the
// three themes. Tab leaves the menu, as it does a native one. The menu's keys are its own: Esc
// and the arrows are marked used, so a canvas behind it (Compare's screens and areas) leaves them.
// ? opens the shortcuts as the row does, so the dialog hands focus back to More.
const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
const list = listRef.current;
if (!list) return;
if (event.key === "Tab") {
close();
return;
}
if (event.key === "Escape") {
event.preventDefault();
close();
return;
}
if (event.key === "?" && !event.metaKey && !event.ctrlKey && !event.altKey) {
event.preventDefault();
close();
props.onOpenShortcuts();
return;
}
const active = document.activeElement as HTMLElement | null;
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
event.preventDefault();
const radios = [...list.querySelectorAll<HTMLElement>('[role="menuitemradio"]')];
const at = active ? radios.indexOf(active) : -1;
if (at < 0) return;
radios[(at + (event.key === "ArrowRight" ? 1 : -1) + radios.length) % radios.length]?.focus();
return;
}
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return;
event.preventDefault();
const rows = [...list.querySelectorAll<HTMLElement>("[data-more-row]")];
if (rows.length === 0) return;
const at = rows.findIndex((row) => active && row.contains(active));
const next = event.key === "Home" ? 0
: event.key === "End" ? rows.length - 1
: (Math.max(at, event.key === "ArrowDown" ? -1 : 0) + (event.key === "ArrowDown" ? 1 : -1) + rows.length) % rows.length;
const row = rows[next];
const stop = row?.matches('[role="menuitem"], [role="menuitemcheckbox"]') ? row
: row?.querySelector<HTMLElement>('[aria-checked="true"]') ?? row?.querySelector<HTMLElement>('[role="menuitemradio"]');
stop?.focus();
};
return (
<>
<Tooltip label="More" placement="top" disabled={open}>
<button
ref={buttonRef}
type="button"
className={`toolbar-button${open ? " active" : ""}`}
aria-label="More"
aria-haspopup="menu"
aria-expanded={open}
onClick={() => setOpen((current) => !current)}>
<Ellipsis />
</button>
</Tooltip>
<Menu open={open} anchorRef={buttonRef} initialFocusRef={currentThemeRef} align="end" className="more-menu" onDismiss={close}>
<div ref={listRef} className="more-menu-list" role="menu" aria-label="More" onKeyDown={onKeyDown}>
<div className="more-menu-row" role="group" aria-labelledby={themeLabelId} data-more-row>
<span className="more-menu-icon" aria-hidden="true"><Moon /></span>
<span className="more-menu-label" id={themeLabelId}>Theme</span>
<span className="more-theme-switch">
{THEME_OPTIONS.map((option) => {
const checked = props.themePreference === option.id;
return (
<button
key={option.id}
ref={checked ? currentThemeRef : undefined}
type="button"
className="more-theme-option"
role="menuitemradio"
aria-checked={checked}
aria-label={option.label}
title={option.title}
tabIndex={-1}
onClick={() => props.onChangeTheme(option.id)}>
{option.icon}
</button>
);
})}
</span>
<kbd className="more-menu-key" aria-hidden="true">{formatShortcut(SHORTCUTS.appearance.theme)}</kbd>
</div>
{props.fullscreen ? (
<button
type="button"
className="more-menu-row more-menu-item"
role="menuitem"
tabIndex={-1}
aria-keyshortcuts={SHORTCUTS.view.fullscreen.key}
data-more-row
onClick={() => {
props.fullscreen?.onToggle();
close();
}}>
<span className="more-menu-icon" aria-hidden="true">{props.fullscreen.active ? <Minimize /> : <Maximize />}</span>
<span className="more-menu-label">{props.fullscreen.active ? "Exit full screen" : "Full screen"}</span>
<kbd className="more-menu-key" aria-hidden="true">{formatShortcut(SHORTCUTS.view.fullscreen)}</kbd>
</button>
) : null}
{props.inspector ? (
<button
type="button"
className="more-menu-row more-menu-item"
role="menuitemcheckbox"
aria-checked={props.inspector.open}
tabIndex={-1}
aria-keyshortcuts={SHORTCUTS.panel.right.key}
data-more-row
onClick={() => {
props.inspector?.onToggle();
close();
}}>
<span className="more-menu-icon" aria-hidden="true"><PanelRight /></span>
<span className="more-menu-label">Inspector</span>
{props.inspector.open ? <span className="more-menu-check" aria-hidden="true"><Check /></span> : null}
<kbd className="more-menu-key" aria-hidden="true">{formatShortcut(SHORTCUTS.panel.right)}</kbd>
</button>
) : null}
<button
type="button"
className="more-menu-row more-menu-item"
role="menuitem"
tabIndex={-1}
aria-haspopup="dialog"
aria-keyshortcuts="?"
data-more-row
onClick={() => {
close();
props.onOpenShortcuts();
}}>
<span className="more-menu-icon" aria-hidden="true"><Keyboard /></span>
<span className="more-menu-label">Keyboard shortcuts</span>
<kbd className="more-menu-key" aria-hidden="true">?</kbd>
</button>
</div>
</Menu>
</>
);
}
+10 -14
View File
@@ -1,8 +1,7 @@
import { GitCompareArrows, LayoutGrid, Map, Search } from "lucide-react";
import { GitCompareArrows, Keyboard, LayoutGrid, Map, Search } from "lucide-react";
import { type CSSProperties, useLayoutEffect, useState } from "react";
import { Tooltip } from "../shared/tooltip";
import { useCanvasVisibleFrame } from "./visible-frame-provider";
import { setToolbarRoom } from "../../utils/inspector-width";
import { CANVAS_NUMBER_KEYS, formatShortcut, SHORTCUTS } from "../../utils/shortcuts";
import { KeyHint } from "../shared/key-hint";
import {
@@ -27,8 +26,7 @@ type CanvasToolbarProps = {
actions?: React.ReactNode;
onSelectCanvas: (canvas: CanvasView) => void;
onOpenSearch: () => void;
/** The bar's last button: the "More" menu with theme, full screen and keyboard shortcuts. */
more: React.ReactNode;
onOpenShortcuts: () => void;
};
/** Room kept between the toolbar and an Inspector wide enough to reach it. */
@@ -49,21 +47,14 @@ export function CanvasToolbar(props: CanvasToolbarProps) {
observer.observe(element);
return () => observer.disconnect();
}, [element]);
// The Inspector stops short of covering the bar: it may widen only as far as leaves the canvas
// room for the bar and a gap either side.
useLayoutEffect(() => {
if (ownWidth > 0) setToolbarRoom(ownWidth + 2 * TOOLBAR_PANEL_GAP);
}, [ownWidth]);
// When responsive panels leave less room than the toolbar itself, hiding it is the only
// collision-free layout. It returns as soon as either panel is collapsed. The Inspector's width is
// capped to leave the bar its room, so this is a last resort: a desktop window (820px and up)
// always fits the bar beside the narrowest Inspector.
// collision-free layout. It returns as soon as either panel is collapsed.
if (visibleFrame && visibleFrame.width < TOOLBAR_MINIMUM_FRAME_WIDTH) return null;
// The toolbar is the canvas' persistent mode switcher. Panel geometry may raise it to avoid
// bottom chrome, but must not pull it away from the window's stable horizontal centre. Only an
// Inspector that would cover it (widened by the reader, or a narrow window's overlay) pushes it
// left, and by just that much, never past the canvas' left edge: with no room left between the
// two, it hides as it does above, which the Inspector's cap keeps from happening.
// two, it hides as it does above.
let shift = 0;
if (visibleFrame && typeof window !== "undefined") {
const centredLeft = window.innerWidth / 2 - ownWidth / 2;
@@ -133,7 +124,12 @@ export function CanvasToolbar(props: CanvasToolbarProps) {
<span className="toolbar-divider" aria-hidden="true" />
{props.more}
<Tooltip label="Keyboard shortcuts" shortcut="?" placement="top">
<button type="button" className="toolbar-button" aria-label="Keyboard shortcuts"
aria-haspopup="dialog" onClick={props.onOpenShortcuts}>
<Keyboard />
</button>
</Tooltip>
</div>
</div>
);
@@ -19,8 +19,6 @@ export type ShortcutContext = {
handoff?: boolean;
/** The report was captured in both light and dark, so the app's appearance can be switched. */
appearances?: boolean;
/** The browser can put the Viewer in full screen. */
fullscreen?: boolean;
/** The run's other targets are one switch away; the pill calls them devices, or platforms in reports from before targets. */
targets?: { noun: "device" | "platform"; count: number };
};
@@ -96,7 +94,6 @@ export function shortcutGroups(context: ShortcutContext): Group[][] {
...(context.canvas === "compare" ? [] : [{ label: "Show or hide the inspector", keys: [SHORTCUTS.panel.right] }]),
{ label: "Viewer theme: dark or light", keys: [SHORTCUTS.appearance.theme] },
...(context.appearances ? [{ label: "The app's appearance: light or dark", keys: [SHORTCUTS.appearance.app] }] : []),
...(context.fullscreen ? [{ label: "Enter or exit full screen", keys: [SHORTCUTS.view.fullscreen] }] : []),
{ label: "Show this list", keys: ["?"] },
],
};
@@ -122,7 +119,7 @@ export function shortcutGroups(context: ShortcutContext): Group[][] {
return [here, [goTo, view]];
}
/** The keyboard reference, opened with "?" or from the More menu at the end of the bottom bar. */
/** The keyboard reference, opened with "?" or the button at the end of the bottom bar. */
export function ShortcutsDialog(props: { context: ShortcutContext; onClose: () => void }) {
const dialogRef = useModalDialog(true, props.onClose);
useEffect(() => {
@@ -2,8 +2,8 @@ import {
useCallback, useRef, useSyncExternalStore, type CSSProperties, type KeyboardEvent, type PointerEvent, type RefObject,
} from "react";
import {
clampInspectorWidth, getToolbarRoom, inspectorWidthBounds, INSPECTOR_WIDTH_MAX, INSPECTOR_WIDTH_MIN, INSPECTOR_WIDTH_STEP,
setInspectorWidth, subscribeToToolbarRoom, useInspectorWidth,
clampInspectorWidth, inspectorWidthBounds, INSPECTOR_WIDTH_MAX, INSPECTOR_WIDTH_MIN, INSPECTOR_WIDTH_STEP,
setInspectorWidth, useInspectorWidth,
type InspectorWidthBounds,
} from "../../utils/inspector-width";
@@ -31,22 +31,8 @@ function subscribeToWindow(onChange: () => void): () => void {
return () => window.removeEventListener("resize", onChange);
}
/** The widest the panel can be now: it follows the window, `--ui-scale` and the bottom bar's width. */
function currentBounds(): InspectorWidthBounds {
return inspectorWidthBounds(window.innerWidth, uiScale(), getToolbarRoom());
}
function subscribeToBounds(onChange: () => void): () => void {
const unsubscribeToolbar = subscribeToToolbarRoom(onChange);
const unsubscribeWindow = subscribeToWindow(onChange);
return () => {
unsubscribeToolbar();
unsubscribeWindow();
};
}
function widestWidth(): number {
return currentBounds().max;
return inspectorWidthBounds(window.innerWidth, uiScale()).max;
}
type Drag = {
@@ -68,7 +54,7 @@ type Drag = {
*/
export function useInspectorResize(panelRef: RefObject<HTMLElement | null>) {
const width = useInspectorWidth();
const widest = useSyncExternalStore(subscribeToBounds, widestWidth, () => INSPECTOR_WIDTH_MAX);
const widest = useSyncExternalStore(subscribeToWindow, widestWidth, () => INSPECTOR_WIDTH_MAX);
const fallback = useSyncExternalStore(subscribeToWindow, defaultWidth, () => 400);
const drag = useRef<Drag | null>(null);
@@ -106,7 +92,7 @@ export function useInspectorResize(panelRef: RefObject<HTMLElement | null>) {
const startWidth = panelWidth(panel);
drag.current = {
pointerId: event.pointerId, startX: event.clientX, startWidth, scale,
bounds: currentBounds(), last: startWidth,
bounds: inspectorWidthBounds(window.innerWidth, scale), last: startWidth,
inline: panel.style.getPropertyValue("--inspector-width"),
};
event.currentTarget.setPointerCapture(event.pointerId);
@@ -140,7 +126,7 @@ export function useInspectorResize(panelRef: RefObject<HTMLElement | null>) {
const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {
const panel = panelRef.current;
if (!panel) return;
const bounds = currentBounds();
const bounds = inspectorWidthBounds(window.innerWidth, uiScale());
const current = panelWidth(panel);
let next: number;
switch (event.key) {
+18 -9
View File
@@ -1,5 +1,5 @@
import { useEffect, useRef } from "react";
import { GitCompareArrows, ScanSearch, X } from "lucide-react";
import { GitCompareArrows, PanelRight, ScanSearch, X } from "lucide-react";
import { Tooltip } from "../shared/tooltip";
import { formatShortcut, SHORTCUTS } from "../../utils/shortcuts";
import { InspectorPanel } from "./inspector";
@@ -59,25 +59,34 @@ export function RightPanel(props: RightPanelProps) {
if (scrollRef.current) scrollRef.current.scrollTop = 0;
}, [screenId]);
// Closed, the Inspector leaves no button behind: a selection, Return or I opens it. Open, an X
// closes it.
if (props.collapsed) return null;
// Collapsed, the panel icon brings the Inspector back; open, an X closes it.
const panelButton = (
<Tooltip label="Close inspector" shortcut={formatShortcut(SHORTCUTS.panel.right)} placement="bottom-end">
<Tooltip
label={props.collapsed ? "Expand inspector" : "Close inspector"}
shortcut={formatShortcut(SHORTCUTS.panel.right)}
placement="bottom-end">
<button
type="button"
className="icon-button"
aria-label="Close inspector"
aria-expanded
aria-label={props.collapsed ? "Expand inspector" : "Close inspector"}
aria-expanded={!props.collapsed}
onClick={props.onToggleCollapsed}>
<X aria-hidden="true" />
{props.collapsed ? <PanelRight aria-hidden="true" /> : <X aria-hidden="true" />}
</button>
</Tooltip>
);
if (props.collapsed) {
return (
<div className="right-float" role="toolbar" aria-label="Canvas actions">
{panelButton}
</div>
);
}
// One header row: the screen's status and path, then the close button. On a phone the close
// button leads the row instead, away from the screen stepper's arrows. Theme and full screen
// live in the bottom bar's "More" menu.
// live in the canvas camera controls.
return (
<aside ref={panelRef} className="right-panel" data-drag-sheet aria-label="Inspector panel" style={phone ? undefined : resize.style}>
{phone ? null : <div className="right-panel-resize" {...resize.handleProps} />}
+60 -13
View File
@@ -1,18 +1,25 @@
import { useCallback, useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { Maximize, Minimize, Moon, Sun, SunMoon } from "lucide-react";
import { Tooltip } from "../shared/tooltip";
import { formatShortcut, SHORTCUTS } from "../../utils/shortcuts";
import type { ThemePreference } from "../../utils/navigation";
export type ShellTheme = "light" | "dark";
export type ShellActionsProps = {
/** The theme on screen: the preference, or the system's when that is Auto. */
theme: ShellTheme;
themePreference: ThemePreference;
/** Steps Auto → Dark → Light → Auto. */
onToggleTheme: () => void;
/** The host toolbar's button class, so the actions match their neighbours. */
className?: string;
};
function fullscreenActive(): boolean {
return typeof document !== "undefined" && document.fullscreenElement !== null;
}
/**
* Whether this browser can put the page in full screen at all: iPhone Safari has no element full
* screen, and a frame that was not allowed it (an embedded Viewer) refuses every request.
*/
export function fullscreenSupported(): boolean {
return typeof document !== "undefined" && typeof document.documentElement.requestFullscreen === "function"
&& document.fullscreenEnabled !== false;
}
/** Tracks the page-level fullscreen state, including exits triggered by the browser itself. */
export function useFullscreen(): [boolean, () => void] {
const [active, setActive] = useState(fullscreenActive);
@@ -23,14 +30,54 @@ export function useFullscreen(): [boolean, () => void] {
return () => document.removeEventListener("fullscreenchange", sync);
}, []);
const toggle = useCallback(() => {
const toggle = () => {
if (document.fullscreenElement) {
void document.exitFullscreen().catch(() => {});
return;
}
if (!fullscreenSupported()) return;
if (typeof document.documentElement.requestFullscreen !== "function") return;
void document.documentElement.requestFullscreen().catch(() => {});
}, []);
};
return [active, toggle];
}
const THEME_LABELS: Record<ThemePreference, string> = {
system: "Theme: Auto (system)",
dark: "Theme: Dark",
light: "Theme: Light",
};
/** The theme button shows the current preference; a press steps Auto → Dark → Light. */
export function ThemeToggleButton(props: ShellActionsProps) {
const Icon = props.themePreference === "system" ? SunMoon : props.themePreference === "dark" ? Moon : Sun;
return (
<Tooltip label={THEME_LABELS[props.themePreference]} shortcut={formatShortcut(SHORTCUTS.appearance.theme)} placement="bottom">
<button
type="button"
className={props.className ?? "icon-button"}
aria-label="Toggle theme"
data-theme-preference={props.themePreference}
onClick={props.onToggleTheme}>
<Icon aria-hidden="true" />
</button>
</Tooltip>
);
}
export function FullscreenToggleButton(props: Pick<ShellActionsProps, "className">) {
const [active, toggle] = useFullscreen();
const label = active ? "Exit full screen" : "Enter full screen";
return (
<Tooltip label={label} placement="bottom">
<button
type="button"
className={props.className ?? "icon-button"}
aria-label={label}
aria-pressed={active}
onClick={toggle}>
{active ? <Minimize aria-hidden="true" /> : <Maximize aria-hidden="true" />}
</button>
</Tooltip>
);
}
+2
View File
@@ -531,6 +531,8 @@
.changes-menu .panel-search-clear { width: 44px; height: 44px; }
/* The minimap repeats what a phone already shows whole, and covers a sixth of it. */
.phone-layout .canvas-minimap-shell { display: none; }
/* With nothing selected there is no Inspector to reopen. */
.phone-layout .right-float { display: none; }
/* The Inspector slides up over the whole screen; a drag down on its header puts it away. */
.phone-layout .right-panel {
/* The sheet is the window's width; the desktop's half-window limit is not for it. */
+1 -18
View File
@@ -237,29 +237,12 @@ export function Menu({ items = [], children, initialFocusRef, open, ariaLabel, c
if (initialFocusRef && event.target instanceof Node
&& !popoverRef.current?.contains(event.target) && !anchorRef?.current?.contains(event.target)) dismissRef.current();
};
// A trigger can also move with no scroll or resize, as the bottom bar does when the Inspector
// opens beside it; an anchored menu checks where its trigger is once a frame while it is open.
let frame = 0;
let anchorAt = "";
const follow = () => {
const rect = anchorRef?.current?.getBoundingClientRect();
const at = rect ? `${rect.left},${rect.top}` : "";
if (at !== anchorAt) {
if (anchorAt) place();
anchorAt = at;
}
frame = requestAnimationFrame(follow);
};
window.addEventListener("pointerdown", onPointerDown);
window.addEventListener("keydown", onKeyDown);
window.addEventListener("resize", place);
if (anchorRef) {
window.addEventListener("scroll", onScroll, true);
follow();
}
if (anchorRef) window.addEventListener("scroll", onScroll, true);
window.addEventListener("focusin", onFocusIn);
return () => {
cancelAnimationFrame(frame);
window.removeEventListener("pointerdown", onPointerDown);
window.removeEventListener("keydown", onKeyDown);
window.removeEventListener("resize", place);
+67 -66
View File
@@ -133,10 +133,13 @@
--icon-hit-min: 32px;
/* Chevrons, carets and status glyphs that sit inline next to text. */
--icon-glyph-inline: 14px;
/* Floating canvas chrome shares a y=30px center line. Reserve space for the visible actions only. */
/* Floating canvas chrome shares a y=30px center line. The collapsed inspector joins the
camera controls into one compact toolbar. Reserve space for the visible actions only. */
--floating-chrome-top: 14px;
--floating-chrome-height: 42px;
--canvas-chrome-inline-inset: 12px;
--right-float-edge: 12px;
--right-float-width: calc(var(--icon-btn-md) + 6px);
--left-collapsed-pill-width: 420px;
--left-collapsed-pill-height: var(--floating-chrome-height);
--left-collapsed-pill-top: var(--floating-chrome-top);
@@ -301,14 +304,16 @@ code {
}
:root[data-canvas-transition-direction]::view-transition-group(app-pill),
:root[data-canvas-transition-direction]::view-transition-group(canvas-camera-controls),
:root[data-canvas-transition-direction]::view-transition-group(canvas-toolbar) {
:root[data-canvas-transition-direction]::view-transition-group(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-group(right-floating-controls) {
z-index: 101;
animation: none;
}
:root[data-canvas-transition-direction]::view-transition-image-pair(canvas-minimap),
:root[data-canvas-transition-direction]::view-transition-image-pair(app-pill),
:root[data-canvas-transition-direction]::view-transition-image-pair(canvas-camera-controls),
:root[data-canvas-transition-direction]::view-transition-image-pair(canvas-toolbar) {
:root[data-canvas-transition-direction]::view-transition-image-pair(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-image-pair(right-floating-controls) {
isolation: isolate;
}
:root[data-canvas-transition-direction]::view-transition-old(canvas-view-content),
@@ -320,7 +325,9 @@ code {
:root[data-canvas-transition-direction]::view-transition-old(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-old(phone-top-actions),
:root[data-canvas-transition-direction]::view-transition-new(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-new(phone-top-actions) {
:root[data-canvas-transition-direction]::view-transition-new(phone-top-actions),
:root[data-canvas-transition-direction]::view-transition-old(right-floating-controls),
:root[data-canvas-transition-direction]::view-transition-new(right-floating-controls) {
mix-blend-mode: normal;
}
:root[data-canvas-transition-direction="forward"]::view-transition-old(canvas-view-content) {
@@ -343,13 +350,15 @@ code {
}
:root[data-canvas-transition-direction]::view-transition-old(app-pill),
:root[data-canvas-transition-direction]::view-transition-old(canvas-camera-controls),
:root[data-canvas-transition-direction]::view-transition-old(canvas-toolbar) {
:root[data-canvas-transition-direction]::view-transition-old(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-old(right-floating-controls) {
animation: none;
opacity: 0;
}
:root[data-canvas-transition-direction]::view-transition-new(app-pill),
:root[data-canvas-transition-direction]::view-transition-new(canvas-camera-controls),
:root[data-canvas-transition-direction]::view-transition-new(canvas-toolbar) {
:root[data-canvas-transition-direction]::view-transition-new(canvas-toolbar),
:root[data-canvas-transition-direction]::view-transition-new(right-floating-controls) {
animation: none;
opacity: 1;
}
@@ -1153,6 +1162,33 @@ code {
.inspector-resizing .right-panel-resize::before { opacity: 1; transition-delay: 0ms; }
/* While the edge is dragged nothing else may select or change the cursor. */
.inspector-resizing, .inspector-resizing * { cursor: col-resize !important; user-select: none !important; }
/* When minimised, the inspector actions join the camera controls as one floating toolbar. */
.right-float {
position: fixed;
z-index: 100;
top: var(--chrome-top);
right: var(--right-float-edge);
width: calc(var(--right-float-width) * var(--ui-scale));
height: var(--chrome-height);
display: flex;
align-items: center;
gap: 2px;
padding: calc(3px * var(--ui-scale));
border: 0;
border-radius: 0 calc(8px * var(--ui-scale)) calc(8px * var(--ui-scale)) 0;
background: var(--side-panel-surface);
box-shadow: none;
/* No backdrop blur: the surface is opaque, and a blurred backdrop leaves this toolbar's view
transition snapshot stale, so a button that moves into its place paints late. */
view-transition-name: right-floating-controls;
}
.right-float > * { zoom: var(--ui-scale); }
.right-float .icon-button.active { color: var(--text); background: var(--element); }
.right-float .icon-button[disabled] { color: var(--border); cursor: default; background: transparent; }
.right-float .icon-button:hover {
border-color: transparent;
background: var(--panel-hover);
}
.right-head {
display: flex;
flex: none;
@@ -1211,8 +1247,7 @@ code {
position: absolute;
z-index: 20;
top: var(--chrome-top);
/* Mirrors the pill: the same inset from the canvas' right edge as the pill's from its left. */
right: calc(var(--canvas-visible-right-inset, 0px) + var(--canvas-chrome-inline-inset));
right: calc(var(--canvas-visible-right-inset, 0px) + 8px);
display: inline-flex;
height: var(--chrome-height);
align-items: center;
@@ -1223,9 +1258,30 @@ code {
color: var(--text);
background: var(--side-panel-surface);
box-shadow: var(--floating-chrome-shadow);
/* No backdrop blur: with it, the view transition's snapshot of these controls painted late. */
/* No backdrop blur, as on .right-float: with it, entering Compare painted full screen late. */
view-transition-name: canvas-camera-controls;
}
.canvas-camera-controls.inspector-collapsed {
right: calc(
var(--canvas-visible-right-inset, 0px) +
var(--right-float-edge) + var(--right-float-width) * var(--ui-scale) - 1px
);
border: 0;
border-radius: calc(8px * var(--ui-scale)) 0 0 calc(8px * var(--ui-scale));
box-shadow: none;
}
.canvas-camera-controls.inspector-collapsed::before {
position: absolute;
z-index: -1;
top: 0;
right: calc((var(--right-float-width) * var(--ui-scale) - 1px) * -1);
bottom: 0;
left: 0;
border-radius: calc(8px * var(--ui-scale));
box-shadow: var(--floating-chrome-shadow);
content: "";
pointer-events: none;
}
.canvas-camera-controls .camera-action-button,
.canvas-camera-controls .zoom-button {
border: 0;
@@ -1249,6 +1305,7 @@ code {
flex: none;
background: var(--border-subtle);
}
.canvas-camera-controls.inspector-collapsed .camera-control-divider { display: none; }
.canvas-camera-controls .zoom-button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 1px;
@@ -2044,61 +2101,6 @@ code {
.menu-row-shortcut { flex: none; margin-left: 16px; color: var(--tertiary); font-size: 11px; }
.menu-separator { height: 1px; margin: 4px 6px; background: var(--popover-line); }
/* ── More menu (the bottom bar's "…") ───────────────────────────────────── */
/* The menu is anchored to its button, but clears the bar the button sits in. The popover itself
is the surface, as the Changes menu's is: an anchored popover scrolls, and would clip a shadow
drawn by the list inside it. Only a window too short for the menu scrolls it. */
.menu-popover.more-menu {
overflow-x: hidden !important;
border: 1px solid var(--popover-line);
border-radius: calc(9px * var(--ui-scale));
background: var(--popover);
box-shadow: var(--popover-shadow);
translate: 0 calc(-12px * var(--ui-scale));
}
/* Rows read icon, label, control, key, in the menu's own type and colours. */
.more-menu-list { display: flex; width: 248px; flex-direction: column; padding: 4px; }
.more-menu-row {
display: flex;
width: 100%;
min-height: 34px;
align-items: center;
gap: 8px;
padding: 4px 6px 4px 8px;
border-radius: 5px;
color: var(--text);
background: transparent;
font-size: 12px;
text-align: left;
}
.more-menu-item:hover,
.more-menu-item:focus-visible { background: var(--popover-hover); outline: none; }
.more-menu-icon { display: flex; width: 16px; flex: none; align-items: center; justify-content: center; color: var(--secondary); }
.more-menu-icon > svg { width: 15px; height: 15px; }
.more-menu-label { min-width: 0; flex: 1; white-space: nowrap; }
.more-menu-check { display: flex; flex: none; color: var(--secondary); }
.more-menu-check > svg { width: 14px; height: 14px; }
/* The key column lines up down the menu, whatever the row holds before it. */
.more-menu-key { min-width: 22px; flex: none; text-align: center; }
/* A compact three-way switch: Auto, Light, Dark, on the segmented control's track and thumb. */
.more-theme-switch { display: flex; flex: none; gap: 2px; padding: 2px; border-radius: 7px; background: var(--segment-track); }
.more-theme-option {
display: flex;
width: 26px;
height: 22px;
align-items: center;
justify-content: center;
border-radius: 5px;
color: var(--tertiary);
background: transparent;
transition: color 120ms ease, background 120ms ease;
}
.more-theme-option > svg { width: 14px; height: 14px; }
.more-theme-option:hover { color: var(--text); }
.more-theme-option[aria-checked="true"] { color: var(--text); background: var(--segment-thumb); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.more-theme-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
/* ── Feedback dialog ────────────────────────────────────────────────────── */
.dialog-backdrop {
@@ -2245,8 +2247,7 @@ code {
.search-command-result-copy code { color: inherit; font-size: inherit; }
.search-command-section + .search-command-section { margin-top: 4px; }
.search-command-section > .search-command-section-label { padding: 8px 8px 4px; }
.search-command-result-key,
.more-menu-key {
.search-command-result-key {
padding: 2px 6px;
border: 1px solid var(--border);
border-radius: 5px;
+1 -2
View File
@@ -102,8 +102,7 @@ export function commandItems(context: CommandContext, actions: CommandActions):
{ keywords: ["app", "appearance", "scheme", "captured"], shortcut: !appearance.current && context.appearances.length === 2 ? key(SHORTCUTS.appearance.app) : undefined });
}
if (context.fullscreen !== undefined) {
add("view:fullscreen", "View", context.fullscreen ? "Exit full screen" : "Enter full screen", actions.toggleFullscreen,
{ keywords: ["fullscreen", "window", "focus"], shortcut: key(SHORTCUTS.view.fullscreen) });
add("view:fullscreen", "View", context.fullscreen ? "Exit full screen" : "Enter full screen", actions.toggleFullscreen, { keywords: ["fullscreen", "window", "focus"] });
}
for (const target of context.targets) {
+4 -28
View File
@@ -43,39 +43,15 @@ export function useInspectorWidth(): number | undefined {
);
}
/** The room the bottom bar needs beside the Inspector, in window pixels: its measured width and a gap either side. */
let toolbarRoom = 0;
const toolbarListeners = new Set<() => void>();
/** The bottom bar reports the room it needs whenever its measured width changes (with `--ui-scale` too). */
export function setToolbarRoom(room: number) {
if (room === toolbarRoom) return;
toolbarRoom = room;
for (const listener of toolbarListeners) listener();
}
export function getToolbarRoom(): number {
return toolbarRoom;
}
export function subscribeToToolbarRoom(onChange: () => void): () => void {
toolbarListeners.add(onChange);
return () => toolbarListeners.delete(onChange);
}
export type InspectorWidthBounds = { min: number; max: number };
/**
* The widths the panel may take in a window `windowWidth` wide: at most half of it, so the canvas
* keeps the other half, and never so wide that the canvas beside it loses the `toolbarRoom` the
* bottom bar needs (window pixels), in the panel's own (unscaled) pixels when the chrome is zoomed
* by `scale`. Neither cap goes below the minimum.
* keeps the other half, in the panel's own (unscaled) pixels when the chrome is zoomed by `scale`.
*/
export function inspectorWidthBounds(windowWidth: number, scale = 1, room = 0): InspectorWidthBounds {
const zoom = scale > 0 ? scale : 1;
const half = Math.floor(windowWidth / 2 / zoom);
const besideBar = Math.floor((windowWidth - room) / zoom);
return { min: INSPECTOR_WIDTH_MIN, max: Math.max(INSPECTOR_WIDTH_MIN, Math.min(INSPECTOR_WIDTH_MAX, half, besideBar)) };
export function inspectorWidthBounds(windowWidth: number, scale = 1): InspectorWidthBounds {
const half = Math.floor(windowWidth / 2 / (scale > 0 ? scale : 1));
return { min: INSPECTOR_WIDTH_MIN, max: Math.max(INSPECTOR_WIDTH_MIN, Math.min(INSPECTOR_WIDTH_MAX, half)) };
}
export function clampInspectorWidth(width: number, bounds: InspectorWidthBounds): number {
-4
View File
@@ -77,10 +77,6 @@ export const SHORTCUTS = {
theme: plain("KeyT", "T"),
app: shift("KeyT", "T"),
},
/** F puts the whole Viewer in or out of full screen, where the browser allows it. */
view: {
fullscreen: plain("KeyF", "F"),
},
/** Canvas edits follow the platform-standard history keys. */
edit: {
undo: mod("KeyZ", "Z"),