From 7e2986ca01f85ac54471d24ff5f3bca91a4c10af Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Mon, 9 Mar 2026 14:06:56 +0100 Subject: [PATCH] feat: overhaul remote instance indicators in space sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace truncated text labels with globe pill dividers and add federation badges to remote space icons. Remote spaces now show rich Tooltips with "SpaceName ยท host" instead of native title attrs. Disconnected instances display amber warning indicators throughout. --- .../src/components/layout/SpaceSidebar.tsx | 118 +++++++++++++----- 1 file changed, 85 insertions(+), 33 deletions(-) diff --git a/packages/web/src/components/layout/SpaceSidebar.tsx b/packages/web/src/components/layout/SpaceSidebar.tsx index 5bd2dd6b..ad7be883 100644 --- a/packages/web/src/components/layout/SpaceSidebar.tsx +++ b/packages/web/src/components/layout/SpaceSidebar.tsx @@ -4,6 +4,7 @@ import { useSpaceStore } from '../../stores/spaceStore'; import { useChatStore } from '../../stores/chatStore'; import { useUIStore } from '../../stores/uiStore'; import { useInstanceStore } from '../../stores/instanceStore'; +import { Tooltip } from '../ui/Tooltip'; import { getSpaceGradient, HOME_GRADIENT } from '../../utils/gradients'; @@ -17,9 +18,12 @@ interface SidebarItemProps { actionType?: 'add' | 'join' | 'explore'; hasUnread?: boolean; dimmed?: boolean; + federationBadge?: boolean; + federationDisconnected?: boolean; + tooltipText?: string; } -function SidebarItem({ id, name, icon, active, onClick, type = 'space', actionType, hasUnread, dimmed }: SidebarItemProps) { +function SidebarItem({ id, name, icon, active, onClick, type = 'space', actionType, hasUnread, dimmed, federationBadge, federationDisconnected, tooltipText }: SidebarItemProps) { const [isHovered, setIsHovered] = useState(false); const firstLetter = name.charAt(0).toUpperCase(); @@ -66,6 +70,53 @@ function SidebarItem({ id, name, icon, active, onClick, type = 'space', actionTy return `${base} text-white ${active ? 'rounded-[13px]' : 'rounded-[20px] hover:rounded-[13px]'}`; }; + const buttonContent = ( + + ); + + const innerContent = ( +