From 9d76e7e30bbfc71d2a41b73eb6b85ec12236d955 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 16 Jul 2025 17:41:29 -0400 Subject: [PATCH] Show ellipses for leaving rooms and space actions, and always confirm The HIG suggests using ellipses for actions that have a confirmation, and leaving a space or room is one such cases. Otherwise, the user has no idea if leaving is an immediate, irreversible action. It turns out there *was* some cases where pressing this button (especially for spaces) would actually do it without confirmation, which is now fixed. --- src/roominfo/RoomInformation.qml | 2 +- src/rooms/RoomContextMenu.qml | 2 +- src/rooms/SpaceListContextMenu.qml | 6 ++++-- src/spaces/SpaceHomePage.qml | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/roominfo/RoomInformation.qml b/src/roominfo/RoomInformation.qml index cfccf0edf..a89189e1f 100644 --- a/src/roominfo/RoomInformation.qml +++ b/src/roominfo/RoomInformation.qml @@ -153,7 +153,7 @@ QQC2.ScrollView { Delegates.RoundedItemDelegate { id: leaveButton icon.name: "arrow-left-symbolic" - text: root.room.isSpace ? i18nc("@action:button", "Leave this space") : i18nc("@action:button", "Leave this room") + text: root.room.isSpace ? i18nc("@action:button", "Leave this space…") : i18nc("@action:button", "Leave this room…") activeFocusOnTab: true Layout.fillWidth: true diff --git a/src/rooms/RoomContextMenu.qml b/src/rooms/RoomContextMenu.qml index ed573e199..cac2680c0 100644 --- a/src/rooms/RoomContextMenu.qml +++ b/src/rooms/RoomContextMenu.qml @@ -152,7 +152,7 @@ KirigamiComponents.ConvergentContextMenu { } QQC2.Action { - text: i18n("Leave Room") + text: i18n("Leave Room…") icon.name: "go-previous" onTriggered: { Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog').createObject(root.QQC2.ApplicationWindow.window, { diff --git a/src/rooms/SpaceListContextMenu.qml b/src/rooms/SpaceListContextMenu.qml index b5ea3d4c0..b0a22b19c 100644 --- a/src/rooms/SpaceListContextMenu.qml +++ b/src/rooms/SpaceListContextMenu.qml @@ -70,8 +70,10 @@ KirigamiComponents.ConvergentContextMenu { } QQC2.Action { - text: i18nc("'Space' is a matrix space", "Leave Space") + text: i18nc("'Space' is a matrix space", "Leave Space…") icon.name: "go-previous" - onTriggered: root.room.forget() + onTriggered: Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog').createObject(root.QQC2.ApplicationWindow.window, { + room: root.room + }).open(); } } diff --git a/src/spaces/SpaceHomePage.qml b/src/spaces/SpaceHomePage.qml index 176361576..e738875ae 100644 --- a/src/spaces/SpaceHomePage.qml +++ b/src/spaces/SpaceHomePage.qml @@ -95,9 +95,11 @@ ColumnLayout { } } QQC2.Button { - text: i18nc("@action:button", "Leave this space") + text: i18nc("@action:button", "Leave this space…") icon.name: "go-previous" - onClicked: root.room.forget() + onClicked: Qt.createComponent('org.kde.neochat', 'ConfirmLeaveDialog').createObject(root.QQC2.ApplicationWindow.window, { + room: root.room + }).open(); } Item { Layout.fillWidth: true