From 87e3d346388630c61c8686a2c6eecc615e41cfdb Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:48:11 +0100 Subject: [PATCH] feat: unified glass material system for all floating surfaces Add .glass-modal CSS class (0.82 opacity) for dialogs and apply consistent glass tiers across all floating UI: modals, context menus, tooltips, popovers, and call cards. Replaces ad-hoc bg-surface-elevated and inline styles with the documented 5-tier glass hierarchy. --- CLAUDE.md | 17 ++++ .../src/components/chat/MentionPopover.tsx | 2 +- .../src/components/layout/SpaceSidebar.tsx | 38 ++++++--- .../spaceSettingsPanels/MembersPanel.tsx | 28 ++++++- .../web/src/components/ui/ConfirmDialog.tsx | 80 +++++++++++++++++++ .../web/src/components/ui/ContextMenu.tsx | 2 +- packages/web/src/components/ui/Modal.tsx | 4 +- packages/web/src/components/ui/Tooltip.tsx | 2 +- .../src/components/ui/UserProfilePopout.tsx | 14 +--- .../components/voice/IncomingCallModal.tsx | 4 +- .../components/voice/VoiceUserContextMenu.tsx | 4 +- packages/web/src/styles/globals.css | 29 +++++++ 12 files changed, 190 insertions(+), 34 deletions(-) create mode 100644 packages/web/src/components/ui/ConfirmDialog.tsx diff --git a/CLAUDE.md b/CLAUDE.md index 4dd47ed8..94ae0023 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,6 +19,23 @@ Backspace has its own visual identity — it is NOT a Discord clone. The design When making UI changes, consult the prototype for colors, spacing, materials, and hierarchy. The frontend should converge toward this design. +### Surface Material Tiers + +Every surface in Backspace falls into one of these tiers: + +| Tier | Class | When to Use | +|------|-------|-------------| +| Structural | `bg-surface-*` | Permanent layout (sidebars, chat area, member list) | +| Strip | `.glass-strip` | Persistent edge chrome (space sidebar) | +| Bubble | `.glass-bubble` | Persistent floating controls (voice bar, input pill, sticky actions) | +| Popover | `.glass` | Small floating surfaces (context menus, popovers, autocomplete, tooltips) | +| Modal | `.glass-modal` | Large center-screen dialogs with backdrop scrim | +| Pill | `.glass-pill` | Tiny inline decorations (reactions, tags) | + +**Rule:** If it floats above the content plane, it's glass. Never use `bg-surface-elevated` for floating/overlay elements — that's for static structural panels only. + +**Modal backdrops** use `bg-black/50` — light enough for the glass card's blur to show through. + ## MISSION Maintain and extend Backspace as a complete, production-quality application. The core application is fully built and deployed. Every change must uphold the same standard: no stubs, no TODOs, no shortcuts. A user must always be able to `docker compose up` and have a fully working chat platform. diff --git a/packages/web/src/components/chat/MentionPopover.tsx b/packages/web/src/components/chat/MentionPopover.tsx index eae27b68..592ebfcd 100644 --- a/packages/web/src/components/chat/MentionPopover.tsx +++ b/packages/web/src/components/chat/MentionPopover.tsx @@ -58,7 +58,7 @@ export function MentionPopover({ query, selectedIndex, onSelect, anchorRef }: Me return createPortal(