nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Fix TA mode for lecture lessons

Open leslieyip02 opened this issue 1 year ago • 3 comments

Context

Fixes #3929.

Implementation

Previously, TA mode will filter out all lectures. However, some mods (e.g. CS2103T) only have lecture lessons, so this PR makes all lessons togglable.

TaModulesConfig now stores [lessonType, classNo, startTime, day] instead of [lessonType, classNo].

export type TaModulesConfig = {
  [moduleCode: ModuleCode]: [
    lessonType: LessonType,
    classNo: ClassNo,
    startTime: StartTime,
    day: DayText,
  ][];
};

For the migration, I'm not sure on how startTime and day data can be pulled. Right now, I am wiping the existing TA config to avoid conflicts. Let me know if there's a better way to do this?

leslieyip02 avatar Jan 03 '25 14:01 leslieyip02

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 2:31pm

vercel[bot] avatar Jan 03 '25 14:01 vercel[bot]

@leslieyip02 is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 03 '25 14:01 vercel[bot]

Codecov Report

Attention: Patch coverage is 35.84906% with 34 lines in your changes missing coverage. Please review.

Project coverage is 54.68%. Comparing base (988c6fd) to head (e56d83f). Report is 59 commits behind head on master.

Files with missing lines Patch % Lines
website/src/views/timetable/TimetableContent.tsx 0.00% 22 Missing :warning:
website/src/utils/timetables.ts 62.50% 6 Missing :warning:
website/src/reducers/timetables.ts 55.55% 4 Missing :warning:
website/src/views/timetable/TimetableCell.tsx 66.66% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3930      +/-   ##
==========================================
+ Coverage   54.52%   54.68%   +0.16%     
==========================================
  Files         274      276       +2     
  Lines        6076     6327     +251     
  Branches     1455     1548      +93     
==========================================
+ Hits         3313     3460     +147     
- Misses       2763     2867     +104     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 03 '25 14:01 codecov[bot]