Skip to content

docs: cleanup plugin wordings#282

Merged
mohamedmansour merged 7 commits into
mainfrom
feat/cleanup-docs
May 8, 2026
Merged

docs: cleanup plugin wordings#282
mohamedmansour merged 7 commits into
mainfrom
feat/cleanup-docs

Conversation

@mohamedmansour
Copy link
Copy Markdown
Contributor

@mohamedmansour mohamedmansour commented Apr 30, 2026

Why

PR #279 (split FAST → fast-v2, added fast-v3) leaked FAST-specific names, marker tables, and code paths into places that are supposed to be plugin-agnostic. The repo started reading "FAST-first" even though FAST is just one of several plugins. We should be generic.

What we did

  • Made the generic docs actually generic. DESIGN.md, the plugins reference, the CLI guide, and every integration guide (Rust, Node, Electron, FFI, WASM, .NET) no
    longer enumerate FAST plugin variants or wire formats. They describe the plugin architecture neutrally and link to the dedicated WebUI Framework spec for one concrete
    example.
  • Cleaned every public API doc string. The FFI, Node, WASM, .NET, and @microsoft/webui package docs now describe plugin?: string generically, with no FAST examples leaking into language-binding APIs.
  • Made webui the default example everywhere. Where a code sample had to pick some plugin, it now uses webui instead of fast-v3.
  • Replaced per-app quickstarts in the examples README with a single cargo xtask dev entry point (which each app's pnpm start already wraps).

What we deliberately left alone

  • The plugin implementation files and the Plugin::Fast* enum variants — those are the implementation and stable CLI strings.
  • examples/app/todo-fast and its dedicated tutorial — that's the canonical FAST example.

Validation

  • cargo xtask check passes end-to-end (lint, fmt, clippy, deny, tests, build, wasm, examples, benches, docs).

@mohamedmansour mohamedmansour requested review from a team and akroshg April 30, 2026 07:59
mohamedmansour and others added 3 commits April 30, 2026 08:35
@attr is documented as bidirectional reflection ("reflects to/from an
HTML attribute"), but only the attribute → property direction was
implemented via attributeChangedCallback. Property mutations never
reached the DOM, so selectors like `calc-app[mode="scientific"]`
silently broke after client-side state changes — the calculator E2E
tests added in PR #282 caught this.

Inline the reflection in the @attr setter so that when the element is
connected, every property mutation also writes the attribute (boolean
mode toggles presence; string mode writes `String(value)` or removes
when nullish). The pre-flight `getAttribute`/`hasAttribute` check
keeps SSR-upgraded elements paying only one comparison, and the
synchronous `attributeChangedCallback` re-entry short-circuits on the
`oldValue === newValue` guard.

Defining the setter directly inside applyAttr (instead of routing
through createReactiveProperty with a reflect callback) avoids one
closure allocation per @attr declaration and one indirect call per
setter invocation. Folding the previous attrMap + boolAttrs registries
into a single attrMeta map cuts the ACB from two WeakMap lookups to
one.

class-field initializers don't "gain attributes" inside the
constructor (forbidden by the custom-element spec). Detached property
writes won't reflect to the attribute until the next setter call
while connected — no example app uses that pattern, and a connect-time
reconciliation pass can be reintroduced cheaply if needed.

Adds attr fixture coverage for property → attribute reflection,
nullish removal, and boolean toggling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
akroshg
akroshg previously approved these changes Apr 30, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mohamedmansour mohamedmansour requested a review from akroshg May 7, 2026 21:39
@mohamedmansour mohamedmansour merged commit 3dcd450 into main May 8, 2026
21 checks passed
@mohamedmansour mohamedmansour deleted the feat/cleanup-docs branch May 8, 2026 00:57
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.

2 participants