Skip to content

feat(settings): 按分类重构设置页面并适配主从布局 - #189

Open
imoscarz wants to merge 5 commits into
BenderBlog:mainfrom
imoscarz:feat/settings-master-detail
Open

imoscarz wants to merge 5 commits into
BenderBlog:mainfrom
imoscarz:feat/settings-master-detail

Conversation

@imoscarz

Copy link
Copy Markdown
Contributor

Abstract: 在本PR中,我们调整了XDYou项目的设置页面,对设置项目重新进行了分组,并适配了Master-Detail布局,用以提供更加直观的设置选项排布。

Introduction

随着XDYou项目Features的开发,应用的设置项目不断积累,也使得进行应用的配置变得越来越困难。过往的PR虽然更改了设置页面的展示风格,使其更加偏向md3的设计风格,但是弱化了分组,也进一步使得设置项目更难以被查找。我们希望构建一种新的设置排布方式,将设置项目放在子页面中,适配当前项目的master-detail布局,并提供设置项目的icon,使得软件的设置变得更加直观。

Related Works

Methods

原设置页面将全部选项集中在一个长列表中,横屏时未利用已有的主从布局。本次改为分类菜单与设置子页面:横屏在详情区切换分类,竖屏进入独立页面;从日志、关于和通知设置返回时保留所属分类。

菜单沿用“其他功能”页面的平面列表风格,为设置项补充图标,移除重复标题,并按显示、首页、电量提醒以及课表外观、学期与周次、课程数据重新分组。深浅色模式改为设置行与单选弹窗,支持跟随系统、浅色、深色,并同步整理简繁中文及英文文案。

image Figure 1: 应用设置页面在横屏时的情况

Experiments

当前本分支在Android和Windows上进行了测试:

  • Flutter 静态检查通过,完整测试 42 项通过。
  • 验证横屏分类切换、窄屏返回、跨断点布局、标题去重和设置项图标。
  • Android 15 竖屏运行真实设置页面与应用主题,覆盖 320dp 宽及 140% 字号、主题选择与跟随系统、开关联动、滚动、系统返回及设置持久化。

Conclusion

编不下去了(倒)

@imoscarz
imoscarz marked this pull request as ready for review September 19, 2026 10:12
Copilot AI lite review requested due to automatic review settings September 19, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

macOS notification refresh is skipped despite macOS notification support, which can leave notifications stale.

Review effort: Lite
Findings: None

What changed in this PR

Refactors the settings page into categorized, responsive master-detail navigation with updated icons, localization, and tests.

Changes:

  • Adds categorized settings navigation and detail pages.
  • Reorganizes settings groups and theme controls.
  • Updates translations, navigation tests, and notification handling.
File Summary
test/​page/​setting/​setting_navigation_test.dart Adds settings navigation and layout coverage.
lib/​page/​setting/​settings_category_page.dart Implements category detail layout.
lib/​page/​setting/​setting.dart Adds categorized settings navigation.
lib/​page/​setting/​groups/​ui_section.dart Reorganizes UI settings.
lib/​page/​setting/​groups/​notification_section.dart Reorganizes notification settings.
lib/​page/​setting/​groups/​core_section.dart Reorganizes core settings.
lib/​page/​setting/​groups/​classtable_section.dart Reorganizes class table settings.
lib/​page/​setting/​groups/​account_section.dart Reorganizes account settings.
lib/​page/​setting/​groups/​about_section.dart Reorganizes about settings.
lib/​page/​setting/​dialogs/​change_swift_dialog.dart Localizes validation messaging.
lib/​controller/​homepage_controller.dart Applies platform-specific notification refresh logic.
assets/​flutter_i18n/​zh_TW.yaml Updates Traditional Chinese translations.
assets/​flutter_i18n/​zh_CN.yaml Updates Simplified Chinese translations.
assets/​flutter_i18n/​en_US.yaml Updates English translations.
.vscode/​settings.json Updates editor configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@BenderBlog

Copy link
Copy Markdown
Owner

机械化重复:不要用 AI 生成 PR 概要,如犯下次注意。

Comment thread lib/controller/homepage_controller.dart Outdated
Comment thread test/page/setting/setting_navigation_test.dart Outdated
@BenderBlog

Copy link
Copy Markdown
Owner

暂时看不出来更大的问题,明晚我看看,另请录制视频。

@imoscarz

Copy link
Copy Markdown
Contributor Author
2026-09-20.173919-.mp4
2026-09-20.174133-.mp4

@BenderBlog

Copy link
Copy Markdown
Owner

可以把版本号和更新信息放在最上面,就不用分层了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants