Skip to content

chore(fast-html): use @microsoft/fast-build to build ref fixture#7378

Merged
janechu merged 2 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-ref
Apr 7, 2026
Merged

chore(fast-html): use @microsoft/fast-build to build ref fixture#7378
janechu merged 2 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-ref

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 4, 2026

Pull Request

📖 Description

Adds the ref test fixture to @microsoft/fast-html and generates its index.html using @microsoft/fast-build, consistent with the other fixtures (attribute, binding, event).

The ref fixture covers f-ref attribute directives, which bind a reference to a DOM element in a FAST template (e.g. <video f-ref="{video}"></video>). Because f-ref is client-side only, @microsoft/fast-build strips it from the rendered Declarative Shadow DOM and preserves only the data-fe-c hydration binding count so the FAST runtime can allocate the correct number of binding slots.

🎫 Issues

No open issues directly addressed.

📑 Test Plan

  • npm run build:fixtures in packages/fast-html runs cleanly and regenerates ref/index.htmlf-ref is stripped from shadow DOM output, data-fe-c-0-1 binding annotation is preserved.
  • All other fixture outputs (attribute, binding, event) are unchanged.

✅ 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

  • Add a Playwright spec file (ref.spec.ts) covering hydration of the f-ref fixture to verify client-side element reference assignment after SSR.

@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-ref branch from d0c86bf to 9c64e48 Compare April 7, 2026 04:21
janechu and others added 2 commits April 6, 2026 21:22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-ref branch from 9c64e48 to 5812a98 Compare April 7, 2026 04:22
@janechu janechu marked this pull request as ready for review April 7, 2026 04:23
@janechu janechu requested a review from Copilot April 7, 2026 04:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the @microsoft/fast-html test fixture set by adding a ref fixture and wiring it into the existing @microsoft/fast-build-based fixture build pipeline, aligning it with attribute, binding, and event.

Changes:

  • Adds ref fixture inputs (entry.html, templates.html, state.json) for @microsoft/fast-build.
  • Regenerates ref/index.html using @microsoft/fast-build output plus template injection.
  • Includes ref in packages/fast-html/scripts/build-fixtures.js so npm run build:fixtures builds it.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/fast-html/test/fixtures/ref/templates.html Adds declarative template using f-ref for the ref fixture.
packages/fast-html/test/fixtures/ref/state.json Adds state input for the ref fixture build (empty state).
packages/fast-html/test/fixtures/ref/entry.html Adds build entry HTML for the ref fixture (matches other buildable fixtures).
packages/fast-html/test/fixtures/ref/index.html Updates generated fixture output to the fast-build produced HTML + injected <f-template> declarations.
packages/fast-html/scripts/build-fixtures.js Adds ref to the list of fixtures built via @microsoft/fast-build.
change/@microsoft-fast-html-ref-eb80fd68-6df1-46bc-848d-f59cd9be4b49.json Records the change request for the @microsoft/fast-html package.

@janechu janechu merged commit 53ac856 into main Apr 7, 2026
13 of 18 checks passed
@janechu janechu deleted the users/janechu/update-fixture-to-use-fast-build-ref branch April 7, 2026 04:30
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