-
Notifications
You must be signed in to change notification settings - Fork 273
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(ui5-avatar): avatar initials correct display #6731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change PR title to be ui5-avatar related. Testing it locally the change doesn't work as expected. If fallback icon is set initials container avatar.querySelector(".ui5-avatar-initials")
return null and the expression is never done.
In what case did you see the fallback icon being set? |
Using the initial from the original issue "RHB". If you change the initials to "RH" for example the fallback icon will not be removed as expected. Check initials from element inspector https://codesandbox.io/s/ui5-webcomponents-forked-6o4xi1?file=/index.html |
ee2a057
to
68dbdff
Compare
@nnaydenow , can you, please, check my new solution? |
<ui5-avatar id="test" size="XS" icon="share"></ui5-avatar>
<script>
const test = document.getElementById("test");
setTimeout(() => test.initials = "AC", 3000);
</script> |
68dbdff
to
78696d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<ui5-avatar initials="RHB" size="XS"></ui5-avatar>
resolves to:
<ui5-avatar initials="RHB" size="XS" icon="employee"></ui5-avatar>
With this setup icon can't be removed.
Screen.Recording.2023-04-07.at.10.25.47.mov
Screen.Recording.2023-04-07.at.10.39.55.mov
78696d6
to
091575f
Compare
@nnaydenow I experienced the same issue, but it seemed unlogical compared to the new code, so I rebuild and reloaded WC project. Can you, please, try doing that and test again, the issue is not happening on my side. |
Seems like I haven't rebased successfully. Works okey for me. |
091575f
to
9a8355c
Compare
fix(ui5-shellbar): avatar initials display #6642
fix(ui5-shellbar): avatar initials display #6642
fix(ui5-shellbar): avatar initials display #6642
Fixes: #6585
Fixes: #6516