Repository navigation
fix(desktop): #1794 插件设置列表填满页面,最后一项不再被截断 - #1848
Merged
Merged
Conversation
插件设置表单的设置列表原来固定 360 像素高:窗口矮时列表伸到底部按钮下面, 最后几项被截掉;窗口高时列表下面留一大片空白。 - 设置列表改为填满表单标题下剩下的高度,最少 160 像素。 - 语言、构建系统等插件设置页改成滚动区域(按页面命名,每次打开从顶部开始), 内容撑满可见高度;窗口放不下列表最小高度时滚动整页,不再截断。 - 已安装插件详情的“设置”标签页内容同样撑满滚动区域。 - 新增测试:最小窗口、800、1000 三个高度下,列表随窗口等量增长、底部与 确定按钮间距不变,最小窗口滚动后能完整看到列表,最后一项完整绘制在列表内。
xiaoyumuxi
marked this pull request as ready for review
November 13, 2026 09:21
19 of 25 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
插件设置表单(例如 设置 › 语言与框架 › Go 的 gopls 设置)里的设置列表固定 360 像素高:
已安装插件详情里的“设置”标签页有同样的问题。
改动 / Changes
设置列表(
settingswindow/plugin_settings_view.go)Height(360),改为占满表单标题下剩下的高度(Grow(1)),最后一项与页面底部对齐。settingsListMinHeight = 160:列表最少 160 像素高。窗口给不了这个高度时滚动整页,而不是继续压缩列表或截断。160 像素在最小窗口(520 高)的已安装插件详情里仍能完整放下。Grow(1),把剩余高度传给列表;补了说明父容器要求的注释。语言、构建系统等插件设置页(
settingswindow/settings_surfaces.go)c.Key(w.dynamicPage)),每次打开某页都从顶部开始,与内置设置页的pageScroll一致。已安装插件详情(
settingswindow/installed_view.go)Grow(1),在滚动区域里撑满可见高度,“设置”标签页的列表因此能填满标签栏下方。其他标签页只是列变高,内容仍从顶部排列,看起来不变。测试(
settings_surfaces_test.go、installed_view_test.go)flagsManifest:在共享settings-documentsfixture 的清单基础上生成 30 个布尔设置,全部放在 elixir 语言页。measureSettingsList、checkSettingsListFills:TestSettingsDynamicPageListFillsThePageAndShowsItsLastRowWhole:语言页。TestInstalledSettingsTabListFillsTheDetail:已安装插件的“设置”标签页。功能矩阵(
shared/platform-feature-matrix/features/declarative-plugin-settings.json)installed_view.go、installed_view_test.go;verification 末尾补一句本次的布局和测试。实现与验证状态不变。不在本 PR 范围内 / Out of scope
Tooltip加显示方向,另行提交。类型专属:fix
复现与根因
Height(360).Shrink(0),不随窗口变化。外层页面不能滚动,放不下的部分直接被裁掉。检查项
TestSettingsDynamicPageListFillsThePageAndShowsItsLastRowWhole(desktop/internal/settingswindow/settings_surfaces_test.go)修复前:the list grew 0 for a window 200 taller: {height:360 gap:87}, {height:360 gap:287}。最小窗口下 gap 为 -193,即列表底边在确定按钮下方 193 像素处。TestInstalledSettingsTabListFillsTheDetail(desktop/internal/settingswindow/installed_view_test.go)修复前:the list grew 0 for a window 200 taller: {height:360 gap:36}, {height:360 gap:202}。pluginSettingsPanel只有installedDetail和dynamicSettingsPage两处调用,都已改成滚动区域并撑满。stepping_view.go的Height(140)是多行文本框)。.agents/notes/implemented/bug-fix/记录:约束已写在pluginSettingsPanel的注释里,并有两个回归测试覆盖,不另写 Note范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/declarative-plugin-settings.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
N/A:没有新增或修改用户可见文字。已运行
node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,均通过。逻辑归属 / Logic placement
N/A:只改 Viva 视图的布局,没有业务逻辑。
性能与内存 / Performance and memory
ui.List虚拟化不变)设置 / Settings
插件契约 / Plugin contract
N/A:不涉及契约、能力版本、插件函数协议或宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源。已运行
zsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过。无用代码与重构 / Dead code and refactoring
refactor标签的 Issue,没有在本 PR 顺手处理:无验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/settingswindow/ -run ListFills -count=1(修复前)scripts/desktop/desktop-go.sh test ./internal/settingswindow/ -run ListFills -count=1(修复后)scripts/desktop/desktop-go.sh test ./... -count=1scripts/desktop/desktop-go.sh vet ./internal/settingswindow/、gofmt -lnode scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/previewzsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因: Windows、Linux 没有在本机运行,留给 CI。没有启动打包后的应用做整机验收,只用 Viva 无头驱动在三档窗口高度下验证。
提交前确认 / Final checks
preview创建;目标分支:feat、fix、docs 为preview,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图