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

fix(avatar): add missing classes related to the shape prop for the image #159

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

RaphaelNunes10
Copy link
Contributor

I have found and fixed what I believe to be an issue with the "Avatar" component on both presets that has been bothering me for a while.

The image from the component doesn't update with the "shape" prop like the root container does:

Broken Avatar Image

incorrect-avatar

Fixed Avatar Image

correct-avatar

Code

<Avatar image="avatar.png" size="xlarge" shape="circle" :pt="{root: 'p2 bg-red-200!'}" :pt-options="{ mergeProps: true }" /> *

* Obs.: Padding and red background added to the root element, as an example, to exaggerate the discrepancy with the image.

It seems that the images used in the docs are, conveniently enough, rounded PNGs with transparent backgrounds, hiding this issue. Unless it's by design, but that doesn't seem likely when comparing this behavior with the "Lara" theme in styled-mode, using vanilla CSS.

This is my first time contributing, so, let me know if I this will help and if I should make any changes to adhere to the project's guidelines.

And feel free to add me as a contributor if this ends up helping in any way. This project seems so promising and the community so engaging that I'll be more than happy to contribute with fixes or suggestions as I use it in my projects.

Copy link

vercel bot commented Feb 23, 2024

@RaphaelNunes10 is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

@RaphaelNunes10
Copy link
Contributor Author

RaphaelNunes10 commented Feb 23, 2024

It seems @geminigeek beat me to it, filling this issue while I was writing the description for this PR in #158.

Feel free to choose the best suggestion for the fix.

@atakantepe atakantepe merged commit cf6ed3d into primefaces:main Feb 27, 2024
1 check failed
@atakantepe atakantepe self-requested a review February 27, 2024 13:22
@atakantepe atakantepe self-assigned this Feb 27, 2024
@atakantepe atakantepe added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 27, 2024
@atakantepe atakantepe added this to the 0.8.1 milestone Feb 27, 2024
@atakantepe
Copy link
Member

Hi, thank you for your contribution. I merged your PR. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants