Repository navigation
fix(workbench): macOS 技能页顶部可以拖动窗口(关联 #329) - #351
Merged
Merged
Conversation
… its top strip The skills page had no row marked data-window-drag, so its top area never dragged the window on macOS (ECNU#329). The page now has a non-scrolling drag strip above the list, and the create/remove skill overlays declare data-window-drag-exclude so their backdrop still closes the dialog. A test reads the computed regions that the pinned DSH base.css gives these attributes in the pinned Electron, so a DSH upgrade that changes them fails in validate-pinned-dsh-source instead of silently breaking dragging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS 上技能页右侧顶部拖不动窗口(#329 里的一项)。
原因
DSH 的桌面壳只把带
data-window-drag标记的行当作窗口拖拽区。对话页标题栏、侧栏顶部、插件页标题行都有这个标记,技能页(workbench-native的SkillsPage)没有,右侧顶部整块都拖不动。改动
SkillsPage拆成上下两块:28px + --dsh-frame-top-clearance。在 macOS 上一共 76px,和对话页标题栏一样高。data-window-drag-exclude。DSH rc.3 起,拖拽行以外的元素不会自动从拖拽区里扣掉,遮罩要自己声明;否则弹窗打开时,按住遮罩顶部会拖动窗口,而不是关掉弹窗。test/window-drag.test.mjs和window-drag.electron.mjs:用锁定版本的 Electron 加载锁定版本 DSH 的base.css,读出三种节点的计算值,确认可拖行是 drag、带排除标记的遮罩是 no-drag、放在inert容器里的可拖行是 none(窄窗口展开侧栏抽屉时,DSH 会给主列加inert,可拖条要靠这条规则让出点击)。测试加进validate-pinned-dsh-source.yml里已经准备好 Electron 和 Runtime 的那一步。这些属性是 DSH 的样式约定,不是接口,规则一变界面不会报错,只会悄悄拖不动;升级 DSH 会触发这一步,测试会直接失败。DSH 自己的插件页、侧栏、对话页标题栏和引导页都用这两个属性,
dsh-client-web的 README 写明了用法。data-window-drag从 0.2.0-rc.2 到 0.2.3-alpha.2 一直没变,data-window-drag-exclude从 rc.3 起才有。验证:macOS 27.0.1 arm64
用 Electron 44.0.0 和 rc.3 的 Runtime 跑
workbench-native全部测试,23 项全部通过。新测试:@media print,或在后面加一条覆盖它的声明,也都会失败。窄窗口抽屉:给主列加上
inert后,可拖条的计算值从 drag 变成 none,不再参与拖拽;去掉后恢复 drag。用产品构建脚本从本分支源码编译
workbench-native,换进 main(1d1174a)本机构建的 0.4.13-dev.20261116.1(DSH rc.3),重新签名。和原装版本相比,编译产物只多了这两处改动。用 HID 鼠标事件实拖:Windows 和 Web 版没有实测。拖拽条的样式规则只在 macOS 上生效,在其他平台上它只是一块和原来上边距一样高的空白,列表滚动时同样在它下沿截止。
未处理
@deepseek-ai/dsh-client-ui-schedule,直到 0.2.3-alpha.2 都没有拖拽行。本 PR 不改 DSH 的运行文件。