From fd97b76fbb651e8a79cdbc0d02e39e70be199206 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 20 May 2026 23:36:14 -0700 Subject: [PATCH] Make feed surfaces transparent --- src/components/ArcBackground.tsx | 6 ++++-- src/components/Feed.tsx | 7 ++++--- src/components/SubHeaderBar.tsx | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/ArcBackground.tsx b/src/components/ArcBackground.tsx index bccb7f70..9746382b 100644 --- a/src/components/ArcBackground.tsx +++ b/src/components/ArcBackground.tsx @@ -33,6 +33,8 @@ interface ArcBackgroundProps { variant: 'down' | 'up' | 'rect'; /** Extra classes on the element. */ className?: string; + /** Extra classes on the filled background path. */ + fillClassName?: string; } /** @@ -40,7 +42,7 @@ interface ArcBackgroundProps { * MobileBottomNav. Draws a semi-transparent filled shape (rectangle + optional * curved arc) as a single path so there are no sub-pixel seams between layers. */ -export function ArcBackground({ variant, className }: ArcBackgroundProps) { +export function ArcBackground({ variant, className, fillClassName }: ArcBackgroundProps) { const path = variant === 'down' ? ARC_DOWN_PATH : variant === 'up' ? ARC_UP_PATH : RECT_PATH; const hasArc = variant !== 'rect'; @@ -57,7 +59,7 @@ export function ArcBackground({ variant, className }: ArcBackgroundProps) { preserveAspectRatio="none" style={hasArc ? (variant === 'up' ? arcUpHeightStyle : arcDownHeightStyle) : fullHeightStyle} > - + {variant === 'down' && } {variant === 'up' && } diff --git a/src/components/Feed.tsx b/src/components/Feed.tsx index 4ec67ca1..528d9e38 100644 --- a/src/components/Feed.tsx +++ b/src/components/Feed.tsx @@ -271,8 +271,9 @@ export function Feed({ kinds, tagFilters, header, hideCompose, emptyMessage, fee const showSavedFeedTabs = user && !isKindSpecificPage && !tagFilters; const useGlobeBackdrop = feedId === 'home' && !kinds && !tagFilters && !header; const translucentCardClassName = useGlobeBackdrop - ? 'bg-background/70 border-border/50 hover:bg-background/80' + ? 'bg-transparent border-border/50 hover:bg-transparent' : undefined; + const transparentFeedSurfaceClassName = useGlobeBackdrop ? 'bg-transparent' : undefined; return (
@@ -286,11 +287,11 @@ export function Feed({ kinds, tagFilters, header, hideCompose, emptyMessage, fee setAuthDialogOpen(true)} /> )} - {!hideCompose && } + {!hideCompose && } {/* Tabs (logged in) */} {user && ( - + handleSetActiveTab('follows')} /> {!isKindSpecificPage && !tagFilters && ( handleSetActiveTab('network')} /> diff --git a/src/components/SubHeaderBar.tsx b/src/components/SubHeaderBar.tsx index 963c7bee..57444602 100644 --- a/src/components/SubHeaderBar.tsx +++ b/src/components/SubHeaderBar.tsx @@ -16,6 +16,8 @@ interface SubHeaderBarProps { className?: string; /** Extra classes on the inner flex container holding the tabs. */ innerClassName?: string; + /** Extra classes on the SVG background fill. */ + backgroundFillClassName?: string; /** Replace the decorative arc with a plain rectangle. */ noArc?: boolean; /** Keep the bar visible when the mobile top bar hides (slides to top-0 instead of off-screen). */ @@ -30,7 +32,7 @@ interface SubHeaderBarProps { * Used by all tab bars (Feed, Search, Notifications, etc.) and the MobileTopBar * fallback arc. */ -export function SubHeaderBar({ children, className, innerClassName, noArc: _noArc, pinned }: SubHeaderBarProps) { +export function SubHeaderBar({ children, className, innerClassName, backgroundFillClassName, noArc: _noArc, pinned }: SubHeaderBarProps) { const [hover, setHover] = useState(null); const [active, setActive] = useState(null); const navHidden = useNavHidden(); @@ -127,7 +129,7 @@ export function SubHeaderBar({ children, className, innerClassName, noArc: _noAr )} {/* Inner wrapper holds the ArcBackground and tab content. */}
- + {/* Per-tab hover highlight: a flat-bottomed slab clipped to the hovered tab's x-slice */} {hover && (