From 13573f4b3f562d785a498af162a181267150133e Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sat, 7 Oct 2023 20:21:35 +1100 Subject: [PATCH] Fix space mention (#1439) * open space on space mention click * fix styles * fix message options sticks * revert last changes --- src/app/organisms/room/RoomTimeline.tsx | 10 ++++++++-- src/app/organisms/room/RoomViewTyping.css.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/organisms/room/RoomTimeline.tsx b/src/app/organisms/room/RoomTimeline.tsx index b3902d8..c41bfbb 100644 --- a/src/app/organisms/room/RoomTimeline.tsx +++ b/src/app/organisms/room/RoomTimeline.tsx @@ -86,7 +86,12 @@ import { } from '../../utils/room'; import { useSetting } from '../../state/hooks/settings'; import { settingsAtom } from '../../state/settings'; -import { openJoinAlias, openProfileViewer, selectRoom } from '../../../client/action/navigation'; +import { + openJoinAlias, + openProfileViewer, + selectRoom, + selectSpace, +} from '../../../client/action/navigation'; import { useForceUpdate } from '../../hooks/useForceUpdate'; import { parseGeoUri, scaleYDimension } from '../../utils/common'; import { useMatrixEventRenderer } from '../../hooks/useMatrixEventRenderer'; @@ -536,7 +541,8 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli return; } if (isRoomId(mentionId) && mx.getRoom(mentionId)) { - selectRoom(mentionId); + if (mx.getRoom(mentionId)?.isSpaceRoom()) selectSpace(mentionId); + else selectRoom(mentionId); return; } openJoinAlias(mentionId); diff --git a/src/app/organisms/room/RoomViewTyping.css.ts b/src/app/organisms/room/RoomViewTyping.css.ts index 9def1ae..5c90a17 100644 --- a/src/app/organisms/room/RoomViewTyping.css.ts +++ b/src/app/organisms/room/RoomViewTyping.css.ts @@ -13,7 +13,7 @@ const SlideUpAnime = keyframes({ export const RoomViewTyping = style([ DefaultReset, { - padding: `${config.space.S100} ${config.space.S500}`, + padding: `0 ${config.space.S500}`, width: '100%', backgroundColor: color.Surface.Container, color: color.Surface.OnContainer,