Repository navigation
fix(web-components): defer fallback custom-state attributes - #36722
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Conversation
|
Very well. Thanks! |
|
Just a remark: isn't textarea affected by the same problem too? |
|
Yes. |
e819d40 to
f77db18
Compare
|
Following up after the earlier inactivity. I have refreshed this shared fallback fix onto current master; it is now 0 behind and mergeable, with the prior textarea/tablist discussion already addressed and no unresolved review threads. Ready for review when convenient. |
|
Chris Holt (@chrisdholt) Could you take another look at the shared fallback fix? The earlier tablist/textarea questions are addressed; GitHub Actions still needs maintainer approval. |
Yes - looking to test #36808 with Blazor before it goes in and then we can look at how this plays with existing known hydration paths. |
|
I tested #36722 together with #36808 in an isolated branch (no changes to either PR). The branches merge cleanly, the web-components TypeScript compile passes, all 3 Chromium client-side custom-state fallback regressions pass, and 96 Chromium SSR-mode tests across tablist, textarea, and checkbox pass. This covers the web-component harness only; it does not replace your planned Blazor hydration test. |
Awesome, appreciate this! I have one separate test to do for a specific hydration situation but at a glance this is super clear and focused. Thanks @sylvesterkaczmare! |
Previous Behavior
The attribute fallback for CSS custom states mutates the host during construction. With
:state()unsupported,document.createElement('fluent-tablist')fails because the constructor addsstate--horizontalbefore returning.New Behavior
Queue fallback attribute changes through FAST's DOM update queue. This keeps construction attribute-free and preserves toggle/swap ordering, including state changes before connection. The native
ElementInternals.statespath is unchanged.Adds three browser regressions and a patch change file. This fixes the shared web-components implementation; Blazor will need the resulting package release.
Validation
Tests used the repository's FAST browser harness through focused Nx targets, Playwright 1.56.1 and cached Chromium build 1208. Firefox, WebKit, and the full monorepo suite were not run.
Related Issue
Addresses microsoft/fluentui-blazor#5262.
The consumer issue was closed during implementation because older Chrome versions are outside Blazor's support policy. The maintainer nevertheless explicitly welcomed a contribution fixing the fallback: microsoft/fluentui-blazor#5262 (comment).