Skip to content

Conversation

@imoscarz
Copy link

@imoscarz imoscarz commented Dec 24, 2025

这个PR实现了考勤查询功能的界面更新。

  • 在平板或PC视图下使用表格视图以更清晰地展示数据(在空间不够时保持原本的卡片视图)
  • 支持表格的排序与筛选
  • 将签到信息由原本的context.push()更改为与课表类似的BothSideSheet
  • 修复了窗口拖动过快时随机出现异常的问题

Note

由于我没有mac设备,新功能未在ios平台上进行测试。


Preview:

img1 img2

Copilot AI review requested due to automatic review settings December 24, 2025 11:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the attendance query feature by introducing a responsive table view for tablets and PCs (screens wider than 800px) while maintaining the existing card view for mobile devices. The table view includes sorting and filtering capabilities, and the detail navigation has been refactored to use BothSideSheet instead of context.push() for a more consistent user experience.

Key changes:

  • Added responsive layout switching based on screen width (800px threshold)
  • Implemented table view with sortable columns and status-based filtering
  • Refactored detail view navigation to use BothSideSheet for better UX
  • Added internationalization support for table-related UI elements

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
pubspec.lock Multiple package version downgrades including flex_color_scheme, flex_seed_scheme, meta, test_api, and Flutter SDK minimum version
lib/page/public_widget/both_side_sheet.dart Enhanced title handling with overflow protection using Expanded widget and ellipsis
lib/page/class_attendance/class_attendance_view.dart Added responsive layout logic to switch between table and card views based on screen width
lib/page/class_attendance/class_attendance_table.dart New file implementing table view with sorting, filtering, and status-based display features
lib/page/class_attendance/class_attendance_detail.dart Refactored to support conditional AppBar rendering for BothSideSheet integration
lib/page/class_attendance/class_attandance_card.dart Updated to use BothSideSheet instead of context.push() for detail navigation
assets/flutter_i18n/zh_TW.yaml Added Traditional Chinese translations for table view UI elements
assets/flutter_i18n/zh_CN.yaml Added Simplified Chinese translations for table view UI elements
assets/flutter_i18n/en_US.yaml Added English translations for table view UI elements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

imoscarz and others added 5 commits December 24, 2025 20:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BenderBlog
Copy link
Owner

BenderBlog commented Dec 24, 2025

好设计,要是早点发就好了,我新版本刚发布:P

关于未在ios平台上测试:该功能仅涉及 Flutter 代码,这块是跨平台的,在安卓手机和平板上运行 OK 就行了。

我考虑到平板等平台可能涉及的窗口变化导致的变化,可以试试把这个应用在桌面(Windows 或者 Linux 环境下)来运行,变换窗口大小。

@imoscarz
Copy link
Author

好设计,要是早点发就好了,我新版本刚发布:P

关于未在ios平台上测试:该功能仅涉及 Flutter 代码,这块是跨平台的,在安卓手机和平板上运行 OK 就行了。

我考虑到平板等平台可能涉及的窗口变化导致的变化,可以试试把这个应用在桌面(Windows 或者 Linux 环境下)来运行,变换窗口大小。

感谢作者大大,新功能在Windiws和Android模拟器环境下未见异常,但是在快速拖动窗口边框重置大小时MediaQuery.of(context) 在 build 过程中被调用,导致 widget 树被标记为 dirty,概率抛出异常,在新的commit中已经被修复。

另外,问一下作者是否有考虑为项目构建一个正式的主页,如果有需要我可以在寒假期间用next.js搭一个。

@BenderBlog
Copy link
Owner

但是在快速拖动窗口边框重置大小时MediaQuery.of(context) 在 build 过程中被调用,导致 widget 树被标记为 dirty,概率抛出异常,在新的commit中已经被修复。

这块我再审阅,最近我在忙别的事项,代码还没看:P 从描述来说,应该使用 LayoutBuilder 来搞在视图大小变化中更改布局的需求。

另外,问一下作者是否有考虑为项目构建一个正式的主页,如果有需要我可以在寒假期间用next.js搭一个。

QQ 联系,加 PDA 交流群找我。我是想,但是最终的成品可能在设计上很简单……

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.

2 participants