nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Add Custom Modules to Timetable

Open seanlowjk opened this issue 4 years ago β€’ 7 comments

Context

Resolves #2040

The idea is to implement custom modules for students who wish to add modules that are not part of the NUS curriculum (DYOMs) or TA classes. (Especially for SoC TAs)

Implementation

https://user-images.githubusercontent.com/42912708/146161876-66848d79-113e-47be-abe3-21ab071addbd.mp4

With guidance from @chrisgzf , we have developed a solution which allows users to add their custom modules.

This is done via CustomLessons which are not readonly. As a result, we can incorporate these custom lessons into the TimetablesState to be stored for future use.

Other Information

  1. Once this is integrated, will we need to integrate this feature as well with regards to the export feature?
  2. My engineering decisions have been briefly mentioned above. Do let me know if there is room for improvement.

TODOs

  • [x] Add Component and Logic Tests

seanlowjk avatar Dec 15 '21 09:12 seanlowjk

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

nusmods-export – ./export

πŸ” Inspect: https://vercel.com/nusmodifications/nusmods-export/9B3jDfCy6eRvY5dn41WD5YahZGh8
βœ… Preview: https://nusmods-export-git-fork-seanlowjk-feat-63966d-nusmodifications.vercel.app

vercel[bot] avatar Dec 15 '21 09:12 vercel[bot]

@seanlowjk is attempting to deploy a commit to the NUSMods Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 15 '21 09:12 vercel[bot]

Codecov Report

Merging #3373 (d75a7d9) into master (71c93aa) will increase coverage by 0.06%. The diff coverage is 56.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3373      +/-   ##
==========================================
+ Coverage   53.08%   53.15%   +0.06%     
==========================================
  Files         270      274       +4     
  Lines        5745     5941     +196     
  Branches     1327     1374      +47     
==========================================
+ Hits         3050     3158     +108     
- Misses       2695     2783      +88     
Impacted Files Coverage Ξ”
website/src/entry/export/TimetableOnly.tsx 0.00% <0.00%> (ΓΈ)
website/src/reducers/index.ts 100.00% <ΓΈ> (ΓΈ)
website/src/types/reducers.ts 100.00% <ΓΈ> (ΓΈ)
website/src/views/timetable/CustomModuleEdit.tsx 0.00% <0.00%> (ΓΈ)
website/src/views/timetable/ModuleTombstone.tsx 40.00% <ΓΈ> (ΓΈ)
website/src/views/timetable/ModulesSelect.tsx 80.00% <ΓΈ> (ΓΈ)
website/src/views/timetable/TimetableContent.tsx 50.40% <33.33%> (-3.73%) :arrow_down:
website/src/views/timetable/CustomModuleModal.tsx 47.31% <47.31%> (ΓΈ)
website/src/utils/modules.ts 96.92% <50.00%> (-1.49%) :arrow_down:
...ite/src/views/timetable/ModulesSelectContainer.tsx 68.42% <50.00%> (-2.17%) :arrow_down:
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 71c93aa...d75a7d9. Read the comment docs.

codecov[bot] avatar Dec 15 '21 09:12 codecov[bot]

Hi, may I if this pr is being actively considered? I want a similar feature and found this pr to be adequate. Any changes or improvements to be made?

vimuthm avatar Aug 07 '22 14:08 vimuthm