Fixes read receipt avatar offset (#11483)

* Fixes read receipt avatar offset

Fixes https://github.com/vector-im/element-web/issues/26059

* Fix avatar collapsing in thread list

Fixes https://github.com/vector-im/element-web/issues/26064

* Make composer pills use new avatar design

Fixes https://github.com/vector-im/element-web/issues/26067

* Update snapshots

* Update UserInfo snapshot

* Update HTMLExport snapshot

* Fixes avatar placeholder font

Fixes https://github.com/vector-im/element-web/issues/26061
This commit is contained in:
Germain 2023-08-30 12:47:35 +01:00 committed by GitHub
parent 6cc42b7e2e
commit 6aa86a858f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 132 additions and 20 deletions

View file

@ -24,6 +24,7 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
data-type="round"
role="presentation"
style="--cpd-avatar-size: 24px;"
title=""
>
u
</span>
@ -106,6 +107,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
data-type="round"
role="presentation"
style="--cpd-avatar-size: 24px;"
title=""
>
u
</span>
@ -185,6 +187,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
data-type="round"
role="button"
style="--cpd-avatar-size: 52px;"
title=""
>
u
</button>
@ -273,6 +276,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
data-type="round"
role="presentation"
style="--cpd-avatar-size: 24px;"
title=""
>
u
</span>
@ -352,6 +356,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
data-type="round"
role="button"
style="--cpd-avatar-size: 52px;"
title=""
>
u
</button>
@ -515,6 +520,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
data-type="round"
role="presentation"
style="--cpd-avatar-size: 24px;"
title=""
>
u
</span>
@ -593,6 +599,7 @@ exports[`RoomView for a local room in state NEW that is encrypted should match t
data-type="round"
role="button"
style="--cpd-avatar-size: 52px;"
title=""
>
u
</button>

View file

@ -77,6 +77,7 @@ exports[`SpaceHierarchy <SpaceHierarchy /> renders 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 20px;"
title=""
>
U
</span>
@ -147,6 +148,7 @@ exports[`SpaceHierarchy <SpaceHierarchy /> renders 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 20px;"
title=""
>
U
</span>
@ -218,6 +220,7 @@ exports[`SpaceHierarchy <SpaceHierarchy /> renders 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 20px;"
title=""
>
N
</span>
@ -295,6 +298,7 @@ exports[`SpaceHierarchy <SpaceHierarchy /> renders 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 20px;"
title=""
>
N
</span>

View file

@ -24,6 +24,7 @@ exports[`<UserMenu> when rendered should render as expected 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
u
</span>

View file

@ -9,6 +9,7 @@ exports[`RoomAvatar should render as expected for a DM room 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
D
</span>
@ -24,6 +25,7 @@ exports[`RoomAvatar should render as expected for a LocalRoom 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
l
</span>
@ -39,6 +41,7 @@ exports[`RoomAvatar should render as expected for a Room 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
t
</span>

View file

@ -38,6 +38,7 @@ exports[`<DialogSidebar /> renders sidebar correctly with beacons 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
</span>

View file

@ -77,6 +77,7 @@ exports[`<ManageRestrictedJoinRuleDialog /> should list spaces which are not par
data-type="round"
role="presentation"
style="--cpd-avatar-size: 20px;"
title=""
>
O
</span>

View file

@ -109,6 +109,7 @@ exports[`AppTile for a pinned widget should render 1`] = `
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 20px;"
title=""
>
<img
alt=""
@ -197,6 +198,7 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 20px;"
title=""
>
<img
alt=""
@ -277,6 +279,7 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 38px;"
title=""
>
u
</span>
@ -352,6 +355,7 @@ exports[`AppTile preserves non-persisted widget on container move 1`] = `
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 20px;"
title=""
>
<img
alt=""

View file

@ -17,6 +17,7 @@ exports[`<FacePile /> renders with a tooltip 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
4
</span>

View file

@ -41,6 +41,7 @@ exports[`<Pill> should render the expected pill for @room 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
R
</span>
@ -72,6 +73,7 @@ exports[`<Pill> should render the expected pill for a known user not in the room
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
U
</span>
@ -103,6 +105,7 @@ exports[`<Pill> should render the expected pill for a message in another room 1`
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
R
</span>
@ -134,6 +137,7 @@ exports[`<Pill> should render the expected pill for a message in the same room 1
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
U
</span>
@ -165,6 +169,7 @@ exports[`<Pill> should render the expected pill for a room alias 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
R
</span>
@ -196,6 +201,7 @@ exports[`<Pill> should render the expected pill for a space 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
S
</span>
@ -250,6 +256,7 @@ exports[`<Pill> when rendering a pill for a room should render the expected pill
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
R
</span>
@ -281,6 +288,7 @@ exports[`<Pill> when rendering a pill for a user in the room should render as ex
data-type="round"
role="presentation"
style="--cpd-avatar-size: 16px;"
title=""
>
U
</span>

View file

@ -199,7 +199,7 @@ describe("<TextualBody />", () => {
const { container } = getComponent({ mxEvent: ev });
const content = container.querySelector(".mx_EventTile_body");
expect(content.innerHTML).toMatchInlineSnapshot(
`"Chat with <span><bdi><a class="mx_Pill mx_UserPill mx_UserPill_me" href="https://matrix.to/#/@user:example.com" aria-describedby="mx_Pill_0.123456"><span aria-label="Profile picture" aria-hidden="true" data-testid="avatar-img" data-type="round" data-color="8" class="_avatar_2lhia_17 mx_BaseAvatar" style="--cpd-avatar-size: 16px;"><img loading="lazy" alt="" src="mxc://avatar.url/image.png" crossorigin="anonymous" referrerpolicy="no-referrer" class="_image_2lhia_45" data-type="round" width="16px" height="16px" title="@member:domain.bla"></span><span class="mx_Pill_text">Member</span></a></bdi></span>"`,
`"Chat with <span><bdi><a class="mx_Pill mx_UserPill mx_UserPill_me" href="https://matrix.to/#/@user:example.com" aria-describedby="mx_Pill_0.123456"><span title="" aria-label="Profile picture" aria-hidden="true" data-testid="avatar-img" data-type="round" data-color="8" class="_avatar_2lhia_17 mx_BaseAvatar" style="--cpd-avatar-size: 16px;"><img loading="lazy" alt="" src="mxc://avatar.url/image.png" crossorigin="anonymous" referrerpolicy="no-referrer" class="_image_2lhia_45" data-type="round" width="16px" height="16px" title="@member:domain.bla"></span><span class="mx_Pill_text">Member</span></a></bdi></span>"`,
);
});

View file

@ -62,6 +62,7 @@ exports[`<TextualBody /> renders formatted m.text correctly pills appear for an
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 16px;"
title=""
>
<img
alt=""
@ -112,6 +113,7 @@ exports[`<TextualBody /> renders formatted m.text correctly pills appear for eve
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 16px;"
title=""
>
<img
alt=""
@ -164,6 +166,7 @@ exports[`<TextualBody /> renders formatted m.text correctly pills appear for roo
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 16px;"
title=""
>
<img
alt=""
@ -275,6 +278,7 @@ exports[`<TextualBody /> renders formatted m.text correctly pills get injected c
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 16px;"
title=""
>
<img
alt=""
@ -309,6 +313,7 @@ exports[`<TextualBody /> renders plain-text m.text correctly should pillify a pe
href="https://matrix.to/#/!room1:example.com/%event_id%"
aria-describedby="mx_Pill_0.123456"
><span
title=""
aria-label="Profile picture"
aria-hidden="true"
data-testid="avatar-img"
@ -343,6 +348,7 @@ exports[`<TextualBody /> renders plain-text m.text correctly should pillify a pe
href="https://matrix.to/#/!room2:example.com/%event_id%"
aria-describedby="mx_Pill_0.123456"
><span
title=""
aria-label="Avatar"
aria-hidden="true"
data-testid="avatar-img"

View file

@ -26,6 +26,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 54px;"
title=""
>
!
</span>

View file

@ -102,6 +102,7 @@ exports[`<UserInfo /> with crypto enabled renders <BasicUserInfo /> 1`] = `
data-type="round"
role="button"
style="--cpd-avatar-size: 230.39999999999998px;"
title=""
>
u
</button>

View file

@ -12,6 +12,7 @@ exports[`<PinnedEventTile /> should render pinned event 1`] = `
data-type="round"
role="presentation"
style="--cpd-avatar-size: 24px;"
title=""
>
a
</span>

View file

@ -29,6 +29,7 @@ exports[`<RoomPreviewBar /> message case AskToJoin renders the corresponding mes
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
R
</span>
@ -54,6 +55,7 @@ exports[`<RoomPreviewBar /> message case AskToJoin renders the corresponding mes
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
?
</span>
@ -220,6 +222,7 @@ exports[`<RoomPreviewBar /> with an invite with an invited email when client has
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
R
</span>
@ -278,6 +281,7 @@ exports[`<RoomPreviewBar /> with an invite without an invited email for a dm roo
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
R
</span>
@ -343,6 +347,7 @@ exports[`<RoomPreviewBar /> with an invite without an invited email for a non-dm
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
title=""
>
R
</span>

View file

@ -20,6 +20,7 @@ exports[`RoomTile when message previews are enabled and there is a message in a
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
!
</span>
@ -94,6 +95,7 @@ exports[`RoomTile when message previews are enabled and there is a message in th
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
!
</span>
@ -168,6 +170,7 @@ exports[`RoomTile when message previews are enabled should render a room without
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
!
</span>
@ -230,6 +233,7 @@ exports[`RoomTile when message previews are not enabled should render the room 1
data-type="round"
role="presentation"
style="--cpd-avatar-size: 32px;"
title=""
>
!
</span>

View file

@ -31,6 +31,7 @@ exports[`<AddExistingToSpaceDialog /> looks as expected 1`] = `
data-testid="avatar-img"
data-type="square"
style="--cpd-avatar-size: 40px;"
title=""
>
<img
alt=""