Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (v18): Modernize toggleswitch and expand test #16598

Closed

Conversation

medbenmakhlouf
Copy link

Refactor:

Updated the ToggleSwitch component to leverage Angular's new signal-based inputs for enhanced reactivity and performance optimization.

Test Cases: Added comprehensive test cases to cover:

Dynamic input handling (label, icon, image)
Inline styles and CSS class binding
Size variations (normal, large, xlarge)
Shape variations (square, circle)
Error handling for image loading
Accessibility (aria-label, aria-labelledby)
Custom styling and class inputs (styleClass, style)

Fix #16546

Copy link

vercel bot commented Oct 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2024 8:34am
primeng-v18 ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2024 8:34am

Comment on lines 116 to 125
trueValue = input<boolean, any>(true, { transform: booleanAttribute });
/**
* Value in unchecked state.
* @group Props
*/
@Input() falseValue: any = false;
falseValue = input<boolean, any>(false, { transform: booleanAttribute });
/**
* Used to define a string that autocomplete attribute the current element.
* @group Props
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should't be transformed to boolean. These options give us ability to use different checked and unchecked values other than true and false. It can be string, number, ... anything.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vladovelichkovski for your feedback! I just address it in my last commit.

@mertsincan mertsincan added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Nov 18, 2024
@mertsincan mertsincan added this to the 18.x milestone Nov 18, 2024
@cagataycivici cagataycivici deleted the branch primefaces:v18 December 9, 2024 11:48
@mertsincan mertsincan removed this from the 19.x milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants