[BUG] - Alignment of details lines in Person component is no longer centered when using a large profile photo
Describe the bug The new version no longer applies center-aligned content when the profile image is larger than the vertical space occupied by the details text.
To Reproduce Steps to reproduce the behavior:
- Go to MGT playground Person component: https://mgt.dev/?path=/story/components-mgt-person--person
- Insert the following code into the HTML section:
<mgt-person person-query="me" view="threeLines" class="example" person-card="hover"></mgt-person>
- Insert the following code into the CSS section:
.example {
--person-avatar-size: 120px
}
- Note that the text is not vertically-aligned:
Expected behavior The image and text should be center aligned:
CSS which handled the alignment no longer exists in the new version:
new:
:host .flyout [slot="anchor"] {
display: flex;
cursor: pointer;
}
old:
:host .person-root, mgt-person .person-root {
position: relative;
display: flex;
align-items: center;
color: var(--color,var(--color-sub1,#323130));
}
Environment (please complete the following information):
- Chrome
- react
- SharePoint
Additional context Add any other context about the problem here.
Note that it works fine (vertically centered) if the Person component doesn't have the person-card property, but as the Person card adds a wrapping div, the alignment stops working.
Oh. This is a good catch! Thanks for reporting it! And thanks @Rafaelki for the additional insights! This is a bug and should be fixed. Thanks!
If you ever feel like it @JHolah, we are happy to accept PR with the fixes! If not, we'll queue it for a fix after our v4 release that should shortly happen. Thanks!
Thanks @JHolah and @Rafaelki!
I really appreciate the quality of issues from you both, it makes like as a maintainer much easier when we get super clear repos and descriptions of the problems you all are facing.
I just tested this with the next version the playground https://mgt.dev/next/?path=/story/components-mgt-person-html--person and it looks like this was resolved in #2900