From 88346d87d49202dcb955e0fe314d24d0dab1d8ea Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 20 Sep 2023 13:28:11 +0100 Subject: [PATCH] Render space pills with square corners to match new avatar --- res/css/views/elements/_Pill.pcss | 6 ++++++ src/components/views/elements/Pill.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/res/css/views/elements/_Pill.pcss b/res/css/views/elements/_Pill.pcss index f7d5c8fa60a..c697b63de50 100644 --- a/res/css/views/elements/_Pill.pcss +++ b/res/css/views/elements/_Pill.pcss @@ -89,4 +89,10 @@ limitations under the License. height: 16px; width: 16px; } + + &.mx_SpacePill { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; + padding-left: 4px; + } } diff --git a/src/components/views/elements/Pill.tsx b/src/components/views/elements/Pill.tsx index 5770145b788..e95d39364ad 100644 --- a/src/components/views/elements/Pill.tsx +++ b/src/components/views/elements/Pill.tsx @@ -103,7 +103,7 @@ export const Pill: React.FC = ({ type: propType, url, inMessage, room const classes = classNames("mx_Pill", { mx_AtRoomPill: type === PillType.AtRoomMention, mx_RoomPill: type === PillType.RoomMention, - mx_SpacePill: type === "space", + mx_SpacePill: type === "space" || targetRoom?.isSpaceRoom(), mx_UserPill: type === PillType.UserMention, mx_UserPill_me: resourceId === MatrixClientPeg.safeGet().getUserId(), mx_EventPill: type === PillType.EventInOtherRoom || type === PillType.EventInSameRoom,