Inbox: responsive fixes for the split layout

- List column yields (34%, floor 280px) instead of holding 420px, so the
  detail pane stays readable in the 980-1200px band.
- Detail pane is a size container: its two-column info grid collapses on
  the pane own width, and long names/emails wrap instead of clipping.
- Tab strip wraps on narrow screens instead of running off-canvas.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/39/head
Talha Ahmed 2026-08-31 15:22:18 +05:00
parent 629554e6f6
commit e7907a194e
2 changed files with 15 additions and 3 deletions

View File

@ -998,6 +998,7 @@ export default function Inbox() {
<div className="card"> <div className="card">
<div style={{ margin: '0 16px', paddingTop: 8 }}> <div style={{ margin: '0 16px', paddingTop: 8 }}>
<Tabs <Tabs
className="tabs tabs-wrap"
value={tab} value={tab}
onChange={(t) => { onChange={(t) => {
setTab(t) setTab(t)

View File

@ -979,7 +979,15 @@ canvas { width: 100%; max-width: 100%; display: block; }
/* Split inbox layout */ /* Split inbox layout */
.split { display: grid; grid-template-columns: 380px 1fr; gap: 0; min-height: 560px; } .split { display: grid; grid-template-columns: 380px 1fr; gap: 0; min-height: 560px; }
.split-list { border-right: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); } .split-list { border-right: 1px solid var(--border); overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); }
.split-detail { overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); } .split-detail { overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 260px); max-height: calc(100dvh - 260px); container-type: inline-size; }
/* The detail pane can be narrow while the viewport is wide (split layout),
so viewport media queries cannot see it: the pane is a size container and
its two-column field grid collapses on the pane's own width. */
@container (max-width: 560px) {
.split-detail .info-grid { grid-template-columns: 1fr; }
.split-detail .profile-hero { flex-wrap: wrap; }
}
.split-detail .ph-name { overflow-wrap: anywhere; }
.inbox-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: .12s; position: relative; } .inbox-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: .12s; position: relative; }
.inbox-item:hover { background: var(--bg-sunken); } .inbox-item:hover { background: var(--bg-sunken); }
.inbox-item.active { background: var(--primary-soft); } .inbox-item.active { background: var(--primary-soft); }
@ -994,8 +1002,11 @@ canvas { width: 100%; max-width: 100%; display: block; }
.ii-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; } .ii-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.ii-time { font-size: 11px; color: var(--text-3); white-space: nowrap; } .ii-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }
/* Inbox sidebar only: fit the list instead of scrolling sideways. /* Inbox sidebar only: fit the list instead of scrolling sideways.
Username (.ii-name) and subject (.ii-pos) are left alone. */ Username (.ii-name) and subject (.ii-pos) are left alone.
.inbox-split { grid-template-columns: minmax(0, 420px) 1fr; } The list column yields (34%, floor 280px) instead of holding a hard 420px,
so the detail pane keeps a readable width in the 980-1200px band where the
split has not collapsed to one column yet. */
.inbox-split { grid-template-columns: minmax(280px, 34%) minmax(0, 1fr); }
.inbox-queue { overflow-x: hidden; min-width: 0; } .inbox-queue { overflow-x: hidden; min-width: 0; }
.inbox-queue .inbox-item { min-width: 0; } .inbox-queue .inbox-item { min-width: 0; }
/* Name + time on row 1, subject on row 2, chips span the full width under /* Name + time on row 1, subject on row 2, chips span the full width under