Add missing presence indicator to new room header (#12865)

* Add missing presence indicator to new room header

DecoratedRoomAvatar doesn't match Figma styles so created a composable avatar wrapper

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add oobData to new room header avatar

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Simplify

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Simplify

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-08-06 15:51:25 +01:00 committed by GitHub
parent ca8d63af37
commit dde19f36ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 414 additions and 67 deletions

View file

@ -0,0 +1,49 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`WithPresenceIndicator renders presence indicator with tooltip for DM rooms 1`] = `
<DocumentFragment>
<div
class="mx_WithPresenceIndicator"
>
<span />
<div
aria-describedby="floating-ui-2"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_online"
style="width: 32px; height: 32px;"
tabindex="0"
/>
</div>
</DocumentFragment>
`;
exports[`WithPresenceIndicator renders presence indicator with tooltip for DM rooms 2`] = `
<DocumentFragment>
<div
class="mx_WithPresenceIndicator"
>
<span />
<div
aria-describedby="floating-ui-8"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_offline"
style="width: 32px; height: 32px;"
tabindex="0"
/>
</div>
</DocumentFragment>
`;
exports[`WithPresenceIndicator renders presence indicator with tooltip for DM rooms 3`] = `
<DocumentFragment>
<div
class="mx_WithPresenceIndicator"
>
<span />
<div
aria-describedby="floating-ui-14"
class="mx_WithPresenceIndicator_icon mx_WithPresenceIndicator_icon_away"
style="width: 32px; height: 32px;"
tabindex="0"
/>
</div>
</DocumentFragment>
`;