Skip to content

guides: a rail view lists the demos and plays the one clicked - #613

Merged
foxnne merged 1 commit into
mainfrom
guides/rail-view
Oct 19, 2026
Merged

foxnne merged 1 commit into
mainfrom
guides/rail-view

Conversation

@foxnne

@foxnne foxnne commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/plans#30 (step 2: the guides plugin).

What changes

A new bundled plugin, guides, adds a view on the rail (a graduation cap, under Files).

  • The view lists what the demos service (sdk: plugins register demos, and the demos service lists and plays them #608) lists: fizzy's tour first, then each plugin's own demos. Each guide is a row with its length, and each chapter is an indented row with where it starts.
  • Clicking a guide plays it from the start. Clicking a chapter plays the guide from that chapter.
  • The guide playing is drawn as selected.
  • The service already refuses a demo over unsaved work or while a live tape drives, and says why in a toast, so the view adds nothing for that.
  • With no demos service, the view says the app plays no demos. With an empty list, it says there are no guides yet.
  • guides.show reveals the view wherever it lives.

It reaches nothing but sdk.services.demos, so an app on fizzy links it or leaves it out like any other plugin. It's static-only, like devtools and archive: no bundled dylib.

Fixed while looking at it: the time is laid out before the title. A dvui box gives its children room in order, so a long title ("Markdown, Previewed as You Type") had squeezed the length to "0…". Now the title is cut short instead.

SDK impact

  • None

Verified

  • Web, in the browser pane, on zig build web:
    • The view lists both guides: the tour at 1:09 with its five chapters past the first, and the markdown guide at 0:26 with three.
    • Clicking "Editing" (0:23) cut the tour straight into its Editing chapter, which then typed on.
    • Reopening the view during the demo shows the tour drawn as selected.
    • No console errors.
  • macOS: zig build, zig build test, zig build test-integration (81/81 steps), zig build check-web, zig build check-tests-reached, zig build test-sdk-version, scripts/check-fmt.sh. The standalone plugin build (cd plugins/guides && zig build, into a sandbox FIZZY_PROFILE) builds the dylib, and its zig-pkg holds no Velopack.
  • Windows:
  • Linux:

No automated test drives the view. What it shows and plays comes from the demos service, which #608's tests cover.

Follow-ups

  • Step 3: the web's hosted guides (demos/index.json) join the list.
  • Step 4: ?view=guides opens with the view showing, for the site.

🤖 Generated with Claude Code

A new bundled plugin, `guides`: a view on the rail listing what the `demos` service lists,
fizzy's tour first and then each plugin's own, every guide with its length and its chapters. A
guide plays from the start, a chapter from where it begins, and the one playing is drawn as
selected. `guides.show` reveals the view. It reaches nothing but the service, so an app on fizzy
links it or leaves it out.

Part of fizzyedit/plans#30 (step 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne marked this pull request as ready for review October 19, 2026 03:40
@foxnne
foxnne enabled auto-merge (squash) October 19, 2026 03:43
@foxnne
foxnne merged commit 29b1ac8 into main Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the guides/rail-view branch October 19, 2026 03:51
foxnne added a commit that referenced this pull request Oct 19, 2026
Part of fizzyedit/plans#30 (step 2, a follow-up to #613).

## What changes

The guides view drew each guide and chapter as a padded full-width
button, so two guides took most of the sidebar's height. Now it's the
app's tree (`core.widgets.TreeWidget`), drawn the way the file tree and
settings draw theirs:

- **A guide is a branch:** a caret, its glyph, its title, and its length
at the right. Its chapters are folded under it, and the first guide
starts open.
- **A chapter is a row** with a play glyph and where it starts. Clicking
it plays the guide from there, and the first chapter (0:00) plays from
the start.
- **A guide with no chapters** is a row of its own that plays it.
- **The guide playing** has its glyph lit in the highlight colour.

The time is still laid out before the title, so a long title is cut
short rather than the time.

## SDK impact

- [x] None

## Verified

- [x] Web, in the browser pane, on `zig build web`:
- The tree lists the tour open, with Welcome 0:00 through Your turn
1:01, and the markdown guide folded at 0:26. It is about half the height
of the old list.
  - Clicking "Editing" played the tour from 0:23.
  - Reloading with Guides as the remembered view loads fine.
- [x] macOS: `zig build`, `zig build check-web`, `zig build
check-tests-reached`, `scripts/check-fmt.sh`.
- [ ] Windows:
- [ ] Linux:

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant