From 35b698e55adaedc042e356a9a30accf787c5d784 Mon Sep 17 00:00:00 2001 From: cyph3rasi Date: Wed, 15 Jul 2026 16:37:12 -0700 Subject: [PATCH] Keep mention suggestions beneath the sticky feed header and redesign the global composer with unclipped in-flow suggestions, posting identity, and a refined premium surface Hop-State: A_06FPG91R98C050VWTAKGRKG Hop-Proposal: R_06FPG915QD4SR4VFHHX53D0 Hop-Task: T_06FPG7TG5B2731WFT0VWGW8 Hop-Attempt: AT_06FPG7TG58Z084M8ZE6VEP0 --- src/app/globals.css | 216 +++++++++++++++++++++++--- src/app/page.tsx | 10 +- src/components/GlobalPostComposer.tsx | 47 ++++-- 3 files changed, 228 insertions(+), 45 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 37fc738..26a0050 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -804,7 +804,7 @@ a.btn-primary:visited { .compose-mention-suggestions { position: absolute; - z-index: 40; + z-index: 30; top: calc(100% + 4px); left: 8px; right: 8px; @@ -1079,41 +1079,77 @@ a.btn-primary:visited { z-index: 11000; display: grid; place-items: center; - padding: 24px; - background: rgba(0, 0, 0, 0.72); - backdrop-filter: blur(10px); - -webkit-backdrop-filter: blur(10px); + overflow-y: auto; + padding: 32px 24px; + background: + radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.055), transparent 38%), + rgba(0, 0, 0, 0.78); + backdrop-filter: blur(16px) saturate(0.8); + -webkit-backdrop-filter: blur(16px) saturate(0.8); animation: globalComposeFadeIn 0.16s ease-out; } .global-compose-modal { - width: min(640px, 100%); - max-height: calc(100dvh - 48px); - overflow-y: auto; - border: 1px solid var(--border); - border-radius: 24px; - background: var(--background-secondary); - box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65); + position: relative; + isolation: isolate; + width: min(680px, 100%); + overflow: visible; + border: 1px solid color-mix(in srgb, var(--border-hover) 72%, transparent); + border-radius: 26px; + background: linear-gradient(180deg, #141414 0%, #0d0d0d 100%); + box-shadow: + 0 36px 120px rgba(0, 0, 0, 0.78), + 0 0 0 1px rgba(255, 255, 255, 0.025) inset; animation: globalComposeRiseIn 0.2s ease-out; } +.global-compose-modal::before { + content: ''; + position: absolute; + z-index: -1; + inset: 0 12% auto; + height: 1px; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent); +} + .global-compose-header { - position: sticky; - top: 0; - z-index: 2; display: flex; align-items: center; justify-content: space-between; - padding: 16px 18px; - border-bottom: 1px solid var(--border); - background: color-mix(in srgb, var(--background-secondary) 94%, transparent); - backdrop-filter: blur(14px); + padding: 20px 22px 18px; + border-bottom: 1px solid rgba(255, 255, 255, 0.075); } .global-compose-header h2 { margin: 0; - font-size: 18px; - font-weight: 700; + font-size: 17px; + font-weight: 650; + letter-spacing: -0.01em; +} + +.global-compose-heading { + display: flex; + align-items: center; + gap: 12px; +} + +.global-compose-heading-icon { + display: grid; + place-items: center; + width: 38px; + height: 38px; + flex: 0 0 38px; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + color: var(--foreground); + background: rgba(255, 255, 255, 0.055); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; +} + +.global-compose-heading p { + margin: 2px 0 0; + color: var(--foreground-tertiary); + font-size: 12px; } .global-compose-close { @@ -1126,13 +1162,117 @@ a.btn-primary:visited { border: 0; border-radius: 50%; color: var(--foreground-secondary); - background: transparent; + border: 1px solid transparent; + background: rgba(255, 255, 255, 0.025); cursor: pointer; } .global-compose-close:hover { color: var(--foreground); + border-color: var(--border); + background: rgba(255, 255, 255, 0.07); +} + +.global-compose-identity { + display: flex; + align-items: center; + gap: 11px; + padding: 20px 24px 0; +} + +.global-compose-avatar { + width: 42px; + height: 42px; + flex: 0 0 42px; + overflow: hidden; + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 50%; background: var(--background-tertiary); + box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.025); +} + +.global-compose-avatar img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.global-compose-identity-copy { + min-width: 0; + display: flex; + flex: 1; + flex-direction: column; +} + +.global-compose-identity-copy > span { + overflow: hidden; + font-size: 14px; + font-weight: 650; + text-overflow: ellipsis; + white-space: nowrap; +} + +.global-compose-identity-copy small { + overflow: hidden; + color: var(--foreground-tertiary); + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.global-compose-audience { + padding: 5px 9px; + border: 1px solid var(--border); + border-radius: 999px; + color: var(--foreground-secondary); + font-size: 11px; + font-weight: 600; + letter-spacing: 0.02em; + background: rgba(255, 255, 255, 0.025); +} + +.global-compose-modal .compose { + padding: 8px 24px 22px; + border-bottom: 0; +} + +.global-compose-modal .compose-mention-field { + border: 1px solid rgba(255, 255, 255, 0.09); + border-radius: 17px; + background: rgba(0, 0, 0, 0.22); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset; +} + +.global-compose-modal .compose-input { + min-height: 142px; + padding: 18px; + font-size: 18px; + line-height: 1.5; +} + +.global-compose-modal .compose-mention-suggestions { + position: relative; + inset: auto; + z-index: 1; + max-height: min(272px, 36dvh); + margin: -4px 10px 10px; + border-color: rgba(255, 255, 255, 0.1); + border-radius: 13px; + background: #101010; + box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5); +} + +.global-compose-modal .compose-footer { + margin-top: 18px; + padding-top: 17px; + border-top: 1px solid rgba(255, 255, 255, 0.07); +} + +.global-compose-modal .compose-actions .btn-primary { + min-width: 88px; + padding: 9px 20px; + border-radius: 999px; + font-weight: 650; } @keyframes globalComposeFadeIn { @@ -1154,14 +1294,42 @@ a.btn-primary:visited { .global-compose-overlay { align-items: end; - padding: 12px; + padding: 12px 10px max(12px, env(safe-area-inset-bottom)); } .global-compose-modal { width: 100%; - max-height: calc(100dvh - 24px); border-radius: 22px; } + + .global-compose-header { + padding: 16px 16px 14px; + } + + .global-compose-identity { + padding: 16px 18px 0; + } + + .global-compose-modal .compose { + padding: 6px 18px 18px; + } + + .global-compose-modal .compose-input { + min-height: 116px; + font-size: 17px; + } +} + +/* Keep feed autocomplete beneath the sticky navigation as the page scrolls. */ +.home-feed-header { + position: sticky; + top: 0; + z-index: 50; + padding: 16px; + border-bottom: 1px solid var(--border); + background: rgba(10, 10, 10, 0.94); + backdrop-filter: blur(14px); + -webkit-backdrop-filter: blur(14px); } /* Feed toggle + meta */ diff --git a/src/app/page.tsx b/src/app/page.tsx index 6963202..5291dad 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -220,15 +220,7 @@ export default function Home() { return ( <> -
+

Home

diff --git a/src/components/GlobalPostComposer.tsx b/src/components/GlobalPostComposer.tsx index 45c2861..f464dbc 100644 --- a/src/components/GlobalPostComposer.tsx +++ b/src/components/GlobalPostComposer.tsx @@ -1,8 +1,9 @@ 'use client'; import { useEffect, useState } from 'react'; -import { Plus, X } from 'lucide-react'; +import { PenLine, Plus, X } from 'lucide-react'; import { Compose } from '@/components/Compose'; +import { AvatarImage } from '@/components/AvatarImage'; import { signedAPI } from '@/lib/api/signed-fetch'; import { useAuth } from '@/lib/contexts/AuthContext'; import { useToast } from '@/lib/contexts/ToastContext'; @@ -10,7 +11,8 @@ import { useToast } from '@/lib/contexts/ToastContext'; export function GlobalPostComposer() { const { user, did, handle } = useAuth(); const { showToast } = useToast(); - const [open, setOpen] = useState(false); + const [openForUserId, setOpenForUserId] = useState(null); + const open = Boolean(user && openForUserId === user.id); useEffect(() => { if (!open) return; @@ -19,7 +21,7 @@ export function GlobalPostComposer() { document.body.style.overflow = 'hidden'; const handleKeyDown = (event: KeyboardEvent) => { - if (event.key === 'Escape') setOpen(false); + if (event.key === 'Escape') setOpenForUserId(null); }; window.addEventListener('keydown', handleKeyDown); @@ -29,10 +31,6 @@ export function GlobalPostComposer() { }; }, [open]); - useEffect(() => { - if (!user) setOpen(false); - }, [user]); - if (!user) return null; const handlePost = async ( @@ -78,7 +76,7 @@ export function GlobalPostComposer() {
+
+ + + +
+ {user.displayName || user.handle} + @{user.handle} +
+ Public +
{ - setOpen(false); + setOpenForUserId(null); showToast('Post published.', 'success'); }} />