feat(ui): email dashboard UX refactor — split-view, row polish, dashboard (PHASES 1/3/4)
Batch of 4 parallel units, rebased onto current develop and integrated: - PHASE 1 split-view: clicking an email opens an in-place, collapsible + resizable reading pane (shared EmailDetail extracted from Senders) instead of a new tab; list stays interactive, selection preserved, mobile stacks (<768px); list gains Skeleton loading + EmptyState. (FolderView, SearchResults, +EmailDetail, +split.css) - PHASE 3 row polish: EmailRow gains onOpen (Gmail fallback kept), a new accessible Checkbox primitive (ui/checkbox.jsx), 44px rows, clearer hierarchy + hover; keeps the search why-matched highlight rendering. (EmailRow, ui/checkbox, styles.css) - PHASE 4 bulk+keys: BulkToolbar hierarchy/responsive/clear-selection; keyboard nav adds ArrowUp/Down + u=unread, hardened input guard. (BulkToolbar, useListKeyboardNav) - PHASE 3/4 dashboard: remove dead HeatmapWidget, replace CategoryHeatmap with a clickable Emails-by-Category bar (a11y: rank by text+count, not colour); Skeleton + EmptyState on widgets. (widgets, Dashboard, client.js, styles.css) Each unit was self-code-reviewed and built green; integrated build passes. Supersedes PRs #40-43 (their branches had a stale 38-commit base). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
/* ── Split-view reading pane ────────────────────────────────────────────────
|
||||
* Owned by Unit 1. Gmail/Outlook-style master-detail: the email list stays on
|
||||
* the left, a collapsible + horizontally resizable reading pane sits on the
|
||||
* right. Below 768px the pane overlays the list (mobile stack) instead of
|
||||
* squishing the columns side-by-side.
|
||||
*
|
||||
* These pages (.folder-view) are styled from styles.css, so we reference its
|
||||
* legacy CSS variables (--panel, --panel-2, --text, --muted, --accent) with
|
||||
* hardcoded hex fallbacks. The modern index.css tokens are stored as raw HSL
|
||||
* channel triplets and only work via hsl(var(--x)), so they are NOT used bare
|
||||
* here.
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
.sv-split {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Left column — the list. Flexes to fill remaining space and scrolls itself. */
|
||||
.sv-list-pane {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Right column — the reading pane. Resizable via the native handle; the width
|
||||
* gives it a sensible default, and the user can drag the bottom-right corner.
|
||||
* `resize: horizontal` needs `overflow` other than visible. */
|
||||
.sv-reading-pane {
|
||||
flex: 0 0 auto;
|
||||
width: clamp(320px, 42%, 640px);
|
||||
min-width: 300px;
|
||||
max-width: 80vw;
|
||||
border-left: 1px solid var(--panel-2, #222a3d);
|
||||
overflow: auto;
|
||||
resize: horizontal;
|
||||
background: var(--panel, #1a2030);
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
/* ── Reading pane inner content ─────────────────────────────────────────── */
|
||||
.sv-detail { padding: 18px 20px; }
|
||||
|
||||
.sv-detail-topbar {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.sv-close {
|
||||
background: transparent;
|
||||
border: 1px solid var(--panel-2, #222a3d);
|
||||
color: var(--muted, #8b93a7);
|
||||
border-radius: 6px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sv-close:hover {
|
||||
background: var(--panel-2, #222a3d);
|
||||
color: var(--text, #e6e9f0);
|
||||
}
|
||||
|
||||
.sv-detail-header { margin-bottom: 14px; }
|
||||
.sv-detail-subject {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 6px;
|
||||
color: var(--text, #e6e9f0);
|
||||
word-break: break-word;
|
||||
}
|
||||
.sv-detail-meta {
|
||||
font-size: 12px;
|
||||
color: var(--muted, #8b93a7);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
.sv-detail-sep { opacity: 0.4; }
|
||||
|
||||
.sv-ai-summary { margin-bottom: 14px; }
|
||||
.sv-ai-summary-text {
|
||||
background: var(--panel-2, #222a3d);
|
||||
border: 1px solid var(--panel-2, #222a3d);
|
||||
border-radius: 8px;
|
||||
padding: 10px 14px;
|
||||
font-size: 13px;
|
||||
color: var(--text, #e6e9f0);
|
||||
}
|
||||
|
||||
.sv-body-loading { padding: 8px 0 18px; }
|
||||
.sv-body {
|
||||
background: var(--panel, #1a2030);
|
||||
border: 1px solid var(--panel-2, #222a3d);
|
||||
border-radius: 8px;
|
||||
padding: 16px 18px;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
color: var(--text, #e6e9f0);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
margin-bottom: 18px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.sv-snippet {
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: var(--muted, #8b93a7);
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.sv-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
|
||||
|
||||
/* ── List loading / empty states ───────────────────────────────────────── */
|
||||
.sv-skeleton-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
.sv-skeleton-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
/* ── Mobile: stack / overlay the reading pane ──────────────────────────── */
|
||||
@media (max-width: 767px) {
|
||||
.sv-reading-pane {
|
||||
position: fixed;
|
||||
inset: 56px 0 0 0; /* below the topbar */
|
||||
width: 100% !important;
|
||||
max-width: 100vw;
|
||||
min-width: 0;
|
||||
border-left: none;
|
||||
resize: none;
|
||||
z-index: 40;
|
||||
}
|
||||
/* When the pane is open, hide the underlying list to avoid double-scroll. */
|
||||
.sv-split.sv-split--open .sv-list-pane {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user