fix(components): add inputToBoolean transform to all pure-boolean inputs (#546)#696
Open
giulio-leone wants to merge 2 commits into
Open
fix(components): add inputToBoolean transform to all pure-boolean inputs (#546)#696giulio-leone wants to merge 2 commits into
giulio-leone wants to merge 2 commits into
Conversation
…uts (italia#546) Apply the inputToBoolean transform (wrapping Angular's booleanAttribute) to every @input that accepts only boolean values but was missing the coercion. This allows idiomatic attribute-only syntax: <it-chip showCloseButton disabled> instead of <it-chip showCloseButton="true" disabled="true"> Components updated: - ItAutocompleteComponent: required - ItPasswordInputComponent: required, useNumber, useCapitalCase, useSmallCase, useSpecialCharacters - ItChipComponent: showCloseButton, disabled (setters) - ItDimmerComponent: active (setter) - ItDimmerButtonsComponent: hasOneButton (setter) Union-type inputs (readonly, progress, backdrop, validationMode) are intentionally excluded — they accept non-boolean string values. Includes coercion tests for chip and dimmer components. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@giulio-leone credo ci siano altri input che possono passare a |
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
Fixes #546
Applies the
inputToBooleantransform (which wraps Angular's built-inbooleanAttribute) to every@Inputthat accepts only boolean values but was missing the coercion. This allows idiomatic attribute-only syntax:Components updated
ItAutocompleteComponentrequiredItPasswordInputComponentrequired,useNumber,useCapitalCase,useSmallCase,useSpecialCharactersItChipComponentshowCloseButton(setter),disabled(setter)ItDimmerComponentactive(setter)ItDimmerButtonsComponenthasOneButton(setter)Intentionally excluded
Union-type inputs that accept non-boolean string values are not modified:
readonly: boolean | 'plaintext'progress: number | booleanbackdrop: 'static' | booleanvalidationMode: boolean | 'only-valid' | 'only-invalid'Testing
showCloseButton/disabledattribute-only + string coercion)activeattribute-only)