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 floatlabel and expand test #16602

Open
wants to merge 3 commits into
base: v18
Choose a base branch
from

Conversation

medbenmakhlouf
Copy link

@medbenmakhlouf medbenmakhlouf commented Oct 20, 2024

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)

#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 7:32am
primeng-v18 ⬜️ Ignored (Inspect) Visit Preview Nov 17, 2024 7:32am

@vladovelichkovski
Copy link

@medbenmakhlouf
An idea for all the PRs that you have for PrimeNG for v18.
mark all inputs, outputs, viewChild, ciewChildren... as readonly to prevent accidental mutations or assignments.
Also, you can mark all injected variables like you have here (_componentStyle = inject(FloatLabelStyle);) as readonly as well for the same reason. They can be also private or # prefixed.

Another idea is to start replacing all private methods and variables with # prefix. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties)

A discussion is maybe needed with the PrimeNG team if they want to accept this code style and changes.

P.S: PR Checker is failing because the PR is not linked with any issue. Create an issue for every PR and link them.

medbenmakhlouf and others added 2 commits November 1, 2024 16:30
# Conflicts:
#	packages/primeng/src/floatlabel/floatlabel.spec.ts
#	packages/primeng/src/floatlabel/floatlabel.ts
@mertsincan mertsincan added this to the 18.x milestone Nov 18, 2024
@mertsincan mertsincan added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Nov 18, 2024
@mertsincan
Copy link
Member

After the 18 release, we plan to work on tests and signal base structures. That's why I've set a 18.x milestone for now. I'll review and merge this PR before starting work. Thanks a lot for your understanding!

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.

3 participants