Repository navigation
feat(ui): 落地页深色工程风重设计 + 工作台宽屏布局与预览修复 - #223
Conversation
…view gradient buttons Landing: - bump hero eyebrow v2.3 -> v2.4 to match package version - tighten hero vertical rhythm; split subtitle into nowrap phrases to drop the single-character orphan line - gate .reveal-on-scroll behind a .reveal-armed class so content stays visible when JS/observer/print contexts never trigger intersection - hover feedback for feature cards, format rows, workflow steps; CTA section gets a brand gradient bar Workbench (styles.css only): - dashed centered empty states, tab active indicator, focus-visible rings - gradient progress bar with tabular-nums percentage - stronger pane elevation, press feedback on ghost/mini/menu buttons Preview (preview.css): - explicit brand-gradient primary button rules for dark topbar context (fixes unified-button-test baseline failure: token now used 3x) Chore: add npm run dev script alongside existing start script Tests: design-token, ui-accessibility, ui-button-consistency (12/12), unified-button, smoke (60 groups), browser-smoke, ui-conversion-e2e, server-hardening all pass.
…screen fixes Landing (landing-view.js / styles/landing.css): - full redesign: deep ink-navy (#0b0e13) palette, hairline grid lines, monospace uppercase labels, pill CTAs - hero: meta row (V2.4.0 / LOCAL-FIRST / 14 IN x 11 OUT), two-line headline with teal-to-blue gradient accent, nowrap phrase subtitle - feature grid with Repair Engine wide card housing an animated document-scan beam (marquee of inline-SVG document icons + teal/blue light beam; paused by default, plays on hover/focus/in-viewport, fully static under prefers-reduced-motion) - format matrix reworked into technical data rows with hairline dividers and outlined route-class chips; workflow as 01-05 numbered track; hairline footer - reveal-on-scroll stays gated behind .reveal-armed; print forces visible without transitions Workbench (styles.css / app.js): - topbar: content capped at 1760px and centered on >=1808px screens; progress track max-width 320px; landing-state topbar goes dark with pill nav button pinned right - status chip: max-width + ellipsis truncation, full text via title - workspace capped at 1920px centered; input editor now flex-fills the source pane (was pinned to 144-420px leaving dead space) - stale preview fix: loading a file / restoring workspace no longer leaves the sample document in the preview pane; empty states explain the actual input state - scanned-PDF guidance: when the model carries PDF_NO_TEXT_RUNS (from the pdf branch; degrades gracefully without it), input pane and preview show "N pages without text layer, likely scanned - conversion will use local OCR" - typography: Inter/Segoe/PingFang system stack for UI, unified mono stack for code/figures, no pseudo-italic Chinese, preview body line-height 1.72 Tests: design-token, ui-accessibility, ui-button-consistency, unified-button, smoke (60 groups), browser-smoke, ui-conversion-e2e, server-hardening all pass.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2821e4ebb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function isNoTextRunsPdfModel(model) { | ||
| return Boolean(getPdfNoTextRunsWarning(model)) || model?.metadata?.pdf?.extraction === "pdfjs-no-text"; |
There was a problem hiding this comment.
Match the no-text metadata emitted by the PDF reader
For scanned PDFs processed by the current PDF.js path, readPdf emits PDF_NO_CREDIBLE_TEXT with metadata.pdf.extraction === "pdfjs-text-content"; neither PDF_NO_TEXT_RUNS nor "pdfjs-no-text" is produced anywhere in the repository. Consequently this predicate is always false for the intended input, so both newly added scanned-document guidance branches fall back to the generic “未能提取” message. Check the metadata the reader actually emits, such as an unavailable textStatus with a non-encrypted PDF.js payload, or add the claimed producer metadata.
Useful? React with 👍 / 👎.
| inputContent.style.minHeight = `${minHeight}px`; | ||
| inputContent.style.height = ""; | ||
| inputContent.style.overflowY = "auto"; |
There was a problem hiding this comment.
Preserve content-based sizing in the stacked layout
At viewport widths of 1180px or less, styles.css switches .workspace to auto-sized rows and gives .source-pane no definite height. In that layout the textarea has no flex free space to fill, so clearing its explicit height leaves every text document at the 144px minimum with an internal scrollbar; previously it grew with scrollHeight up to 420px. Keep content-based sizing for the stacked breakpoint, or give the pane a definite height before relying on flex growth.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cab8e331b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (String(fromFormatSelect.value).toLowerCase() === "pdf") { | ||
| // 扫描件/图片型 PDF:占位文案明确引导本地 OCR(与加密提示并列的专门分支) | ||
| try { | ||
| const inputModel = toDocumentModel(currentInputContent, fromFormatSelect.value, fileName); |
There was a problem hiding this comment.
Reuse the PDF model instead of parsing it again
On every PDF load, createReadableInputDisplay(...) immediately above already calls toDocumentModel for binary inputs, so this added call synchronously rebuilds the same model a second time; the queued preview then builds it a third time. For large PDF data URLs, each pass rescans the full payload and reconstructs its blocks on the main thread, adding avoidable UI stalls. Return/reuse the model from the first parse when deriving the scanned-document message.
Useful? React with 👍 / 👎.
| .landing-view .primary-button.btn-gradient.btn-lg { | ||
| border-radius: var(--radius-full); | ||
| padding-left: calc(var(--space-6) + var(--space-1)); | ||
| padding-right: calc(var(--space-6) + var(--space-1)); | ||
| box-shadow: 0 0 0 1px rgba(75, 243, 200, 0.18), 0 8px 28px -12px rgba(13, 148, 136, 0.55); |
There was a problem hiding this comment.
Add a high-contrast focus indicator for dark landing CTAs
When navigating the redesigned landing page by keyboard, these primary CTAs retain the global focus outline rgba(13, 148, 136, 0.18), which has very low contrast against the new #0b0e13 background and is further indistinguishable from the button's always-present teal shadow. Unlike the ghost CTA, this block provides no dark-theme :focus-visible override, so keyboard users can lose track of focus; add a clearly contrasting landing-specific focus ring.
Useful? React with 👍 / 👎.
# Conflicts: # public/app.js # public/landing-view.js # public/styles.css # public/styles/landing.css
概述
在 #221(已合并)的基础上,对落地页做整体重设计(深色工程控制台风格),并修复工作台在宽屏下的一批布局 bug 与体验问题。纯展示层 + UI 行为修复,不涉及转换核心逻辑。
落地页重设计(landing-view.js / styles/landing.css)
.reveal-armed门控;打印强制可见且无过渡工作台修复(styles.css / app.js)
PDF_NO_TEXT_RUNS(pdf 分支提供,缺它时优雅降级)时,输入区与预览明确提示"N 页无文本层,疑似扫描件,转换将使用本地 OCR"测试