From c57508de7bcc1d7deeffe1f7e8b037d38a0ea925 Mon Sep 17 00:00:00 2001 From: AyushKumar123456789 Date: Sun, 2 Mar 2025 19:38:38 +0000 Subject: [PATCH 1/2] FIX : Sidebar RoomMenuaction remains visible after sidebar collapse --- .changeset/strong-foxes-lie.md | 5 +++++ apps/meteor/client/sidebar/RoomMenu.tsx | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .changeset/strong-foxes-lie.md diff --git a/.changeset/strong-foxes-lie.md b/.changeset/strong-foxes-lie.md new file mode 100644 index 0000000000000..f72656b122061 --- /dev/null +++ b/.changeset/strong-foxes-lie.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue where the RoomMenuaction inside the sidebar remains visible after the sidebar is collapse. diff --git a/apps/meteor/client/sidebar/RoomMenu.tsx b/apps/meteor/client/sidebar/RoomMenu.tsx index 508753263954a..ea0bacccfef40 100644 --- a/apps/meteor/client/sidebar/RoomMenu.tsx +++ b/apps/meteor/client/sidebar/RoomMenu.tsx @@ -1,6 +1,6 @@ import type { RoomType } from '@rocket.chat/core-typings'; import { GenericMenu } from '@rocket.chat/ui-client'; -import { useTranslation } from '@rocket.chat/ui-contexts'; +import { useLayout, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import { memo } from 'react'; @@ -30,11 +30,21 @@ const RoomMenu = ({ hideDefaultOptions = false, }: RoomMenuProps): ReactElement | null => { const t = useTranslation(); - + const { sidebar } = useLayout(); const isUnread = alert || unread || threadUnread; const sections = useRoomMenuActions({ rid, type, name, isUnread, cl, roomOpen, hideDefaultOptions }); - return ; + return ( + + ); }; export default memo(RoomMenu); From d649a19ec1df5b0b35b3e2f0f7bb047295808ea7 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Thu, 6 Mar 2025 10:35:48 -0300 Subject: [PATCH 2/2] chore: update changeset --- .changeset/strong-foxes-lie.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/strong-foxes-lie.md b/.changeset/strong-foxes-lie.md index f72656b122061..6ecad643ae3f7 100644 --- a/.changeset/strong-foxes-lie.md +++ b/.changeset/strong-foxes-lie.md @@ -2,4 +2,4 @@ '@rocket.chat/meteor': patch --- -Fixes an issue where the RoomMenuaction inside the sidebar remains visible after the sidebar is collapse. +Fixes an issue where the room menu inside the sidebar item remains visible when the sidebar is collapsed