Skip to content

docs(3.x): document <f-template> host attribute propagation in SSR page#7522

Merged
janechu merged 2 commits into
releases/fast-element-v3from
users/janechu/docs/v3-host-attribute-propagation
May 20, 2026
Merged

docs(3.x): document <f-template> host attribute propagation in SSR page#7522
janechu merged 2 commits into
releases/fast-element-v3from
users/janechu/docs/v3-host-attribute-propagation

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented May 19, 2026

Pull Request

📖 Description

Adds a new "Host Attribute Propagation" section to the 3.x declarative server-rendering documentation page (sites/website/src/docs/3.x/declarative-templates/server-rendering.md) describing how attributes declared on the inner <template> of an <f-template> propagate onto the rendered host element opening tag during SSR.

The new section covers:

  • The concept and a worked example (a primary-button component with tabindex, role, and class declared on its template).
  • The three supported binding forms: static name="value", dynamic name="{{expression}}", and boolean ?name="{{expression}}", including which values get stripped.
  • The client-only attribute skip list (@event, :property, f-ref, f-slotted, f-children).
  • The "author wins on conflict" dedupe rule (including how ?name dedupes against the bare name).

🎫 Issues

This documents the build-time renderer behavior implemented on main in microsoft/fast#7521. The feature will be picked up by the next mainreleases/fast-element-v3 sync; this docs PR can land independently so that the website reflects the upcoming behavior.

👩‍💻 Reviewer Notes

  • Docs-only change — no source, test, or build configuration is touched.
  • The new section is placed between State Propagation and Using @microsoft/fast-build, keeping the conceptual flow (rendering contract → hydration flow → state in → host attrs out → tooling).
  • Markdown is wrapped inside the existing {% raw %} Nunjucks block so that {{ }} examples render literally on the site.

📑 Test Plan

  • No test changes are required. Verified the markdown edits render correctly by inspection (no broken table syntax, no unescaped Nunjucks/Liquid braces outside {% raw %}).
  • Suggested smoke test for reviewer: npm run build -w @microsoft/fast-site (or the website's local dev preview) and open the rendered server-rendering page to confirm the new section displays as expected.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ Next Steps

When the next mainreleases/fast-element-v3 sync lands, this docs page will accurately describe the behavior shipping in the v3 build pipeline. No further docs work is anticipated for this feature on the v3 track.

Adds a new "Host Attribute Propagation" section to the declarative
server-rendering page covering:

- The concept: attributes on the inner <template> of an <f-template>
  are propagated onto the rendered host opening tag.
- Supported binding forms: static name="value", dynamic
  name="{{expression}}", and boolean ?name="{{expression}}".
- Client-only skip list: @event, :property, f-ref, f-slotted,
  f-children.
- Author-wins conflict resolution rule.

Documents behavior implemented on main in #7521 (will be picked up by
the next v3 sync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EOF
)
@janechu janechu marked this pull request as ready for review May 19, 2026 02:53
@janechu janechu merged commit 5424bc5 into releases/fast-element-v3 May 20, 2026
11 checks passed
@janechu janechu deleted the users/janechu/docs/v3-host-attribute-propagation branch May 20, 2026 22:12
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