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(/src/components/avatar): enable explicit sizing of placeholder initials (#659) #660

Conversation

rpocklin
Copy link
Contributor

@rpocklin rpocklin commented Mar 7, 2023

Description

This PR removes the hard-coding of width and height styling applied to any Avatar component using the placeholderInitials property, and adds in the size class when rendering so that it is rendered in the expected size.

Fixes: #659

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change contains documentation update

Breaking changes

None.

How Has This Been Tested?

Tested locally, tested in an external CRA via link and also tested via a previously failing unit test (included in PR).

Test Configuration:
N/A

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@rpocklin rpocklin force-pushed the fix/enable-responsive-avatar-with-initials branch from 8157b8e to eafeb72 Compare March 7, 2023 00:40
@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (329cb5a) 99.42% compared to head (eafeb72) 99.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #660   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         130      130           
  Lines        6438     6439    +1     
  Branches      481      481           
=======================================
+ Hits         6401     6402    +1     
  Misses         37       37           
Impacted Files Coverage Δ
src/lib/components/Avatar/Avatar.tsx 100.00% <100.00%> (ø)
src/lib/theme/default.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tulup-conner tulup-conner added this to the 1.0.0 milestone Mar 7, 2023
@tulup-conner tulup-conner merged commit 525b90d into themesberg:main Mar 7, 2023
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.

<Avatar> does not respect size property when used with placeholderInitials property
3 participants