Skip to content

MudChip, MudAvatar: Fix visual bug#7406

Merged
Garderoben merged 7 commits intoMudBlazor:devfrom
fondraco:fix/mudchip-avatar-visual-bug
Aug 27, 2023
Merged

MudChip, MudAvatar: Fix visual bug#7406
Garderoben merged 7 commits intoMudBlazor:devfrom
fondraco:fix/mudchip-avatar-visual-bug

Conversation

@fondraco
Copy link
Contributor

@fondraco fondraco commented Aug 22, 2023

Description

Adds the possibility to render avatar as a render fragment. Also addresses minor visual bug fixes with the MudAvatar and MudChip.

I know this wasn't the scope of this issue, but I updated the font size for the avatars so they can accommodate first and last name initials instead of just one char. This extends just a little to the functionality.

This is my before and after with the chips.
image
image

I also updated the Large chips icon size and its margins. Lastly, I added example code for the new AvatarContent render fragment into the docs.

The medium MudChip should now have spacings such as is displayed in this image from Material documentation.
image

I know MudChip still needs some more polishing, but for now, I'm satisfied. I'll be waiting on the color variable from the core team, and then I'll mark the PR ready for review.

Fixes #7392

How Has This Been Tested?

I'll do all the necessary tests.

Types of changes

  • 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)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library labels Aug 22, 2023
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (6fa8695) 90.59% compared to head (66183d9) 90.60%.
Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7406      +/-   ##
==========================================
+ Coverage   90.59%   90.60%   +0.01%     
==========================================
  Files         427      427              
  Lines       15176    15196      +20     
==========================================
+ Hits        13748    13768      +20     
  Misses       1428     1428              
Files Changed Coverage Δ
src/MudBlazor/Components/Chip/MudChip.razor.cs 92.45% <ø> (ø)
src/MudBlazor/Components/Chip/MudChip.razor 100.00% <100.00%> (ø)
...Components/ThemeProvider/MudThemeProvider.razor.cs 99.66% <100.00%> (+<0.01%) ⬆️
src/MudBlazor/Themes/Models/Palette.cs 78.66% <100.00%> (+0.58%) ⬆️
src/MudBlazor/Themes/Models/PaletteDark.cs 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…st initials of a real person, Updated MudChip icon size and spacing for the large chip, added Avatar example into the docs (MudBlazor#7392)
@henon henon mentioned this pull request Aug 22, 2023
2 tasks
@henon henon changed the title Fix/mudchip avatar visual bug MudChip, MudAvatar: Fix visual bug Aug 22, 2023
Copy link
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

looks good to me

@ScarletKuro
Copy link
Member

ScarletKuro commented Aug 23, 2023

@Mr-Technician @JonBunator, could you also read this #7392 (comment) and comment on the background color moment?
Tbh I don't see a problem in adding a new color property to the theme

@Mr-Technician
Copy link
Member

I would add a new color property to our variables. There is no reason not to.

@fondraco
Copy link
Contributor Author

fondraco commented Aug 24, 2023

I added two new colors for the default color and the hover and also updated the dark palette for those colors as well. @Mr-Technician

Before
image

After
image

The hover is also softer, but it is now according to the docs.

@fondraco fondraco requested a review from Mr-Technician August 24, 2023 20:21
@ScarletKuro
Copy link
Member

Should be this converted to a normal PR? The changes look correct.
I think this can be considered for a merge @henon if others have nothing to add.

@fondraco fondraco closed this Aug 25, 2023
@fondraco fondraco reopened this Aug 25, 2023
@fondraco fondraco marked this pull request as ready for review August 25, 2023 11:58
@ScarletKuro ScarletKuro requested a review from henon August 25, 2023 12:28
@henon
Copy link
Contributor

henon commented Aug 25, 2023

I asked @Garderoben to give the final approval of the visual changes. He should get to it on Sunday

@Garderoben Garderoben self-requested a review August 27, 2023 16:59
Copy link
Member

@Garderoben Garderoben left a comment

Choose a reason for hiding this comment

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

I like it!

@Garderoben Garderoben merged commit 508451f into MudBlazor:dev Aug 27, 2023
ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
* MudChip: Fixes for Avatar and minor visuals (MudBlazor#7392)

* Added appropriate test for the new render fragment

* MudChip: Updated font sizes for MudAvatar to accommodate first and last initials of a real person, Updated MudChip icon size and spacing for the large chip, added Avatar example into the docs (MudBlazor#7392)

* MudChip: Adjusted margin end as is in material documentation (MudBlazor#7392)

* MudAvatar, MudChip: updated obsolete XML descriptions, added new variables for colors for the default chip (MudBlazor#7392)

* MudAvatar, MudChip: Updated tests for ThemeProvider (MudBlazor#7392)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudChip Avatar visual bug

5 participants