-
Notifications
You must be signed in to change notification settings - Fork 290
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
feat: Show placeholder message header for unavailable users #14928
Conversation
f92568f
to
f15b4a9
Compare
{sender.isExternal() && ( | ||
<span | ||
className="message-header-icon-external with-tooltip with-tooltip--external" | ||
data-tooltip={t('rolePartner')} | ||
data-uie-name="sender-external" | ||
> | ||
<Icon.External /> | ||
</span> | ||
)} | ||
|
||
{sender.isFederated && ( | ||
<span | ||
className="message-header-icon-guest with-tooltip with-tooltip--external" | ||
data-tooltip={sender.handle} | ||
data-uie-name="sender-federated" | ||
> | ||
<Icon.Federation /> | ||
</span> | ||
)} | ||
|
||
{sender.isDirectGuest() && ( | ||
<span | ||
className="message-header-icon-guest with-tooltip with-tooltip--external" | ||
data-tooltip={t('conversationGuestIndicator')} | ||
data-uie-name="sender-guest" | ||
> | ||
<Icon.Guest /> | ||
</span> | ||
)} | ||
</> |
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.
seems like these could all be combined into one function that returned the correct values from an object with a key that is equivalent to the sender?
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.
something similar has been done here #14883 but not merged to dev yet. I think the idea is to come back and see if we can use the same reusable component later
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.
Yes, my plan is to use this one once it's merged. I'll have to identify if the contraints are really the same and go for it :)
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.
even #14883 seems a bit less DRY than id expect. the span component is duplicated several times.
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.
anyway thats fine then.
417bb8c
to
c994fed
Compare
Codecov Report
@@ Coverage Diff @@
## dev #14928 +/- ##
==========================================
+ Coverage 42.94% 42.98% +0.04%
==========================================
Files 626 627 +1
Lines 21320 21335 +15
Branches 4897 4908 +11
==========================================
+ Hits 9155 9170 +15
Misses 10998 10998
Partials 1167 1167 |
Will show a placeholder header when a user's metadata could not be fetched due to some federated backend being offline