Skip to content

Commit 6809b6a

Browse files
committed
chore(showcase): retake the media of cstudy 0.28, with dark animations
Wait for a run's end by the toolbar's is-running class, since Run tests itself now reads Cancel and there is no separate Cancel button. Keep the header cstudy start writes above the practice code, so the media show the header of the release they come from, and show an XDG_CONFIG_HOME as ~/.config. Add --video-theme to record the animations in the dark theme, and --shots to take only some screenshots, so leaving out the Health view starts no Gradle on a machine short of memory.
1 parent 8a60360 commit 6809b6a

2 files changed

Lines changed: 158 additions & 113 deletions

File tree

‎tools/showcase/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ A run takes several minutes and runs one Chromium, `cstudy serve` and the langua
2828

2929
`--stages` runs part of it, in this order: `prepare` (virtual environment, `cstudy init --no-ide`, preferences, `cstudy doctor --fix`), `seed` (practice history), `videos`, `shots`, `mock`. A later stage needs the earlier ones, so rerun a single stage only against the same `--work` folder, and without `prepare`, which wants the folder empty. Run `videos` before `shots`, and `mock` last: a mock in progress adds a banner to every view.
3030

31+
`--shots` takes some of the screenshots of the `shots` stage, by name, such as `--shots web-ui-attempt,web-ui-settings`; a shot left out does not open its view, so leaving out `web-ui-health` starts no Gradle. `--video-theme dark` records the animations in the dark theme.
32+
3133
When it ends, stop what it may have left: `ps -Ao pid,ppid,etime,command | rg -i "basedpyright|typescript-language-server|uvicorn|cstudy serve|ms-playwright|GradleDaemon"`. The script stops the server and the browser, and the Gradle daemons that started while it ran (`cstudy doctor --fix` and the Health view start them). A daemon that was already running stays, and so may be shared with other work: check its builds before you kill it, by PID.
3234

3335
## What it makes
@@ -48,7 +50,7 @@ Desktop images are 1440 by 900, the phone ones 390 wide at 2x. A name is `<name>
4850
| `web-ui-settings` | Settings, with both toggles and the state of each language |
4951
| `web-ui-mock` | A mock in progress |
5052

51-
Two animations, in the light theme at desktop width, each as `<name>.gif`, `<name>.mp4` and `<name>-poster.png` (the first frame):
53+
Two animations, in the light theme at desktop width unless `--video-theme` says otherwise, each as `<name>.gif`, `<name>.mp4` and `<name>-poster.png` (the first frame):
5254

5355
| Name | Shows |
5456
|------|-------|
@@ -59,7 +61,8 @@ Recording uses Playwright's `record_video_dir` with a small injected pointer, si
5961

6062
## Notes
6163

62-
- The screenshots replace this machine's paths with `~` in the page text before they are taken, so no temporary folder or user name shows.
64+
- The screenshots replace this machine's paths with `~` in the page text before they are taken, so no temporary folder or user name shows. A `XDG_CONFIG_HOME` in the environment shows as `~/.config`, so a run can keep its `config.toml` apart from yours.
65+
- The practice files keep the header `cstudy start` wrote, and the script replaces only the code below it, so the media show the header of the release they come from.
6366
- Statements credit the problem each one rewords, by the name of the site it comes from. The media must not name any assessment vendor, so the script hides those credit lines in the page while it records and photographs. Nothing else in a statement changes.
6467
- The script writes files only into `--work` and `--out`. Nothing it makes is committed for you.
6568
- It needs the language servers, so it runs `cstudy doctor --fix` with the network. After that it works offline.

0 commit comments

Comments
 (0)