nusmodifications / nusmodifications/nusmods
Implement Module Planning Exercise form for NUS
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 364
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 14
Description
Umbrella issue that tracks the addition of an MPE feature to our planner (https://nusmods.com/planner). Hard deadline in March, but we'd like to complete this by the start of February.
cc @chuabingquan @williamhutech
Steps
Must have
- UI/UX design (both planner (if necessary) and MPE form, and associated user flows) (@williamhutech)
- Implement NUS Exchange auth serverless functions (#3217, #3242)
- Implement simple feature flag system (@taneliang, #3212)
- Implement MPE form in /website (after the first step, everything else can be done in parallel)
- Add an empty-ish
MpeContainercomponent on a new nusmods.com/mpe route. (#3159) - Add announcement bar behind the
enableMpefeature flag. - Add MPE page introduction content. (#3183)
- Add NUS log in button to MPE page (dependent on NUS auth serverless function)
- Implement NUS Exchange SAML token storage on frontend
- Implement form (can be in parallel with auth/auth button, just implement the UI first)
- Form should have an intuitive/helpful empty state
- Form should have an add module button
- Form should allow users to change the mod type
- Form should allow reordering of selected modules
- Form should display total MCs
- Form should limit number of mods to the total allowable no. MCs
- Implement autosave (may not be parallelizable with form implementation)
- Form should autosave on every operation if the browser is online
- Form should display saving errors
- Form should have a retry button (but this can be implemented last)
- Form should(?) be disabled when user goes offline. We have an
<Online>component andisOnlinevar in our Redux store that can be used for this -- see existing callsites for how to use it - Form should autosave immediately when coming back online
- Page should block navigation and reloads if form is dirty.
- Add an empty-ish
- Implement Vercel serverless functions (#3217, #3242; should be slightly different than the descriptions below)
- MPE form submission: /website/api/nus/mpe/submit.ts (which will be accessible at https://nusmods.com/api/mpe/submission)
- Function should verify SAML token.
- Function should accept JSON input through a POST request.
- Function should forward JSON input to VFS, automatically generating the correct filename from the SAML token.
- Function should not do anything if
enableMpe === false. (TODO)
- MPE submission retriever: /website/api/nus/mpe/submission.ts
- Function should verify SAML token.
- Function should retrieve and return the user's existing submission from VFS, automatically generating the correct filename.
- Function should not do anything if
enableMpe === false. (TODO)
- Add Vercel config (vercel.json) to redirect unrecognized nusmods.com/api/(.*) requests to api.nusmods.com/$1. (#3092)
- MPE form submission: /website/api/nus/mpe/submit.ts (which will be accessible at https://nusmods.com/api/mpe/submission)
Should have
- Lazy load
MpeContainer. Ideally this should be lazy loaded with react-loadable (since #2922 isn't ready) following /website/src/views/planner/PlannerContainer.
Could have
- Time-based MPE enable/disable, i.e. automatically enabling/disabling MPE during MPE periods based on the current datetime. We don't have to do this as we can just manually flip the feature flag and deploy when we want to enable/disable.
Won't have
- Bring Planner out of beta
- Integrate planner with MPE
Technical unknowns
To coordinate with NUSIT.
- NUS Exchange integration details
- VFS API
- MPE JSON file specification
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
The remaining work is under /website, centered on MpeContainer and the MPE route; review the existing Online component and Redux isOnline callsites first. Then inspect /website/api/nus/mpe/submit.ts and submission.ts for the enableMpe TODOs. Done means the listed offline, navigation, lazy-loading, and feature-flag requirements are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- api, backend, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100