Skip to content

docs(design): whitespace parity (#152) and script order (#145) for 0.9.0 - #630

Merged
JuroOravec merged 4 commits into
mainfrom
docs/design-whitespace-script-order
Nov 14, 2026
Merged

JuroOravec merged 4 commits into
mainfrom
docs/design-whitespace-script-order

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Designs for review; hold until after 0.8.0 is released.

🤖 Generated with Claude Code

JuroOravec and others added 4 commits November 13, 2026 21:00
…and script order

Turn each open question in docs/design/whitespace_parity.md (#152) and
docs/design/script_order.md (#145) into a recorded decision, and update
every section that still treated it as open.

Whitespace: keep the author's whitespace on every path; drop whitespace
around each Vue component root and in the mount element with one shared
function (which also clears the host-root hydration failure); drop the
line break after <pre> in Citry's own code, not in vize; add a patched
copy of vize_atelier_dom for 0.9.0 and offer the option upstream later;
keep the authored text plan; accept the benchmark thresholds.

Script order: keep ordered execution and measure before any unordered
opt-in; one callback order and one failure rule, with Citry recording the
mount order itself; a component script that throws or fails to parse
stops startup; plugin scripts run before component scripts on standalone
pages too; a blocked third-party script does not stop the app; accept the
measurement thresholds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec

Copy link
Copy Markdown
Member Author

Recorded the maintainer's decisions in 946a6ae. Each open question in both docs is now a decision, and the sections that treated it as open say so. The PR stays a draft: hold until after 0.8.0.

Whitespace parity (#152)

  1. Keep the author's whitespace on every path (Option 3).
  2. Drop the whitespace around each Vue component root, and in the page's mount element, with one shared function that runs on both paths. This also clears the host-root hydration failure, so the server writer's rule stays as it is.
  3. Drop the line break after <pre> in Citry's own code that writes the Vue template, not in vize.
  4. Add a patched copy of vize_atelier_dom under third_party/rust/ for 0.9.0. The doc lists the repository's conventions for it and notes that the option should be offered upstream later, so the copy can be dropped.
  5. Keep the authored text plan for a possible condense opt-in.
  6. Accept the benchmark thresholds (5% slower hydration, 3% larger compressed HTML).

Script order (#145)

  1. Keep ordered execution; measure before considering an unordered opt-in in 1.x.
  2. One callback order (children before their parent, as on first mount) with one failure rule. Citry records the mount order itself and does not read Vue's internals.
  3. A component script that throws or fails to parse stops startup.
  4. Run browser plugin scripts before component scripts on standalone pages too.
  5. A blocked third-party script (for example analytics stopped by an ad blocker) does not stop the app.
  6. Accept the measurement thresholds.

Two details were not part of the decisions, so I chose them and the maintainer may want to change them: the doc defines a third-party script as one listed by URL (external), not declared to register options, and from another origin than the page; and the shared whitespace function covers every whitespace-only node directly in the mount element of a page that becomes a Vue app.

🤖 Generated with Claude Code

@JuroOravec

Copy link
Copy Markdown
Member Author

The maintainer accepts all three details flagged above: what counts as a third-party script, skipping every failed load (blocked file, failed integrity check, network error), and dropping whitespace-only nodes directly in the mount element.

@JuroOravec
JuroOravec marked this pull request as ready for review November 14, 2026 13:34
@JuroOravec
JuroOravec merged commit 4018455 into main Nov 14, 2026
9 of 10 checks passed
@JuroOravec
JuroOravec deleted the docs/design-whitespace-script-order branch November 14, 2026 13:39
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