Step-by-Step View for guides (#98) #119

Merged
miko merged 6 commits from feature/98-step-by-step-view into development 2026-11-05 16:46:00 +01:00
Owner

Closes #98.

A reading mode for a tablet or phone at the machine: one step per screen, filling the window.

What changes

  • Route: /guides/<id>/steps is a start screen with title, difficulty, duration, protective equipment, description and attachments. /guides/<id>/steps/<n> is step n. Each can be linked directly.
  • Button: „Schritt für Schritt" in the reading view. Readers see what the reading view shows: a published guide's latest version (ADR-0020).
  • Step screens: large images with their annotations, the step lines below them (StepFigure got a stacked layout), then the step content.
  • Moving around: swiping, the arrow keys or large Previous/Next buttons. The address follows through history.replaceState. The top bar shows „Schritt 4 von 12" and a progress bar. Swipes are ignored while zoomed in and on content that scrolls sideways.
  • Screen and full screen: the screen stays on (Wake Lock, taken again if lost). There is an optional full-screen toggle where the browser supports it.
  • Check-offs: steps can be checked off. Progress lives only in localStorage and is bound to the version shown, so it starts over when a new version is published. For drafts it is bound to the working copy's last edit.
  • Guests: they get a real 404 for a hidden guide's view and for steps the published version lacks (ADR-0017).
  • Reserved slug: steps is now reserved. A guide already slugged steps reads at /steps-2, because guideHref maps reserved slugs.
  • Docs: GLOSSARY entry Step-by-Step View, CHANGELOG entry, German translations.

Tests

  • Unit: route and path parsing, navigation and swipe, progress reset per version, guest-404 for the new route, and the reserved-slug href.
  • Component: the view's markup for the start screen, a middle step and the last step.
  • E2E (e2e/stepByStep.spec.ts):
    • button → overview → buttons, keys and swipes
    • check-off survives a reload
    • Finish
    • reopening starts at the overview
    • 404 status for a missing step
    • progress resets after a republish
  • Results: npm test (529), npm run typecheck, npm run lint and the full Playwright suite (67) all pass.

🤖 Generated with Claude Code

Closes #98. A reading mode for a tablet or phone at the machine: one step per screen, filling the window. ## What changes - **Route:** `/guides/<id>/steps` is a start screen with title, difficulty, duration, protective equipment, description and attachments. `/guides/<id>/steps/<n>` is step *n*. Each can be linked directly. - **Button:** „Schritt für Schritt" in the reading view. Readers see what the reading view shows: a published guide's latest version (ADR-0020). - **Step screens:** large images with their annotations, the step lines below them (`StepFigure` got a `stacked` layout), then the step content. - **Moving around:** swiping, the arrow keys or large Previous/Next buttons. The address follows through `history.replaceState`. The top bar shows „Schritt 4 von 12" and a progress bar. Swipes are ignored while zoomed in and on content that scrolls sideways. - **Screen and full screen:** the screen stays on (Wake Lock, taken again if lost). There is an optional full-screen toggle where the browser supports it. - **Check-offs:** steps can be checked off. Progress lives only in `localStorage` and is bound to the version shown, so it starts over when a new version is published. For drafts it is bound to the working copy's last edit. - **Guests:** they get a real 404 for a hidden guide's view and for steps the published version lacks (ADR-0017). - **Reserved slug:** `steps` is now reserved. A guide already slugged `steps` reads at `/steps-2`, because `guideHref` maps reserved slugs. - **Docs:** GLOSSARY entry **Step-by-Step View**, CHANGELOG entry, German translations. ## Tests - **Unit:** route and path parsing, navigation and swipe, progress reset per version, guest-404 for the new route, and the reserved-slug href. - **Component:** the view's markup for the start screen, a middle step and the last step. - **E2E (`e2e/stepByStep.spec.ts`):** - button → overview → buttons, keys and swipes - check-off survives a reload - Finish - reopening starts at the overview - 404 status for a missing step - progress resets after a republish - **Results:** `npm test` (529), `npm run typecheck`, `npm run lint` and the full Playwright suite (67) all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A reading mode for a tablet or phone at the machine: "Step by step" in the
reading view opens /guides/<id>/steps, a start screen with title, effort,
protective equipment, description and attachments, then one step per
screen at /guides/<id>/steps/<n>, filling the window. Readers move by
swiping, arrow keys or large buttons; the address follows without a
reload. The screen stays on (Wake Lock), the view can go full screen, and
steps can be checked off in localStorage, bound to the published version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Guests get a real 404 for a step the published version lacks: the proxy
  counts the latest version's steps (ADR-0017).
- A guide slugged "steps" before the route reserved it reads at /steps-2;
  guideHref maps reserved slugs, and the reading view compares through it.
- The screen follows the address (usePathname), so reopening the view
  after Next kept it hidden starts at the overview again.
- Swipes are ignored while zoomed in or on content that scrolls sideways,
  and on touchcancel.
- The wake lock is taken again when the system drops it.
- The progress bar tells screen readers how many steps are done.
- StepBody shared by the reading view and the Step-by-Step View; progress
  functions moved to progress.ts; one modifier-key check; keydown handler
  as an effect event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The start screen reads like a title slide: centred in the window, the
title very large, the number of steps above it. Steps use the whole
window: the image as large as the height left allows (sized against the
view's size container), with the step lines and content beside it on wide
screens and below it on narrow ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The start screen shows the guide's cover image behind its title, under a
scrim that keeps white text at about 5.8:1 even on a white photo. The
protective equipment, description and attachments stay below, on the
plain background. New semantic tokens scrim and on-scrim (ADR-0010), as
the theme has no black or white.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The theme resets Tailwind's colours (ADR-0010), so backdrop:bg-black/60 on
the publish, discard, restore, crop and annotate dialogs and border-white
on the crop frame's handle produced nothing. They now use the semantic
scrim and on-scrim tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit 34bd4495ed into development 2026-11-05 16:46:00 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!119
No description provided.