主要变更
- Markdown 阅读有了一张悬浮目录:右上角按阅读进度标出当前章节,点一下就跳过去;它浮在文档之上、不占阅读宽度,还压得住滚动时经过的代码块标题条。章节超过两节才出现,长目录会跟着当前行滚动,高光不会跑出卡片。
- 目录默认收起成一个小按钮:不翻目录时角落只有一个「目录」按钮,点开才展开卡片;卡片约旧版六成宽、右移 5px 避开文档滚动条,长标题省略号截断。卡片可折回按钮或整块关闭——关闭后不留任何东西,只有重新打开这个文件才恢复,刷新和源码/渲染切换都不算。
- 全屏阅读器按屏幕伸缩:大屏上跟着放大(最高约 1600×1100),小窗口也不溢出;不再是固定在旧尺寸上的一小块。
- 内部:目录条目读渲染后的标题而非解析源码(渲染器与 mermaid 片段不归插件管,只有 DOM 里的标题保证跳对地方);按钮与卡片互换时键盘焦点显式交接,不会掉回
<body>。
安装
# 正式版(npm)
dsh plugin --profile web add @xbzbing/dsh-git-panel@1.14.4
# 同一版本的 GitHub Release 附件
dsh plugin --profile web add https://github.com/xbzbing/dsh-git-panel/releases/download/v1.14.4/xbzbing-dsh-git-panel-1.14.4.tgz
验证
npm run check 全绿:lint + typecheck + 1160 单测 + 36 个 e2e runner + 产物一致性;workflow 门禁另跑 npm pack 与 scripts/assert-pack.mjs 校验产物
- 短文档高光回归:去掉
maxScrollTop > 0 守卫,activeTocIndex 的「不可滚动文档只认顶部」用例转红(一打开就错误高亮最后一节)
- 目录交互回归:把默认态取反、宽度改回 220px、或删掉焦点交接,
files-markdown-toc 的「默认只有按钮」「142px 宽」「焦点落点」断言分别转红
- 样式表守卫:把 CSS 注释写成
/ *,stylesheet 的注释与花括号配平用例转红(否则会静默吞掉后续样式)
完整变更记录 v1.14.3...v1.14.4
English
- A floating outline for Markdown reading: a card in the top-right marks the section you are in as you scroll and jumps to one when picked. It floats over the document rather than narrowing it, and paints above sticky code-block banners that scroll beneath it. It appears only for documents with more than two sections, and follows the current row in long outlines so the highlight never leaves the card.
- The outline starts collapsed into a small button: until you ask for it, the corner holds just a "Contents" button; click to open the card. The card is about 60% of its former width, shifted 5px right to clear the document scrollbar, with long titles ellipsized. It folds back into the button or closes outright — closing leaves nothing behind, and only reopening the file restores it; a refresh or a source/render switch does not count.
- The fullscreen reader scales with the screen: it grows on large displays (up to about 1600×1100) and still fits in a small window, instead of sitting at a fixed old size.
- Internal: outline entries are read from the rendered headings rather than parsed from source (the renderer and mermaid segments are not ours, so only the DOM headings are guaranteed to jump to the right place); keyboard focus is handed explicitly between the button and the card so it never falls back to
<body>.
Install
# Stable (npm)
dsh plugin --profile web add @xbzbing/dsh-git-panel@1.14.4
# The same version as a GitHub Release asset
dsh plugin --profile web add https://github.com/xbzbing/dsh-git-panel/releases/download/v1.14.4/xbzbing-dsh-git-panel-1.14.4.tgz
Verification
npm run check green: lint + typecheck + 1160 unit tests + 36 e2e runners + built-artifact consistency; the workflow gate also runs npm pack and scripts/assert-pack.mjs against the built artifact
- Short-document highlight regression: removing the
maxScrollTop > 0 guard turns activeTocIndex's "non-scrollable document honors only the top" case red (the last section is wrongly highlighted on open)
- Outline interaction regression: inverting the default state, restoring the 220px width, or removing the focus handover turns the
files-markdown-toc "button by default", "142px wide", and "focus landing" assertions red respectively
- Stylesheet guard: writing a CSS comment as
/ * turns the stylesheet comment/brace-balance case red (otherwise the rest of the stylesheet is silently swallowed)
Full changelog v1.14.3...v1.14.4