docs: add declarative template documentation to 3.x docs site#7495
Merged
janechu merged 3 commits intoreleases/fast-element-v3from Apr 24, 2026
Merged
docs: add declarative template documentation to 3.x docs site#7495janechu merged 3 commits intoreleases/fast-element-v3from
janechu merged 3 commits intoreleases/fast-element-v3from
Conversation
Add a new Declarative HTML section to the 3.x documentation with four pages: - Overview: purpose, hello world example, declarative vs imperative comparison - Writing f-templates: binding syntax, directives, events, execution context - Defining Elements: TemplateElement setup, lifecycle callbacks, observerMap, attributeMap - Server-Side Rendering: SSR contract, hydration flow, fast-build CLI Also add cross-references in fast-element README.md and DECLARATIVE_HTML.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace TemplateElement.define() with declarativeTemplate() resolver - Replace templateOptions: "defer-and-hydrate" with template: declarativeTemplate() - Use observerMap()/attributeMap() as define extensions instead of TemplateElement.options() - Fix hydration markers example: data-fe is for attribute bindings only - Change attribute-name-strategy default from "none" to "camelCase" - Fix README/DECLARATIVE_HTML links to use fast.design URLs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
janechu
commented
Apr 24, 2026
janechu
commented
Apr 24, 2026
janechu
commented
Apr 24, 2026
Remove all lifecycle callback documentation (TemplateElement.config, hydrationComplete, etc.) as the API will be redesigned. Remove all TemplateElement.options() references. Update cross-references in overview and server-rendering pages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chrisdholt
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
Adds a new Declarative HTML documentation section to the 3.x docs site with four pages covering the full declarative template authoring workflow:
htmltagged templates.f-when,f-repeat,f-ref,f-slotted,f-children), dot-notation paths, execution context access ($e,$c), and expression limitations.TemplateElementregistration,templateOptions: "defer-and-hydrate", lifecycle callbacks (config()), element configuration (options()),observerMapandattributeMapusage.@microsoft/fast-buildCLI usage.Also adds cross-references from
packages/fast-element/README.mdandDECLARATIVE_HTML.mdto the new docs.Based on the declarative template features from PRs #7490, #7491, #7492, and #7493.
📑 Test Plan
npm run build -w sites/websitenpm run checkchangepasses (no change files needed for docs-only changes to the website)✅ Checklist
General
$ npm run change