- 
                Notifications
    You must be signed in to change notification settings 
- Fork 174
Fix stories spurious 404 errors, allow stories to be configurable per-course #2721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Update persistence, types * Create toggle switches
* Update navigation bar for selective rendering * Update stories routes to be under "/courses/:courseId" * Add loader to stories routes
Only contact the stories backend when stories are enabled in the current course configuration.
| Pull Request Test Coverage Report for Build 7766771400
 
 
 💛 - Coveralls | 
Also adds the dispatch logic to previously missed action handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, requested changes have been fixed as discussed in person. Thanks!
Currently waiting for backend PR to merge before we proceed to merge this.
| 
 Backend PR has been merged! I'll set this to merge on successful CI. Thanks! | 
…-course (source-academy#2721) * Add `enableStories` field to course config * Update persistence, types * Create toggle switches * Use relative route paths for stories components * Only render Stories button when enabled for course * Update navigation bar for selective rendering * Update stories routes to be under "/courses/:courseId" * Add loader to stories routes * Fix spurious 404 errors Only contact the stories backend when stories are enabled in the current course configuration. * Create wrapper action to clear stories state * Handle stories state change on course config change * Update failing snapshots * Move clearing logic to BackendSaga Also adds the dispatch logic to previously missed action handlers.
Description
Relevant backend PR: source-academy/backend#1053 (must be merged before this can be merged)
Please refer to commits for full list of changes.
Allows stories state (enabled/disabled) to be configured on a per-course basis. When it is disabled, the frontend won't attempt to contact the stories backend for that particular course, thus removing the cause of the 404 error.
Also moves stories' routes under
/courses/:courseId, since it is now course-dependent.Type of change
How to test
Everything still works.
Checklist