Skip to content

A Viewport Host's presentation is host state; there is one colour scheme

Status: accepted

A Viewport Host (the document host for readable Content, the media host for playable Content) has two presentations: embedded, where it renders inside whatever laid it out, and window, where it covers the whole browser viewport with its own chrome and nothing of the application shell is visible. Presentation is a state of the host, switched in place, not a property of a route. The standalone reader and media routes open their host in window presentation and additionally render without the application shell; a host embedded in a Surface Experience slot switches to window presentation and back without navigation. Fullscreen is a per-session state layered on window presentation only — the browser’s own chrome removed where the platform allows it, the host’s chrome collapsed until asked for — and is never persisted. There is one colour scheme, the application’s (auto, light or dark, per device), which every Viewport Host honours in its chrome and injects into the Content it renders; there is no reader-only appearance and no sepia.

Decided 2026-09-24 after the first real reading sessions on the successor showed the reader as a full-height fragment sitting under the application header inside a padded container, with no phone-width layout and unthemed book pages inside dark chrome.

  • Shell-less routes, as the predecessor did. Transcrobes matched the read and watch paths in its root layout and rendered a bare outlet, and the reader then owned a full-height column. Rejected as the whole mechanism because the maintainer wants the Surface Experience viewport slot to go full-window too, and a learner mid-Experience must not be navigated away to read. Kept as the addition for the standalone routes, so nothing renders beneath the window layer and the application header does not linger in the accessibility tree.
  • A reader appearance separate from the application colour scheme (light, dark, sepia, follow-app), synced per person. Rejected for now: it is a second setting with its own precedence rules and drawer section, for which there is no evidence of need. The predecessor had exactly one theme, the application’s, stored per device, and its shell’s sepia was never selectable. Colour scheme stays per device because it is a fact about the screen in front of the learner, not about the learner.
  • Persisting fullscreen. Rejected: a learner who cannot find collapsed chrome on a new device would be trapped in it. The reader opens in window presentation with chrome visible every time.
  • Window presentation entered from an Experience does not change the URL: it is not deep-linkable, a reload lands back in the embedded slot, and the host pushes a history entry on entry so a phone’s back gesture exits the presentation rather than the Experience. The standalone routes push nothing; back already means “leave the reader”.
  • The reader chrome must carry the colour-scheme toggle, because the application header that holds it today is not visible in window presentation.
  • Gloss and tone colours become scheme-aware pairs; the fixed HSL values the predecessor carried into dark mode are not ported.
  • The reading-presentation setting added with this work (paginated or scrolled flow) lives on the existing language reader settings row alongside font size, not on a new row; generic documents remain setting-less until there is evidence of what they need (plan, ruling R7).