Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix avatar defects (#11473)
Browse files Browse the repository at this point in the history
* Fix avatar initial centering in pills for bubbles

* Express user info avatar size in pixes

* fix link pill icon

* Fix snapshot test
  • Loading branch information
Germain authored Aug 29, 2023
1 parent 133e973 commit 968213a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions res/css/views/elements/_Pill.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ limitations under the License.
height: 16px;
padding: 1px;
width: 16px;
border-radius: 50%;
}

.mx_Pill_UserIcon {
Expand Down
5 changes: 0 additions & 5 deletions res/css/views/rooms/_EventBubbleTile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,6 @@ limitations under the License.
}
}

.mx_BaseAvatar,
.mx_EventTile_avatar {
line-height: 1;
}

&[data-has-reply="true"] {
> .mx_EventTile_line {
flex-direction: column;
Expand Down
3 changes: 2 additions & 1 deletion src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
import { DirectoryMember, startDmOnFirstMessage } from "../../../utils/direct-messages";
import { SdkContextClass } from "../../../contexts/SDKContext";
import { asyncSome } from "../../../utils/arrays";
import UIStore from "../../../stores/UIStore";

export interface IDevice extends Device {
ambiguous?: boolean;
Expand Down Expand Up @@ -1578,7 +1579,7 @@ export const UserInfoHeader: React.FC<{
<MemberAvatar
key={member.userId} // to instantly blank the avatar when UserInfo changes members
member={member as RoomMember}
size="30vh" // 2x@30vh
size={UIStore.instance.windowHeight * 0.3 + "px"}
resizeMethod="scale"
fallbackUserId={member.userId}
onClick={onMemberAvatarClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ exports[`<UserInfo /> with crypto enabled renders <BasicUserInfo /> 1`] = `
data-testid="avatar-img"
data-type="round"
role="button"
style="--cpd-avatar-size: 30vh;"
style="--cpd-avatar-size: 230.39999999999998px;"
>
u
</button>
Expand Down

0 comments on commit 968213a

Please sign in to comment.