Skip to content

refactor(ui): 批量将共享表单分区组件迁移至 SectionCard - #2125

Merged
ClozyA merged 1 commit into
devfrom
refactor/ui-p0-section-migration
Nov 23, 2026
Merged

ClozyA merged 1 commit into
devfrom
refactor/ui-p0-section-migration

Conversation

@ClozyA

@ClozyA ClozyA commented Nov 23, 2026

Copy link
Copy Markdown
Member

摘要

  • 为 SectionCard 补齐无标题/无动作区时隐藏 .section-header 的条件判断,使 ExtraScriptSection 与 UserNotifyConfig 在 hideSectionHeader 卡片承载态下无需渲染空分隔线,并顺带消除外层卡片底部多余的 40px 留白。
  • 批量将全站共享用户表单分区(ExtraScriptSection、UserNotifyConfig、PluginDeclarativeForm)及 10 个 <= 500 行专项配置分区(MaaEndRunConfigSection、DirectControlSection、OkwwAccountPlan、OkNteTaskConfigSection、MaaFWQueueHeaderSection,以及 5 个专项的 BasicInfoSection)迁移至 SectionCard variant="plain"。
  • 全部 14 个文件均保持在 340 行以内,且与在审 PR refactor(ui): 批量将低行数业务弹窗迁移至 AppModal #2113 保持文件零重叠。

改动前后对比(Playwright 真实组件渲染)

以下对比图均基于同一份业务代码,分别渲染自 origin/dev(984b404b9,改前)与本分支(改后)真实 SFC 组件,覆盖亮色、暗色及 html.appearance-background-custom 自定义背景态。

场景 改前(984b404b9) 改后(本 PR) 验证要点
用户编辑三段共享分区(亮色) user-sections-before user-sections-after BasicInfoSection + ExtraScriptSection + UserNotifyConfig 全部接入 SectionCard(0 -> 3),分段间距更均匀
hideSectionHeader 卡片承载态(暗色) bare-before bare-after 无标题态不渲染 .section-header(0 -> 0),并去掉额外脚本卡片底部多余的 40px 留白
运行配置 + 直控分区(暗色 + 自定义背景) run-direct-before run-direct-after MaaEndRunConfigSection 复用 SectionCard 容器查询能力,DirectControlSection 切换 density="compact",自定义背景透出一致
插件声明式配置分组(亮色) plugin-form-before plugin-form-after 多分组 PluginDeclarativeForm 统一至 SectionCard variant="plain",24 栅格布局与分组间距无回归

验证

  • vp fmt . --check、vp lint .(0 warnings / 0 errors)、vue-tsc -p tsconfig.app.json --noEmit 全部通过。
  • vp test run src/ 31 个测试文件、105 个用例全部通过。
  • 14 个改动的 .vue 文件全部保持在 340 行以内。
  • python scripts/changelog.py check --pr-base origin/dev --pr-kind normal --skip-changelog 通过(无用户可见行为变更,已打 skip-changelog)。

@ClozyA ClozyA added the skip-changelog 本 PR 没有用户可见改动,不需要 changelog.d 碎片 label Nov 23, 2026

Copy link
Copy Markdown
Contributor

总体结论:可以合并

e8bfb21 把共享表单和专项分区换成了同一套卡片。无标题的额外脚本和通知设置这次不会再多画一条空分隔线。我顺手对了 MaaFW 的导入与恢复、OKWW 的保存与禁用,入口还在,传给下游的值也没变。

有个不拦合并的验收点:窗口拉窄时看一眼 MaaFW 队列的导入和恢复按钮。它原来由整行标题带着换行,现在跟着卡片的动作栏走,确认长文案下两个按钮都够得着就好,喵。

把空分隔线收走的 dot酱

@ClozyA
ClozyA merged commit b38de0a into dev Nov 23, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog 本 PR 没有用户可见改动,不需要 changelog.d 碎片

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants