Skip to content

chore(fast-html): use @microsoft/fast-build to build repeat fixture#7381

Merged
janechu merged 4 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-repeat
Apr 8, 2026
Merged

chore(fast-html): use @microsoft/fast-build to build repeat fixture#7381
janechu merged 4 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-repeat

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 4, 2026

Pull Request

📖 Description

Adds the repeat test fixture to the set of fixtures built automatically by @microsoft/fast-build.

This PR also fixes a gap in the fast.js CLI and WASM layer: the render_entry_with_templates function was missing from the WASM bindings, so the CLI fell back to attribute-derived child state instead of the intended entry-level full-state rendering. A new render_entry_with_templates WASM export is added and the CLI is updated to use it, ensuring root custom elements in fixtures receive the complete root state (matching runtime behaviour).

📑 Test Plan

Run npm run build:fixtures -w @microsoft/fast-html to regenerate all fixtures — all six should build without errors. The Playwright tests for the repeat fixture can be verified by running npx playwright test inside packages/fast-html.

✅ 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.

@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-repeat branch from cdcc657 to 2eb1e1e Compare April 7, 2026 17:26
janechu and others added 3 commits April 7, 2026 18:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add repeat to the list of fixtures built by build-fixtures.js
- Add render_entry_with_templates WASM binding to expose
  render_entry_template_with_locator to the CLI (root custom elements
  receive full entry-level state rather than attribute-only state)
- Update fast.js CLI to use render_entry_with_templates when templates
  are provided, so fixtures are rendered with the correct entry semantics
- Regenerate repeat/index.html with the updated WASM build output

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate repeat/index.html after rebasing onto main (which includes
PR #7403 entry-attribute stripping and PR #7380 when fixture).

Changes reflect correct entry-element behavior:
- Non-primitive binding attrs (list, someData) stripped from opening tag
- test-element-no-item-repeat-binding now renders empty repeat since
  list="{{emptyList}}" overrides root list with [] in merged state

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-repeat branch from 2eb1e1e to 2dae200 Compare April 8, 2026 01:49
@janechu janechu marked this pull request as ready for review April 8, 2026 01:52
…tate

TestElementEvent.list defaults to ["A"] (1 item), but the entry.html
was passing list="{{list}}" (2 items: Foo/Bar from root state), causing
the SSR to render 2 buttons while the Playwright test expected 1.

Fix: add eventList: ["A"] to state.json and use :list="{{eventList}}"
in entry.html so the property binding passes a 1-item list to the
element's SSR state (matching the JS component's initial value) while
keeping the array out of the rendered HTML attributes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu merged commit 6eb523b into main Apr 8, 2026
11 of 14 checks passed
@janechu janechu deleted the users/janechu/update-fixture-to-use-fast-build-repeat branch April 8, 2026 02:37
janechu added a commit that referenced this pull request Apr 8, 2026
Regenerate repeat-event/index.html after rebasing onto main (which
includes #7381 repeat fixture, #7380 when fixture, and #7403
entry-attribute stripping).

Non-primitive binding attrs (items) are now stripped from entry element
opening tags; primitive attrs (show-names="true") are preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant