Skip to content

feat(schedule): OKLCH 12 色课程色板、同课同色无碰撞分配与全端色彩统一 - #225

Merged
Maotechh merged 1 commit into
HeZeBang:masterfrom
Maotechh:feat/course-color-scheme
Nov 24, 2026
Merged

Maotechh merged 1 commit into
HeZeBang:masterfrom
Maotechh:feat/course-color-scheme

Conversation

@Maotechh

Copy link
Copy Markdown
Collaborator

变更概览

解决同一门课在课表内因多条 EAMS 记录被分到不同颜色、首页「今日课程」未同步课程色、以及 7 色色板易撞色/与考试混色的问题:

  1. 同课同色归并(courseColorKey):
    • 有括号课号时按基础课号归并(如 模拟电路(EE115A.02) 与习题课 模拟电路(EE115A.02D) 同归 code:EE115A),独立实验课(如 EE115AL.01)按独立课号区分;无结构化课号的研究生课/自定义课按规范化课程名归并。
  2. OKLCH 12+1 感知均匀色板(CourseColor / CourseColorScheme):
    • 从 7 色扩展至 12 种普通课程色(primary 钴蓝 / orange 琥珀 / secondary 青绿 / tertiary 紫罗兰 / green 翠绿 / pink 玫粉 / sky 天蓝 / coral 暖橘 / indigo 靛蓝 / lime 苔绿 / plum 梅紫 / slate 岩灰)+ 1 种考试独占警示红(error),完全保留原有 7 个枚举名向后兼容。
    • 按 OKLCH 空间统一校准明度与彩度,所有 13 个色槽在浅色下对比度 ≥ 7.1:1、深色/AMOLED 下 ≥ 9.8:1(均超 WCAG AAA)。
  3. 无碰撞 + 色轮最大间距分配(assignCourseColors):
    • 按学期去重课程键排序并以最大色相间距顺序分配,12 门以内绝对零撞色,且周次切换、多方案研究生课表、首页「今日课程」均保持完全一致。
  4. 全端色彩与质感统一:
    • 周课表色块:升级为清透淡底 + 左侧 2.5dp 强调色条 + 极细 0.75dp 同色描边(Apple Calendar / Notion 质感)。
    • 首页「今日课程」、课表日程、课程详情:统一同步 course.color.accentColor,考试独占 dangerRed(首页考试行补充「考试」红标)。
    • 自定义课程编辑器:新增 12 色选色器,新建时默认挑选当前学期未使用的色槽。

验证

  • flutter analyze --no-pub:0 issues
  • design_system_guard_test.dart、custom_course_test.dart(含归并规则、12 门课零撞色、全色槽 WCAG 对比度回归测试)、primary_tabs_design_test.dart、desktop_bento_shell_test.dart、course_block_label_test.dart、schedule_first_week_test.dart、graduate_schedule_test.dart、schedule_empty_week_test.dart、schedule_fetch_coalescing_test.dart、design_system_widgets_test.dart 全部通过
  • pubspec.lock 无变动

Copilot AI balanced review requested due to automatic review settings November 24, 2026 14:09
@github-project-automation github-project-automation Bot moved this to Backlog in TechPie Nov 24, 2026

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Maotechh
Maotechh merged commit 28e0ce8 into HeZeBang:master Nov 24, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in TechPie Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants