[Feature:InstructorUI] Format notification due dates#12846
[Feature:InstructorUI] Format notification due dates#12846AtCloudDiwash wants to merge 39 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12846 +/- ##
============================================
- Coverage 21.64% 21.63% -0.02%
- Complexity 9861 9871 +10
============================================
Files 268 268
Lines 36920 36938 +18
Branches 495 495
============================================
Hits 7990 7990
- Misses 28439 28457 +18
Partials 491 491
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
This PR heavily depends on whether #12844 gets merged, since it is an addition/enhancement to the changes introduced there. PR #12844 had some issues with how the data was being stored in the database. I felt it would be better practice to separate that concern into its own issue/PR instead of expanding the scope of #12844 further. So, this PR is intended to build on #12844. |
|
@jndlansh , this is the pr that fixes the issue related to notification panel. Could you please take a look at it. |
dagemcn
left a comment
There was a problem hiding this comment.
Refer to my review on PR#12844 for changes that should overlap with this PR. Also, one of the user date format preference migrations should be removed.
| :type database: migrator.db.Database | ||
| """ | ||
| database.execute(""" | ||
| ALTER TABLE users DROP COLUMN IF EXISTS date_format |
There was a problem hiding this comment.
We don't want to drop the column and lose data.
dagemcn
left a comment
There was a problem hiding this comment.
Functionality and code here look good. Tested persistence across log-outs, changing users and different tabs. I'll fully approve once PR#12844 gets merged.
dagemcn
left a comment
There was a problem hiding this comment.
Tested with light and dark mode, persists per account when switching accounts and when clearing cookies. Functionality and code look good. Good work on this.
dagemcn
left a comment
There was a problem hiding this comment.
After talking with our maintainers we would prefer to take a different approach instead of using a migration here. We think it is fine if new notifications are built using the current preference, but we don't need to go back and change all the old ones.
|
closing due to inactivity |
Fixes #12845
This PR is the intended to build on #12844
Why is this Change Important & Necessary?
Gradeable release notifications currently store the due date as part of the final notification message. Because of that, the displayed due date does not update when a user changes their selected date/time format preference.
This change stores the due date separately so notification banner dates can be formatted dynamically for the current user.
What is the New Behavior?
Gradeable release notifications now store extra metadata, including the gradeable title and raw due date.
When the notification is displayed, the due date is formatted using the current user’s selected date/time format. If metadata is missing, the old notification text is still used as a fallback.
What steps should a reviewer take to reproduce or test the bug or new feature?
This PR depends on the user date/time format preference feature. Test this after that PR is merged, or test from a branch that includes those changes.
Steps taken to solve
###Steps to run migration