Skip to content

docs: define terms and tighten the attributes and dynamic components pages - #781

Merged
JuroOravec merged 1 commit into
mainfrom
docs/attributes-dynamic-readability
Nov 18, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
docs/attributes-dynamic-readability

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

What changed

Readability edits on the HTML attributes and Dynamic components pages, plus a one-line definition of "request data" where pages use it without saying what it is. No behavior changes, no code changes, and no changelog entry.

HTML attributes page

  • The section "Add event handlers" now opens with the rule (c-bind refuses on*, innerHTML, outerHTML and srcdoc) and the fix (write the handler in the template). The ref names moved to its last paragraph, because few readers need them.
  • It says in one sentence when a page uses Vue (a component has its own JavaScript, js, or uses a Vue directive such as @click), with a link to When Vue turns on. The same page now says what "its own JavaScript (js)" means where the ref rule uses it.
  • Heading: "Write handlers in the template" (30 characters) is now "Add event handlers".

Dynamic components page

  • The first bullet of the <c-element> limits list is reworded, not shortened: it states the refusal and its error (ValueError) first, in plain words, then the fix. It keeps every fact (the exact list of refused names, the "wrote it or passed it in" rule, the @click and c-if alternatives, the fixed-is exception), so cutting it further would have dropped one.
  • The intro no longer says an event handler is "the one difference" for <c-element>, because the limits list names more.
  • The textarea and title paragraph links to When Vue turns on for what "a component without Vue" means. The old parenthetical, "no js and no server events", named two of the five triggers on that page.
  • Heading: "Refused tags" is now "Tags <c-element> refuses", so it names its subject in the sidebar.

Anchors and links. Both renamed headings keep their old ids (#write-handlers-in-the-template, #refused-tags). The one page that quoted the first heading, syntax/attributes.md, has its link text updated.

"Request data". Seven pages used the term at first use with no explanation: advanced/extensions.md, advanced/hooks.md, security.md, i18n/catalogs.md, i18n/messages.md, i18n/rich-messages.md and vue/slots.md. Each now says "anything a visitor sends", most with the examples "a query parameter, form field, or header". ui-library/index.md had a full definition worded "any value a visitor controls"; it now uses the same opening words. Pages that already name the examples at first use are unchanged. The repeated explanation further down extensions.md is dropped.

One claim made accurate

The old sentence said c-onclick raises TypeError "in a component with js". The code raises it on any page where Vue is on. I rendered each case with citry 1.0.1:

  • a component with js, with a Vue directive, or with js_data(): raises;
  • a plain component next to, or inside, one that uses Vue: raises;
  • a page with no Vue: renders.

The page now says "on a page that uses Vue". The check is in _vue/direct_capture.py and _vue/leaf_program.py, and UnsupportedPreparedView is a TypeError.

Not done

  • The error text C_ELEMENT_HANDLER_FIX in attrs.py still says "Use a Vue @click in a component with js". It is code, so it is left for a separate change. The docs now say @click alone adds Vue.
  • The svg/math and textarea/title paragraphs under "Tags <c-element> refuses" describe tags <c-element> can render. Splitting them into their own subsections would add anchors, so it is left out.
  • i18n/rich-messages.md has an existing 26-character heading ("Check a URL from a message"). It is outside these suggestions.

Checks

  • python -m docs_site build-check on this branch against origin/main: the same two snippet_path errors on both (the sparse worktree has no LICENSE or CODE_OF_CONDUCT.md), and the heading_length notes drop from 29 to 28 (the renamed heading is no longer listed).
  • Built the site to a temporary directory and confirmed the ids when-vue-turns-on, write-handlers-in-the-template, refused-tags and c-element-limits exist, and that the new links render. The link guard checks pages, not fragments, so I checked the ids by hand.
  • git grep finds no page that still quotes the old heading titles. Archived versions under docs_site/versions/ are snapshots and unchanged.
  • Probed <c-element c-is="tag" onclick="x"> (and ONCLICK, innerHTML): ValueError. A fixed <c-element is="div" onclick="x"> renders.
  • Independent review: the saved docs-cold-reader agent twice (it also ran the prose pass) and a separate fact and prose pass by another agent. Their findings are folded in; the two points above under "Not done" are the ones I chose to leave.

Versioning check

Docs only, under docs_site/content/. Nothing in the 1.x promise is touched, and no package needs a new release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED

…c components pages

Say what "a page that uses Vue", "a component with its own JavaScript"
and "request data" mean where each page first uses them. On the HTML
attributes page, open the handlers section with the rule and the fix and
move the `ref` names to the end of it. On the dynamic components page,
trim the `<c-element>` handler bullet, name the error it raises, and stop
calling the handler refusal the only difference.

Shorten the handlers heading, and name the subject in the "Tags
<c-element> refuses" heading. Both keep their old anchors, and the one
link text that quoted a title is updated. The `c-onclick` sentence now
says what the code does: it raises TypeError on any page that uses Vue,
not only in a component with `js`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED
@JuroOravec
JuroOravec merged commit cf4733c into main Nov 18, 2026
21 checks passed
@JuroOravec
JuroOravec deleted the docs/attributes-dynamic-readability branch November 18, 2026 13:52
JuroOravec added a commit that referenced this pull request Nov 18, 2026
)

The error told readers to use a Vue @click "in a component with js". Citry
turns Vue on for a page when a template uses @click, so the advice holds on
any page. This matches the corrected docs from #781.


Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED

Co-authored-by: Claude Opus 5.5 <[email protected]>
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