nusmodifications / nusmodifications/nusmods
Implement client-side data validation
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 364
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 14
Description
Timetable configuration data on the client-side may become invalid for a number of reason
- Lessons get dropped (when there's not enough students in a class)
- Modules disappear
- Lesson timetable get published or updated
etc. etc. Whenever the client receives some data from the API, it should validate its existing timetable configuration data and implement some sanity checks:
- When
moduleList.jsonis received, check that all modules in the timetable still exists - When
modules/<module code>.jsonis received, check that- All lessons are filled
- All class no. are valid
If these invariants are violated, the app should inform the user in some way (which is why the issue has the user interface label) and take remedial actions, eg. fill up unfilled lesson slots with random timetable configuration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace where the client receives moduleList.json and modules/.json, then inspect how existing timetable configuration is stored and rendered. Add checks for missing modules, unfilled lessons, and invalid class numbers; done means violations are communicated to the user and the timetable receives a remedial action such as filling empty lesson slots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100