Change ModuleLessonConfig value to array - #3420
Conversation
|
@Zhou-Jiahao-1998 is attempting to deploy a commit to a Personal Account owned by @nusmodifications on Vercel. @nusmodifications first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3420 +/- ##
==========================================
+ Coverage 53.07% 53.19% +0.12%
==========================================
Files 271 271
Lines 5762 5779 +17
Branches 1336 1340 +4
==========================================
+ Hits 3058 3074 +16
- Misses 2704 2705 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
li-kai
left a comment
There was a problem hiding this comment.
Hi! Thanks for submitting the PR, the code looks good to me.
Enabling custom removal/addition of lessons is such a powerful utility that we want to make sure users wield it right. That means we have to make it obvious which lessons were added/removed, and also the ability to undo them. The consequence of a someone missing lessons/lectures for a semester is pretty big.
As a team we just couldn't come up with a good solution. Ultimately NUSMods is more of a planner than a calendar, so we've been encouraging users customize their schedule via calendar apps instead.
Despite that, it does seem that demands for such a feature never back down. If you're keen on building it, could you propose how your TA-mode would work? Once the details are ironed out, you'll have the go-ahead.
|
@li-kai @chrisgzf Sorry for the delay. After some brainstorming, this is how I plan to do this for now. UI side:
Code side:
Let me know your thoughts on this approach. Feel free to share any ideas/comments that you have. Thank you! |
|
On the UI, it might be better to collapse all 3 into a dropdown so we have: But the rest of the details sound good to me. @chrisgzf do you have bandwidth to review the PRs? |
chrisgzf
left a comment
There was a problem hiding this comment.
Hi @zhoukerrr, changes look okay to me but one more thing. Could you:
- increment the redux-persist schema version in
timetables.ts:25 - write a migration in the same
persistConfigto migrate the users' existing data to the new data shape?
This prevents this change from breaking the user's existing timetable data, which will be very messy.
* Revert "Add support for Timetable for TAs (#3434)" This reverts commit 7f581df. * Revert "Change ModuleLessonConfig value to array (#3420)" This reverts commit 50adbe0. * Add scraper additional information * Fix type definitions for module * Show additional information on frontend * Fix test fixtures
* feat: update lesson to array * chore: fix lint * fix: update test cases * chore: format lint * chore: update test cases * feat: update timetable redux schema * feat: fix lint * chore: fix lint * chore: add timetable schema migration test * fix: add comment for test version --------- Co-authored-by: Christopher Goh <chrisgzf@gmail.com>
* feat: update lesson to array * chore: fix lint * fix: update test cases * chore: format lint * chore: update test cases * feat: update timetable redux schema * feat: fix lint * chore: fix lint * chore: add timetable schema migration test * fix: add comment for test version --------- Co-authored-by: Christopher Goh <chrisgzf@gmail.com>
Context
Part of #3404
Implementation
Changed the value of
ModuleLessonConfigtype toclassNo[].This change does not affect anything for its current functionality.
New redux actions will be added to add/remove classes to the array.
This will allow TAs to customise the module.
Other Information
The current idea is to add an extra button next to the remove and hide button of the module and allow student to add/remove classes as they click.