[Bugfix:Notifications] Truncate reply/edit-reply Content#12790
Conversation
QuackHonk
left a comment
There was a problem hiding this comment.
I'm a little confused. When running the issue the instructor page does have the new thread expanded but not by a significant amount. When refreshing the page it does shrink to the normal amount. This occurs on both the main branch and your branch. Also the video is having some technical issues.
|
@QuackHonk I have fixed the issue of the instructor page does have the new thread expanded. Though I am not sure if this was to be addressed in this PR, because #12789 does not mention this. trunc.mp4Could you also please explain me the technical issues in the video? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12790 +/- ##
============================================
- Coverage 21.62% 21.61% -0.01%
Complexity 9824 9824
============================================
Files 268 268
Lines 36816 36818 +2
Branches 490 490
============================================
Hits 7960 7960
- Misses 28370 28372 +2
Partials 486 486
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
JManion32
left a comment
There was a problem hiding this comment.
I tested the initial commit and found that it solves the issue. I don't think the second change is necessary here. Just revert that commit and I will approve. Nice work!
c186724 to
6048743
Compare



Why is this Change Important & Necessary?
Fixes #12789
When a student edits a long forum reply post, the notification displayed to instructors and other subscribers on both the home screen and course notifications page was quoting the entire reply message verbatim. For lengthy posts (hundreds/thousands of characters), this resulted in overwhelming notification summaries.
This fix ensures edited post notifications are truncated to reasonable preview lengths, matching the behavior applied to other forum notifications (new thread, new reply announcements).
What is the New Behavior?
After: Edited post notifications now display truncated previews.
Reply.truncate.mp4
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
No new unit tests were added. This fix reuses the existing
previewText()helper function already in the codebase for similar truncation needs.Other Information
Implementation Detail: Reused existing
private function previewText()helper to maintain consistency with truncation applied to new thread/post notifications.