nusmodifications / nusmodifications/nusmods

Implement client-side data validation

Open
#606 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

better engineering user interface
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.json is received, check that all modules in the timetable still exists
  • When modules/<module code>.json is 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.