nusmods
nusmods copied to clipboard
Implement Module Planning Exercise form for NUS
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
- [x] UI/UX design (both planner (if necessary) and MPE form, and associated user flows) (@williamhutech)
- [x] Implement NUS Exchange auth serverless functions (#3217, #3242)
- [x] Implement simple feature flag system (@taneliang, #3212)
- [ ] Implement MPE form in /website (after the first step, everything else can be done in parallel)
- [x] Add an empty-ish
MpeContainercomponent on a new nusmods.com/mpe route. (#3159) - [x] Add announcement bar behind the
enableMpefeature flag. - [x] Add MPE page introduction content. (#3183)
- [x] Add NUS log in button to MPE page (dependent on NUS auth serverless function)
- [x] Implement NUS Exchange SAML token storage on frontend
- [x] Implement form (can be in parallel with auth/auth button, just implement the UI first)
- [x] Form should have an intuitive/helpful empty state
- [x] Form should have an add module button
- [x] Form should allow users to change the mod type
- [x] Form should allow reordering of selected modules
- [x] Form should display total MCs
- [x] Form should limit number of mods to the total allowable no. MCs
- [x] Implement autosave (may not be parallelizable with form implementation)
- [x] Form should autosave on every operation if the browser is online
- [x] Form should display saving errors
- [x] 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.
- [x] Add an empty-ish
- [x] Implement Vercel serverless functions (#3217, #3242; should be slightly different than the descriptions below)
- [x] MPE form submission: /website/api/nus/mpe/submit.ts (which will be accessible at https://nusmods.com/api/mpe/submission)
- [x] Function should verify SAML token.
- [x] Function should accept JSON input through a POST request.
- [x] 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)
- [x] MPE submission retriever: /website/api/nus/mpe/submission.ts
- [x] Function should verify SAML token.
- [x] 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)
- [x] Add Vercel config (vercel.json) to redirect unrecognized nusmods.com/api/(.*) requests to api.nusmods.com/$1. (#3092)
- [x] 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.
- [x] NUS Exchange integration details
- [x] VFS API
- [x] MPE JSON file specification
I'll be doing 'Add an empty-ish MpeContainer component on a new nusmods.com/mpe route.'
I'll be doing 'Add MPE page introduction content.'
I'm going to 'Add the MPE page UI (draft)'.