forked from CMU-313/cmu-313-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handle new course faculty type notifications and user settings. #33
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 11264670343Details
💛 - Coveralls |
Your code looks good to me! Your commits were explanatory of the code you were updating, and your code looks well organized and formatted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR solves issue #6
This PR adds code to successfully add a new notification type of course faculty reply. This is done by adding support to handle a new notification type to
install/data/defaults.json
,src/notifications.js
,src/upgrades/1.7.6/notification_types.js
,src/topics/create.js
,public/openapi/components/schemas/SettingsObj.yaml
and
notifications.json
of multiple languages (English UK, English US, French, Español, and Arabic).It also adds an upgrade script that is designed to add this new notification setting for all users in the system. (
src/upgrades/3.8.4/add_faculty_reply_notification_setting.js
). To reflect these changes in the notification settings, I added code tosrc/user/settings.js
. This added code handles user preference for this new notification feature. Lastly, I added basic test cases to test this new features functionality totest/notifications.js
.All these changes meet the acceptance criteria of having "An option to select notification preferences for course faculty replies appears on the settings page. Choosing an option successfully updates user notification preferences."
Reflection of Changes
Notes and Progress on Milestone
Underestimated time and effort required: I initially estimated this task to be around 6 hours as I thought I have completed the implementation of the notification on sprint 1 and only needed to work on making the button on the user settings page work. However, after learning more on how the user settings page works, I realize that the notification system from sprint 1 was not fully functional and required significant rework. It required modifications to the database schema and user preferences handling. As well as I realize I needed an upgrade script to add the new setting for all existing users which was an unexpected task. I also spent some time testing this feature and creating test cases to cover its functionality which is added in
test/notifications.js