fix: use correct FAST syntax in f-template directive attributes#227
Merged
mohamedmansour merged 2 commits intomainfrom Apr 14, 2026
Merged
Conversation
mohamedmansour
requested changes
Apr 13, 2026
Contributor
mohamedmansour
left a comment
There was a problem hiding this comment.
These changes should go inside fast.rs not in core infra code.
Add regression tests in the FAST parser plugin verifying that generated f-template blocks always use FAST syntax (<f-when>/<f-repeat>) instead of webui syntax (<if>/<for>): - For loop: <for> converted to <f-repeat> in generated f-template - Shadow DOM: shadowrootmode stripped and directives converted - Nested: both <if> and <for> converted when nested together Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2389b0c to
41d1302
Compare
Change FAST syntax conversion to emit double curly braces:
- <if condition="X"> → <f-when value="{{X}}">
- <for each="X"> → <f-repeat value="{{X}}">
Update DESIGN.md to reflect the corrected syntax.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohamedmansour
approved these changes
Apr 13, 2026
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.
Summary
Fix the FAST parser plugin to emit double curly braces in
<f-when>and<f-repeat>value attributes, matching the FAST-HTML client-side parser expectations.Before
After
Changes
crates/webui-parser/src/plugin/fast.rsconvert_if_tag: emit{{EXPR}}instead of{EXPR}in<f-when value>convert_for_tag: emit{{EXPR}}instead of{EXPR}in<f-repeat value>DESIGN.md