Conversation
…xture Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ing attrs
Rebase onto main (includes all previous fixtures up to children).
Resolved build-fixtures.js conflict by appending 'host-bindings' to the
full fixture list.
Remove {{binding}} attrs from entry elements — root JSON state is passed
implicitly by @microsoft/fast-build. Static literal attrs (text, id,
first/second for host-multi-content-element) are preserved since they
represent per-element values not covered by root state.
Fixture regenerated: resolved binding attrs (greeting, text, disabled,
first, second, attr/disabled) stripped from entry element opening tags
while shadow DOM content remains correct.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2371e55 to
fc09fba
Compare
Add back the style block from the original index.html into entry.html so it is preserved through the fast-build fixture generation. Regenerated index.html now includes the display:block styles for all custom elements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ture Change isDisabled from @observable to @attr({ mode: 'boolean', attribute: 'disabled' }) in HostMultiElement, HostAllTypesElement, and HostPermutationBase. @observable does not auto-reflect to HTML attributes. In defer-and-hydrate mode, FAST does not re-apply ?boolean host template bindings to the custom element, so the disabled attribute was never set after removing the ?disabled={{isDisabled}} entry-level binding. With @attr({ mode: 'boolean' }), FAST auto-reflects the default isDisabled=true to disabled="" when the element connects, satisfying the test assertions without needing SSR pre-rendering via entry.html binding attrs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert isDisabled back to @observable (undoing the @attr change). Instead, add static attributes disabled and attr="value" directly to the entry elements that need them — these are pre-rendered by fast-build into index.html, matching the original fixture output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
Adds the
host-bindingstest fixture to@microsoft/fast-htmland generates itsindex.htmlusing@microsoft/fast-build, consistent with the other fixtures (attribute,binding,event,ref,slotted,when,repeat,repeat-event,children).The
host-bindingsfixture covers host-level attribute directives on the<template>element — event bindings (@click), boolean attr bindings (?disabled), property bindings (:title), and regular attr bindings (attr). It exercises multiple element permutations to verify that content binding indexes inside the shadow DOM are correctly offset when host bindings are present.Entry elements in
entry.htmlcarry no{{binding}}attributes — root JSON state is passed implicitly by@microsoft/fast-build. Static literal values that differ per element (e.g.text="content text") are kept as-is since they represent unique per-element data not covered by root state.🎫 Issues
No open issues directly addressed.
📑 Test Plan
npm run build:fixturesinpackages/fast-htmlruns cleanly and regenerateshost-bindings/index.html— resolved binding attrs are stripped from entry element opening tags, shadow DOM hydration markers are correct, and content is rendered from root state.host-bindings.spec.ts) covers 11 tests verifying correct index offsets after hydration across all host binding type permutations.✅ Checklist
General
$ npm run change⏭ Next Steps