Skip to content
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
merged 10 commits into from
Oct 11, 2024

Conversation

jullia02
Copy link

@jullia02 jullia02 commented Oct 4, 2024

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 to src/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 to test/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

  • Unique tag of [COURSE FACULTY] and separation from normal user replies.
    Screenshot 2024-10-10 at 3 09 47 PM
  • Separate toggle for notification preferences for faculty replies in user settings.
Screenshot 2024-10-10 at 3 05 24 PM

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

@jullia02 jullia02 linked an issue Oct 4, 2024 that may be closed by this pull request
@jullia02 jullia02 added this to the Sprint 2 milestone Oct 4, 2024
@jullia02 jullia02 self-assigned this Oct 4, 2024
@coveralls
Copy link

coveralls commented Oct 9, 2024

Pull Request Test Coverage Report for Build 11264670343

Details

  • 14 of 15 (93.33%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 82.711%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/user/settings.js 2 3 66.67%
Totals Coverage Status
Change from base Build 11025903872: 0.004%
Covered Lines: 22348
Relevant Lines: 25602

💛 - Coveralls

@jullia02 jullia02 changed the title Added code to handle new course faculty type notifications and its settings. Handle new course faculty type notifications and user settings. Oct 9, 2024
@jullia02 jullia02 added the enhancement New feature or request label Oct 9, 2024
@jullia02 jullia02 requested a review from mhli1260 October 11, 2024 01:07
@mhli1260
Copy link

Your code looks good to me! Your commits were explanatory of the code you were updating, and your code looks well organized and formatted.

@mhli1260 mhli1260 merged commit 06b7a2d into f24 Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add another section in notification settings for course faculty replies.
3 participants