🐛 Bug Report
After client-side hydration, structural template directives (<f-when>,
<f-repeat>) and property bindings (:prop) do not re-evaluate when their
underlying @observable properties change. Simple {{interpolation}} and
attribute bindings DO work reactively, creating an inconsistency that forces
app developers into imperative DOM workarounds.
| Field |
Detail |
| Expected |
<f-when condition="showSection"> hides/shows its content when showSection changes. |
| Actual |
The <f-when> block reflects only the initial server-rendered state. Toggling the observable has no effect on the DOM. The {{showSection}} interpolation in nearby text DOES update. |
| Root cause |
<f-when> is a compile-time directive processed by @microsoft/fast-html during SSR. During defer-and-hydrate, the hydration pass does not subscribe the <f-when> block to the condition observable. |
| Affected apps |
settings_btr (back button visibility), downloads_btr (empty state), permission_prompt_btr, all BTR apps using conditional rendering. |
| Severity |
P1 — Broken functionality. Any BTR page that needs to show/hide sections based on state changes is affected. |
| Workaround |
Imperative DOM manipulation — manually create/remove elements instead of relying on <f-when>. See Workaround A. |
| Suggested fix |
Framework-level: <f-when> blocks should subscribe to their condition observable during hydration, mirroring when() behavior in standard FAST Element. |
🐛 Bug Report
After client-side hydration, structural template directives (
<f-when>,<f-repeat>) and property bindings (:prop) do not re-evaluate when theirunderlying
@observableproperties change. Simple{{interpolation}}andattribute bindings DO work reactively, creating an inconsistency that forces
app developers into imperative DOM workarounds.
<f-when condition="showSection">hides/shows its content whenshowSectionchanges.<f-when>block reflects only the initial server-rendered state. Toggling the observable has no effect on the DOM. The{{showSection}}interpolation in nearby text DOES update.<f-when>is a compile-time directive processed by@microsoft/fast-htmlduring SSR. Duringdefer-and-hydrate, the hydration pass does not subscribe the<f-when>block to the condition observable.settings_btr(back button visibility),downloads_btr(empty state),permission_prompt_btr, all BTR apps using conditional rendering.<f-when>. See Workaround A.<f-when>blocks should subscribe to their condition observable during hydration, mirroringwhen()behavior in standard FAST Element.