From 9044fe55393c41b0d4aeaa4ecb9a12b3da5b505f Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Sun, 22 Mar 2026 02:45:11 +0100 Subject: [PATCH] feat: add skeleton loading state to channel sidebar --- .../src/components/layout/ChannelSidebar.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/web/src/components/layout/ChannelSidebar.tsx b/packages/web/src/components/layout/ChannelSidebar.tsx index d54eac9d..09e1b6ce 100644 --- a/packages/web/src/components/layout/ChannelSidebar.tsx +++ b/packages/web/src/components/layout/ChannelSidebar.tsx @@ -24,6 +24,7 @@ import { useDragManager, type DropTarget, type LayoutItem } from '../../hooks/us export function ChannelSidebar() { const spaces = useSpaceStore((s) => s.spaces); const currentSpaceId = useSpaceStore((s) => s.currentSpaceId); + const loadingSpaceId = useSpaceStore((s) => s.loadingSpaceId); const channels = useSpaceStore((s) => s.channels); const dmChannels = useSpaceStore((s) => s.dmChannels); const currentChannelId = useChatStore((s) => s.currentChannelId); @@ -86,6 +87,7 @@ export function ChannelSidebar() { const spacePermissions = useSpaceStore((s) => s.spacePermissions); const space = spaces.find(s => s.id === currentSpaceId); const mySpacePerms = currentSpaceId ? spacePermissions.get(currentSpaceId) : undefined; + const isLoadingSpace = !!loadingSpaceId && loadingSpaceId === currentSpaceId; const federationInstances = useInstanceStore((s) => s.instances); const instanceLabel = useMemo(() => { @@ -624,7 +626,29 @@ export function ChannelSidebar() { {/* Channels — dynamic category layout */}