Skip to content

feat(fast-html): add boolean expression resolver to boolean attribute#7333

Merged
janechu merged 13 commits intomainfrom
users/janechu/add-boolean-expression-resolver-to-boolean-attribute
Mar 24, 2026
Merged

feat(fast-html): add boolean expression resolver to boolean attribute#7333
janechu merged 13 commits intomainfrom
users/janechu/add-boolean-expression-resolver-to-boolean-attribute

Conversation

@janechu
Copy link
Copy Markdown
Collaborator

@janechu janechu commented Mar 20, 2026

Pull Request

📖 Description

This change allows for a boolean expression chain binding to resolve on a boolean attribute.

Example:

<input
  ?disabled="{{active == current}}"
  ?required="{{someValue > someOtherValue}}"
>

There is some duplicate logic, but it requires a larger refactor to consolidate it. Will take that as a follow up step.

🎫 Issues

Alternative to #7330

👩‍💻 Reviewer Notes

This refactors the template somewhat to a switch statement when assessing and applying attribute bindings.

📑 Test Plan

Added a test in the attribute fixture.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@janechu janechu changed the title Add boolean expression resolver to boolean attribute feat(fast-html): add boolean expression resolver to boolean attribute Mar 20, 2026
@janechu janechu merged commit fbf25c6 into main Mar 24, 2026
12 checks passed
@janechu janechu deleted the users/janechu/add-boolean-expression-resolver-to-boolean-attribute branch March 24, 2026 17:09
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.

2 participants