Skip to content

MarkdownAura v1.7.0

Choose a tag to compare

@westsource westsource released this 17 Oct 12:25
· 5 commits to main since this release

MarkdownAura 1.7.0

新增:阅读宽度第四档 宽 140ch。 起因是宽屏(带鱼屏)上"两头都不合适":舒适 100ch 太窄,
撑满 又是一整行。实测把这件事说清楚了——3440×1440、两侧面板都开、正文 15px 下(design/mockup.html
的同一套字体与同一份 components.css):

档位 --measure 实测栏宽 占内容区 每行字符
窄 60ch 485px 16% 60
舒适 100ch 809px 27% 100
宽(新增) 140ch 1132px 38% 140
撑满 100% 2948px 100% ≈364

原来的阶梯在一次按键里从 27% 跳到 100%——中间是空的,而 撑满 在 3016px 窗格上约 350 字符一行
(成文时的一段),正文基本没法读。新增的 宽 不是把这个缺口填满(可读区间里的任何值都填不满),
而是把这一跳变成 16% → 27% → 38% → 100%。

  • 单位保持 ch,没有用百分比。 百分比档会随窗口把行一起拉长,那正是 撑满 已经写明并保留的代价;
    ch 是唯一能让行宽"窗口多大都还读得下去"的单位。三个测量档都是 ch,撑满 仍是 100%。
  • 140 是判断而不是区间,所以它是唯一值得调的数。 它超出 docs 站与代码托管常用的 80–120,
    这是有意的(它仍然是"一栏",只是更宽);换一台别的超宽屏,改 src/measure.ts 里 MEASURES.wide.ch
    一个数即可,tooltip 照旧报出解析后的像素与占比。
  • 四档是数据不是代码。 菜单、ctrl shift M 循环、状态栏那一栏、沉浸栏与设置里的分段控件全部由
    MEASURES / MEASURE_ORDER 生成,UI 代码一行未动;Measure 联合类型、i18n 的 measure.wide
    (en wide / zh 宽)、mockup 里那张并行表同步跟上。
  • 旧会话不受影响。 会话里存的是档位名,缺字段回落默认 舒适;更早的 xwide 也是这样静默回落的。

设计文件同步:design/SPEC.md §3/§8/§10(四档 + 超宽屏实测与"这是可调的那一档"),
design/tokens.css、design/components.css、design/check-prose-css.mjs 的档位列举,
两份 README 的"阅读"行与新增的一段说明。

验证(实测):mockup 在 3440×1440 下逐档点过一遍,栏宽 485 / 809 / 1132 / 2948px,状态栏标签
60ch / 100ch / 140ch / full,菜单四项;设置里的分段控件 224px、窗口缩到 420px 仍不裁切(只压缩标签列)。
node design/check-prose-css.mjs 全通过,npx tsc --noEmit 通过,npm run build 通过,cargo test 通过。


MarkdownAura 1.7.0

New: a fourth reading-width preset, wide 140ch. It comes from the ultrawide screen where both ends
disappoint: comfortable (100ch) is narrow and full is a whole line. The measurement says it plainly — at
3440×1440 with both panels open and the prose at 15px (the mockup's own font and the same components.css):

Preset --measure Column Share of the content area Characters per line
narrow 60ch 485px 16% 60
comfortable 100ch 809px 27% 100
wide (new) 140ch 1132px 38% 140
full 100% 2948px 100% ≈364

The old ladder went from 27% of the content area to 100% in one keystroke — the middle was empty, and
full runs ~350 characters a line (a paragraph) at 3016px. wide does not close that gap (nothing inside
the readable range can), it makes the step honest: 16% → 27% → 38% → 100%.

  • The unit stays ch, not a percentage. A percentage rung grows the line with the window, which is the
    cost full already states and keeps; ch is the only unit that keeps a line readable whatever the window
    size. The three measured rungs are ch; full is still 100%.
  • 140 is a judgement, not a band, so it is the one number worth retuning. It sits past the 80–120 that
    docs sites and code hosts run at, deliberately (it is still a column, just a wide one); on a different
    ultrawide, one value in src/measure.ts (MEASURES.wide.ch) is the whole change, and the tooltip keeps
    reporting the resolved width and its share.
  • The four presets are data, not code. The menu, the ctrl shift M cycle, the status-bar chip, the
    immersive chip and the settings row are all generated from MEASURES / MEASURE_ORDER; no UI code moved.
    The Measure union, the i18n key (measure.wide, wide / 宽) and the mockup's parallel table follow.
  • An old session is unaffected. It stores the preset name; a missing field falls back to comfortable,
    the same silent fallback the removed xwide got.

The design files follow: design/SPEC.md §3/§8/§10 (the four rungs, the ultrawide measurement, and "this is
the tier to retune"), the preset lists in design/tokens.css, design/components.css and
design/check-prose-css.mjs, and both READMEs (the Reading row plus a new paragraph on the ladder).

Verification (measured): every preset was clicked through in the mockup at 3440×1440 — columns of
485 / 809 / 1132 / 2948px, status-bar labels 60ch / 100ch / 140ch / full, a four-item menu; the settings
segment is 224px and still fits with the window at 420px (only the label column compresses).
node design/check-prose-css.mjs, npx tsc --noEmit, npm run build and cargo test all pass.