feat: enhance chat sidebar functionality and UI

- Updated `LayoutDataProvider` to toggle sidebar states for shared and private chats more efficiently.
- Added new props to `MobileSidebar`, `Sidebar`, and `LayoutShell` to manage the open states of chat panels.
- Improved button interactions in the sidebar to show/hide chat panels with updated tooltip text.
- Enhanced styling for tab triggers in `AllPrivateChatsSidebar` and `AllSharedChatsSidebar` for better user experience.
- Added new localization strings for "show all" and "hide" actions in multiple languages.
This commit is contained in:
Anish Sarkar 2026-03-17 03:55:49 +05:30
parent 54156633ff
commit 651d381bcb
12 changed files with 94 additions and 98 deletions

View file

@ -628,17 +628,25 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
}, [router]);
const handleViewAllSharedChats = useCallback(() => {
setIsAllSharedChatsSidebarOpen(true);
setIsAllPrivateChatsSidebarOpen(false);
setIsInboxSidebarOpen(false);
setIsAnnouncementsSidebarOpen(false);
setIsAllSharedChatsSidebarOpen((prev) => {
if (!prev) {
setIsAllPrivateChatsSidebarOpen(false);
setIsInboxSidebarOpen(false);
setIsAnnouncementsSidebarOpen(false);
}
return !prev;
});
}, []);
const handleViewAllPrivateChats = useCallback(() => {
setIsAllPrivateChatsSidebarOpen(true);
setIsAllSharedChatsSidebarOpen(false);
setIsInboxSidebarOpen(false);
setIsAnnouncementsSidebarOpen(false);
setIsAllPrivateChatsSidebarOpen((prev) => {
if (!prev) {
setIsAllSharedChatsSidebarOpen(false);
setIsInboxSidebarOpen(false);
setIsAnnouncementsSidebarOpen(false);
}
return !prev;
});
}, []);
// Delete handlers