Skip to content

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

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

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

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 4, 2026

Pull Request

📖 Description

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

The repeat-event fixture exercises two scenarios:

  • test-element-repeat-event: a f-repeat over a list of items where each item renders a <button> that fires a custom click handler via @click.
  • test-when-in-repeat: a f-repeat combined with a f-when inside each item, conditionally rendering a named button based on the parent element's showNames observable.

The build-fixtures.js script is updated to include "repeat-event" in the fixtures list.

📑 Test Plan

Run npm run build:fixtures -w @microsoft/fast-html to regenerate all fixtures — all eight should build without errors. The Playwright tests for the repeat-event 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 and others added 2 commits April 7, 2026 19:39
…ture

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-repeat-event branch from 67d4c45 to a890a18 Compare April 8, 2026 02:40
janechu and others added 2 commits April 7, 2026 19:59
Entry custom elements now have no attributes — the full root state JSON
is passed implicitly. Template keys are aligned with state.json:

- test-element-repeat-event: {{item in items}} → {{item in repeatEventItems}}
- test-when-in-repeat: {{item in items}} → {{item in whenRepeatItems}}
- f-when condition: {{c.parent.showNames}} → {{showNames}} (resolved
  directly from root state, no context traversal needed)

entry.html updated: all {{binding}} attrs removed from both elements.
Fixture index.html regenerated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename @observable properties to match the state.json keys and template
expressions:
- TestElementRepeatEvent.items → repeatEventItems
- TestWhenInRepeat.items → whenRepeatItems

Update repeat-event.spec.ts to use the new property name.
Update comment on TestWhenInRepeat to reflect the simplified binding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu marked this pull request as ready for review April 8, 2026 03:04
@janechu janechu merged commit bd4f8ce into main Apr 8, 2026
14 checks passed
@janechu janechu deleted the users/janechu/update-fixture-to-use-fast-build-repeat-event branch April 8, 2026 03:17
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