From 524f0d620f47559f46c8bddd7bf59fb99d304bf1 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Sun, 18 Jan 2026 14:53:43 -0500 Subject: [PATCH] Notifications: expand link below the body, don't force expand notifications with actions. --- .../NotificationHistoryPanel.qml | 52 +++++++++---------- Scripts/dev/notifications-test.sh | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 18ee752a5..ef9762801 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -334,7 +334,7 @@ SmartPanel { property string notificationId: model.id property bool isExpanded: scrollView.expandedId === notificationId - property bool canExpand: summaryText.truncated || bodyText.truncated || (actionsList.length > 0) // Explicitly allow expand if actions exist + property bool canExpand: summaryText.truncated || bodyText.truncated // Parse actions safely property var actionsList: { @@ -470,31 +470,6 @@ SmartPanel { visible: text.length > 0 } - // Actions Flow - Flow { - width: parent.width - spacing: Style.marginS - visible: notificationDelegate.actionsList.length > 0 - - Repeater { - model: notificationDelegate.actionsList - delegate: NButton { - text: modelData.text - fontSize: Style.fontSizeS - backgroundColor: Color.mPrimary - textColor: Color.mOnPrimary - outlined: false - implicitHeight: 24 - - // Capture modelData in a property to avoid reference errors - property var actionData: modelData - onClicked: { - NotificationService.invokeAction(notificationDelegate.notificationId, actionData.identifier); - } - } - } - } - // Expand indicator Row { width: parent.width @@ -520,6 +495,31 @@ SmartPanel { color: Color.mPrimary } } + + // Actions Flow + Flow { + width: parent.width + spacing: Style.marginS + visible: notificationDelegate.actionsList.length > 0 + + Repeater { + model: notificationDelegate.actionsList + delegate: NButton { + text: modelData.text + fontSize: Style.fontSizeS + backgroundColor: Color.mPrimary + textColor: Color.mOnPrimary + outlined: false + implicitHeight: 24 + + // Capture modelData in a property to avoid reference errors + property var actionData: modelData + onClicked: { + NotificationService.invokeAction(notificationDelegate.notificationId, actionData.identifier); + } + } + } + } } // Delete button diff --git a/Scripts/dev/notifications-test.sh b/Scripts/dev/notifications-test.sh index ac6d74a7e..db985c871 100755 --- a/Scripts/dev/notifications-test.sh +++ b/Scripts/dev/notifications-test.sh @@ -46,7 +46,7 @@ gdbus call --session \ 0 \ "dialog-question" \ "Confirmation Required" \ - "Do you want to proceed with the action?" \ + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Do you want to proceed with the action? " \ "['default', 'OK', 'cancel', 'Cancel', 'maybe', 'Maybe', 'undecided', 'Undecided']" \ "{}" \ 5000