Skip to content

chore(fast-html): use @microsoft/fast-build to build when fixture with lowercase attrs#7380

Open
janechu wants to merge 4 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-when
Open

chore(fast-html): use @microsoft/fast-build to build when fixture with lowercase attrs#7380
janechu wants to merge 4 commits intomainfrom
users/janechu/update-fixture-to-use-fast-build-when

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Apr 4, 2026

Uses @microsoft/fast-build to generate the index.html for the when test fixture in @microsoft/fast-html.

Changes

  • Adds the when fixture to the build-fixtures.js script so it is generated by the SSR crate alongside attribute, binding, and event fixtures.
  • Converts all HTML attribute names in entry.html from dash-case to lowercase no-dash form (e.g. var-avara, this-varthisvar, show-progressshowprogress) to match the lowercasing behaviour of @microsoft/fast-build, which lowercases all attribute keys before storing them in child element state.
  • Updates main.ts @attr declarations to use the matching no-dash attribute names.
  • Updates templates.html template expressions to use the same lowercase no-dash keys (e.g. {{varA == 3}}{{vara == 3}}, {{showProgress}}{{showprogress}}).
  • Regenerates index.html via npm run build:fixtures.

@janechu
Copy link
Copy Markdown
Collaborator Author

janechu commented Apr 6, 2026

Updated to pass state attributes to the nested-when element. Now builds successfully with the renderer fix in #7396 (kebab-to-camelCase attribute mapping).

@janechu janechu marked this pull request as ready for review April 6, 2026 23:55
janechu and others added 4 commits April 6, 2026 19:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use lowercase no-dash attribute names (e.g. vara, thisvar, thatvar,
showprogress, enablecontinue) to match the SSR crate's lowercasing
behaviour and to avoid hyphen-separated state keys that would not
match the camelCase template expressions.

- main.ts: update @attr declarations to use no-dash attribute names
- entry.html: replace dash-case attrs with lowercase no-dash equivalents
- templates.html: update f-when expressions to use lowercase state keys
- index.html: regenerated via npm run build:fixtures

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@janechu janechu force-pushed the users/janechu/update-fixture-to-use-fast-build-when branch from 8e19d1e to 6149a56 Compare April 7, 2026 02:56
@janechu janechu changed the title chore(fast-html): use @microsoft/fast-build to build when fixture chore(fast-html): use @microsoft/fast-build to build when fixture with lowercase attrs Apr 7, 2026
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