Repository navigation
feat(desktop): 工具窗口栏换成 IDEA New UI 图标和尺寸,纯图标按钮悬停显示名称 - #1897
Merged
Merged
Conversation
- 项目、提交、结构、查找、Git、终端、问题、运行、调试、构建、通知、服务改用 IntelliJ Community(Apache-2.0)的 20×20 New UI 工具窗口图标,新包 desktop/internal/toolicons 附 NOTICE;IDEA 没有对应图标的入口仍用 Lucide, 描边减到 1.8;插件声明的通用图标名映射到同一套图标。 - 工具栏按 IDEA 尺寸布局:40pt 工具栏、30pt 按钮、20pt 图标、10pt 间距; 拖动预览的图标居中和插入线位置随之调整。 - 左右工具栏和标题栏的纯图标按钮悬停显示名称:左栏提示开在右边、右栏开在 左边、标题栏开在下方;标题栏搜索的提示附随处搜索快捷键(新增 i18n 词条 desktop.tools.withShortcut)。拖动说明改作辅助技术的 Description。 - generate-desktop-file-icons.sh 新增 --tools-only,用 picosvg 和 skia-pathops 合并路径后生成 toolicons/icons.go。 - 新增 stripe_test.go 覆盖尺寸、提示文字和方向、拖动时不显示提示; 更新功能矩阵。
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 05:26
18 of 24 tasks
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
Viva 桌面端的左右工具窗口栏和 IntelliJ IDEA 差距明显:图标是 Lucide 通用图标,按钮和图标都偏小(28pt 按钮、16pt 图标),纯图标按钮悬停时也不显示名称,用户只能靠猜。本 PR 让工具窗口栏的图标、尺寸和悬停提示向 IDEA New UI 看齐。
改动 / Changes
图标
desktop/internal/toolicons:项目、提交、结构、查找、Git(vcs)、终端、问题、运行、调试、构建、通知、服务这 12 个入口改用 IntelliJ Community 的 20×20 New UI 工具窗口图标(platform/icons/src/expui/toolwind,修订c7f91397daa3a961b4e78bc634fe467a0a7d9ade,Apache-2.0)。svg/保存原始 SVG,NOTICE写明来源、修订和许可(许可正文复用fileicons/LICENSE-APACHE-2.0.txt),icons.go是生成结果。浅色和深色主题的 IDEA 图标几何形状相同,只保留浅色版,颜色由主题着色。catalog.go新增stripeLucide把描边从 2 减到 1.8,接近 IDEA 的线宽。plugintools.go:插件工具窗口声明的通用图标名(services/database、terminal、search、run、debug、git、problems)映射到同一套 IDEA 图标,其余用描边 1.8 的 Lucide;VCS 相关入口用toolicons.Vcs。尺寸(
chrome.go、chrome_view.go)chromeToolButton)、20pt 图标(chromeToolIcon)、按钮间距 10pt(chromeToolGap),按钮由Pad(chromeToolInset)(5pt)在工具栏内居中。标题栏按钮保持 28pt / 16pt 不变。chromeGlyph改为接收glyphLayout(按钮边长、图标边长、提示方向),标题栏用titleGlyph,左右工具栏用stripeGlyph(left)。drag.go:拖动预览里的图标按 20pt 居中;插入线按工具栏的 10pt 间距落在两个按钮正中(标题栏和状态栏仍按原间距)。悬停提示
Tooltip+TooltipOn):左栏提示开在按钮右边,右栏开在左边,标题栏开在下方;没有空间时 Viva 自动翻到对侧。按下或拖动时不显示提示(VivaHoverTooltip的行为)。catalog新增shortcut字段,只给点击效果与快捷键目录中某个动作完全相同的按钮填写:内置工具窗口没有切换快捷键;标题栏运行和调试走titleStart,与run.selected、debug.start的效果不同,所以不附快捷键。desktop.tools.withShortcut({name} {keys},中英文都补齐),已重新生成shared.generated.go。Description,屏幕阅读器先读名称再读拖动说明。生成脚本(
scripts/desktop/generate-desktop-file-icons.sh)--tools-only,只生成工具窗口图标;原有的--tree-only保留;不带参数时生成全部三组图标。工具图标用 picosvg 展平后,再用 skia-pathops 合并重叠形状(否则 debug 图标合成单一 nonzero 路径时会丢覆盖区域),最后用viva icons生成toolicons/icons.go。完整运行时文件树图标的输出与改动前逐字节一致。测试与功能矩阵
desktop/internal/workbench/stripe_test.go:TestToolStripeButtonsHaveTheToolWindowBarSizes:左右工具栏宽 40,按钮 30×30、距工具栏边缘 5、相邻按钮相距 40。TestIconButtonsNameThemselvesInATipBesideThem:项目(左栏)、构建(右栏)、搜索(标题栏)的命中 Hint 与提示文字一致,拖动说明在 Description;悬停后提示层只有这一条,方向分别在右、左、下;搜索提示带 ⇧⌘O;拖动按钮时不显示提示。workbench-tool-stripe-icons(两端 implemented / pending)。workbench-activity-tooltips的 Viva 说明:原文说 chromeBox 把 label 作为悬停说明,实际此前并不显示提示。同时更新验证步骤和证据。workbench-activity-rail-window-edge的说明从Pad(chromeGap)更新为新尺寸。不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
Lithe 的目标是 macOS 与 Windows 能力对齐。必须选下面一项:
platform-specific),理由:改动全部在 macOS 和 Windows 共用的 Viva 桌面端代码(
desktop/internal/)里,两端行为一致;Windows 实机尚未验收,矩阵中保持pending。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD.artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:只改图标、尺寸和悬停提示,没有新增或改动生命周期里程碑、操作终态、降级、恢复或失败路径。
界面文案 / i18n
shared/i18n/补齐中英词条,运行node scripts/i18n/generate-i18n.mjs并提交生成结果,没有手改生成文件;macOS 视图外使用L10n.stringnode scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存、定时器或依赖;图标编译进二进制,提示由 Viva 在悬停时绘制,空闲时不请求帧。
设置 / Settings
N/A:没有新增或修改设置项。
插件契约 / Plugin contract
N/A:没有改动插件契约、能力版本或宿主方法;插件图标名映射只是宿主呈现。
发行包与资源 / Bundle and resources
N/A:没有运行时资源,图标编译进二进制,运行时不读写文件(
verify-runtime-bundle-immutability.sh已通过)。生成脚本的 Python 虚拟环境只建在脚本自己的临时目录、用完即删,产物是提交进仓库的 Go 源码,没有新增.artifacts资源或可跨 worktree 复用的缓存。无用代码与重构 / Dead code and refactoring
chromeGap、chromeIconButton、chromeIconSize仍被标题栏和状态栏使用)验证 / Verification
./scripts/desktop/desktop-go.sh test -count=1 ./internal/workbench/ ./internal/toolicons/ ./internal/i18n/TestProjectTreeCreatesRenamesAndDeletes、TestNoticesKeepTheirKindAndShowAtMostThreeToasts各失败一次,单独运行和之后两次全量运行都通过,与本 PR 无关的偶发失败test-stability-macos.sh --package ./internal/workbench --filter 'TestToolStripeButtonsHaveTheToolWindowBarSizes|TestIconButtonsNameThemselvesInATipBesideThem'verify-test-stability.sh,verify-test-stability.sh --base origin/preview./scripts/desktop/desktop-go.sh build ./...,vet ./internal/workbench/ ./internal/toolicons/gofmt -l desktop/internal/workbench desktop/internal/tooliconsnode scripts/i18n/verify-app-language-localization.mjs,node scripts/i18n/generate-i18n.mjs --checkverify-platform-feature-matrix.sh,verify-platform-feature-matrix-change.sh origin/preview HEAD./scripts/desktop/verify/verify-runtime-bundle-immutability.shgenerate-desktop-file-icons.sh(all)toolicons/icons.go可重复生成未能执行的检查和原因:
pending。提交前确认 / Final checks
preview(cfe056fa3)创建,之后 preview 合入了 feat(desktop): Build 窗口可运行的行常驻绿色运行按钮,依赖标题加 ⓘ #1896,git merge-tree确认与本分支无冲突;目标分支:feat、fix、docs 为preview,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图