Skip to content

chore(fast-html): use @microsoft/fast-build to build slotted fixture#7379

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

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

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 4, 2026

Pull Request

📖 Description

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

The slotted fixture covers f-slotted attribute directives, which bind references to slotted child nodes in a FAST template (e.g. <slot f-slotted="{slottedNodes filter elements()}"></slot>). Because f-slotted is client-side only, @microsoft/fast-build strips it from the rendered Declarative Shadow DOM while preserving the data-fe-c hydration binding count so the FAST runtime can allocate the correct number of binding slots.

The fixture exercises three slot configurations:

  • Default slot with element filter: f-slotted="{slottedNodes filter elements()}"
  • Named slot with no filter: <slot name="foo" f-slotted="{slottedFooNodes}">
  • Named slot with element type filter: <slot name="bar" f-slotted="{slottedBarNodes filter elements(p, ol)}">

🎫 Issues

No open issues directly addressed.

📑 Test Plan

  • npm run build:fixtures in packages/fast-html runs cleanly and regenerates slotted/index.htmlf-slotted directives are stripped from shadow DOM output, data-fe-c binding annotations are preserved on each slot.
  • 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 (slotted.spec.ts) covering hydration of the f-slotted fixture to verify client-side slotted node reference assignment after SSR.

@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-slotted branch from ef768b2 to 64ebc96 Compare April 7, 2026 04:32
janechu and others added 2 commits April 6, 2026 21:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu requested a review from Copilot April 7, 2026 04:35
@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-slotted branch from 64ebc96 to a2da7fd Compare April 7, 2026 04:35
@janechu janechu marked this pull request as ready for review April 7, 2026 04:35
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

Adds a new slotted test fixture to @microsoft/fast-html and wires it into the existing @microsoft/fast-build-based fixture build pipeline so its index.html is generated consistently with the other fast-build fixtures.

Changes:

  • Added slotted fixture inputs (entry.html, templates.html, state.json) and generated output (index.html).
  • Updated packages/fast-html/scripts/build-fixtures.js to include slotted in the fixtures built via @microsoft/fast-build.
  • Added a Beachball change file documenting the chore-level update.

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/slotted/templates.html Defines f-slotted usages to exercise default and named slot configurations with filters.
packages/fast-html/test/fixtures/slotted/state.json Provides the fixture state input for the fast-build CLI (empty object).
packages/fast-html/test/fixtures/slotted/index.html Generated HTML output showing f-slotted stripped from DSD while preserving data-fe-c-* hydration bindings.
packages/fast-html/test/fixtures/slotted/entry.html Entry HTML used as input to build the fixture output via fast-build.
packages/fast-html/scripts/build-fixtures.js Adds slotted to the fast-build fixture build list.
change/@microsoft-fast-html-slotted-fdec5a05-d62e-45dd-92a7-e47213d20812.json Records the change in the repo’s change management system (Beachball).

@janechu janechu merged commit 6c74e69 into main Apr 7, 2026
14 checks passed
@janechu janechu deleted the users/janechu/update-fixture-to-use-fast-build-slotted branch April 7, 2026 04:59
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