From ad90b89d25f3535bc8e26196016e0267eff0e4b0 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 19 Jan 2026 12:58:43 +0530 Subject: [PATCH] fix: restrict comments in notifications to 3 lines --- frontend/src/pages/Notifications.vue | 8 ++++---- frontend/tailwind.config.js | 2 +- lms/lms/utils.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/Notifications.vue b/frontend/src/pages/Notifications.vue index 8e9afeb4..238df516 100644 --- a/frontend/src/pages/Notifications.vue +++ b/frontend/src/pages/Notifications.vue @@ -26,7 +26,7 @@ class="flex space-x-2 px-2 py-4" :class="{ 'cursor-pointer': log.link, - 'items-center': !showDetails(log) && !isMention(log), + 'items-center': !showDetails(log) && !isMentionOrComment(log), }" @click="navigateToPage(log)" > @@ -56,9 +56,9 @@
{ } } -const isMention = (log) => { +const isMentionOrComment = (log) => { if (log.type == 'Mention') { return true } diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index e0f7f20a..8fa1d634 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -21,5 +21,5 @@ export default { }, }, }, - plugins: [], + plugins: [require('@tailwindcss/line-clamp')], } diff --git a/lms/lms/utils.py b/lms/lms/utils.py index 166745ca..88bc96d0 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -421,7 +421,7 @@ def get_batch_details_for_notification(topic): users = [] batch_title = frappe.db.get_value("LMS Batch", topic.reference_docname, "title") subject = _("New comment in batch {0}").format(batch_title) - link = f"/lms/batches/{topic.reference_docname}" + link = f"/lms/batches/{topic.reference_docname}#discussions" instructors = frappe.db.get_all( "Course Instructor", {"parenttype": "LMS Batch", "parent": topic.reference_docname},