diff --git a/res/css/views/rooms/_PinnedEventTile.pcss b/res/css/views/rooms/_PinnedEventTile.pcss index b727a5ff5a..c415a4da41 100644 --- a/res/css/views/rooms/_PinnedEventTile.pcss +++ b/res/css/views/rooms/_PinnedEventTile.pcss @@ -26,6 +26,8 @@ limitations under the License. /* Remove avatar width and space between the avatar and the wrapper */ /* We need it to make the location fit */ width: calc(100% - var(--cpd-space-4x) - 32px); + /* Prevent a long sender name to overflow the tile */ + overflow: hidden; .mx_PinnedEventTile_top { display: flex; @@ -37,6 +39,7 @@ limitations under the License. text-overflow: ellipsis; overflow: hidden; white-space: nowrap; + font: var(--cpd-font-body-md-semibold); } } diff --git a/src/components/views/rooms/PinnedEventTile.tsx b/src/components/views/rooms/PinnedEventTile.tsx index 5fb9c07f45..c77cffe776 100644 --- a/src/components/views/rooms/PinnedEventTile.tsx +++ b/src/components/views/rooms/PinnedEventTile.tsx @@ -17,7 +17,7 @@ limitations under the License. import React, { JSX, useCallback, useState } from "react"; import { EventTimeline, EventType, MatrixEvent, Room } from "matrix-js-sdk/src/matrix"; -import { IconButton, Menu, MenuItem, Separator, Text } from "@vector-im/compound-web"; +import { IconButton, Menu, MenuItem, Separator, Tooltip } from "@vector-im/compound-web"; import { Icon as ViewIcon } from "@vector-im/compound-design-tokens/icons/visibility-on.svg"; import { Icon as UnpinIcon } from "@vector-im/compound-design-tokens/icons/unpin.svg"; import { Icon as ForwardIcon } from "@vector-im/compound-design-tokens/icons/forward.svg"; @@ -86,13 +86,11 @@ export function PinnedEventTile({ event, room, permalinkCreator }: PinnedEventTi