From 2910aaaa522ad3888aeb6feb0f0a8bc4359bb2af Mon Sep 17 00:00:00 2001 From: tsoolgee <291792265+tsoolgee@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:33:25 +0200 Subject: [PATCH] fix(ui): keep the export preflight list inside the dialog The 0.36 Rust preflight report has six checks whose English title and summary shared one row in the 300px side panel. The panel overflowed below the dialog and covered the export button. Stack title over summary, give each line its own direction, and let the panel scroll. Refs #40 --- packages/tok-ui/src/components/ExportDialog.ts | 8 +++++--- packages/tok-ui/src/index.html | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/tok-ui/src/components/ExportDialog.ts b/packages/tok-ui/src/components/ExportDialog.ts index dd661ca..fcdd820 100644 --- a/packages/tok-ui/src/components/ExportDialog.ts +++ b/packages/tok-ui/src/components/ExportDialog.ts @@ -247,14 +247,16 @@ export class ExportDialog { if (report && Array.isArray(report.checks) && report.checks.length > 0) { for (const item of report.checks) { const st: PreflightStatus = item.status; - const li = el('li'); + const li = el('li', undefined, { style: 'align-items:flex-start' }); const markCls = st === 'Fail' ? 'tok-err' : st === 'Warning' ? 'tok-warn' : 'tok-ok'; const iconName = st === 'Fail' ? 'close' : st === 'Warning' ? 'warning' : 'check'; const mark = el('span', markCls); mark.appendChild(icon(iconName, 15)); li.appendChild(mark); - li.appendChild(el('span', undefined, { style: 'flex:1' }, item.title)); - li.appendChild(el('span', undefined, { style: 'color:var(--tok-text-primary)' }, item.summary)); + const text = el('span', undefined, { style: 'flex:1;display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere' }); + text.appendChild(el('span', undefined, { dir: 'auto', style: 'color:var(--tok-text-primary)' }, item.title)); + text.appendChild(el('span', undefined, { dir: 'auto' }, item.summary)); + li.appendChild(text); list.appendChild(li); } } else { diff --git a/packages/tok-ui/src/index.html b/packages/tok-ui/src/index.html index 6df4e60..77aebc1 100644 --- a/packages/tok-ui/src/index.html +++ b/packages/tok-ui/src/index.html @@ -922,7 +922,7 @@ .tok-link:hover { text-decoration: underline; } /* Export dialog */ - .tok-export-side { width: 300px; flex: none; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--tok-bg-canvas); border-inline-start: 1px solid var(--tok-border-subtle); } + .tok-export-side { width: 300px; flex: none; padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; background: var(--tok-bg-canvas); border-inline-start: 1px solid var(--tok-border-subtle); } .tok-export-preview { display: flex; justify-content: center; padding-top: 6px; } .tok-export-preview > div { display: flex; box-shadow: 0 1px 3px rgba(0,0,0,.2), 0 8px 20px rgba(40,32,16,.18); } .tok-export-form { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }