Skip to content

feat: notification interactions & lock screen privacy - #11

Open
TraNzeM wants to merge 3 commits into
StatIndet:mainfrom
TraNzeM:feat/notification-interactions-and-lock-privacy
Open

feat: notification interactions & lock screen privacy#11
TraNzeM wants to merge 3 commits into
StatIndet:mainfrom
TraNzeM:feat/notification-interactions-and-lock-privacy

Conversation

@TraNzeM

@TraNzeM TraNzeM commented Aug 27, 2026

Copy link
Copy Markdown

What

Notification UX improvements and lock screen privacy, following modern practices (GNOME 46+, KDE Plasma, Windows 11, Android).

1. Popup interactions (Keystone NotificationContent)

  • Hover expands the popup: reveals action buttons + inline reply field (clicks on the body still activate the app)
  • Inline reply with focus handling — keyboard focus is returned to the app after reply/close (was stuck before)
  • Fixed jitter on hover: switched to HoverHandler (nested MouseAreas caused collapse/expand loop)
  • Progress bar + auto-hide timer pause while hovering
  • Urgency color strip: Critical → error color, Low → subtext, Normal → primary

2. Notification center click-to-activate

  • Left click on a notification in the center now activates the app (default action per freedesktop spec)
  • Collapsed multi-notification group → expand on click; single → open app
  • Existing gestures preserved (middle-click dismiss, swipe-to-dismiss)

3. Lock screen notification privacy (Android-style)

Three modes in Keystone settings (通知隐私 / Notification privacy):

  • show — show full content (default)
  • hide-content — app icon/name/time visible, text hidden with visibility_off placeholder
  • hide-all — notification card hidden entirely

Persisted in ui-preferences.json (lockScreenNotificationPrivacy).

4. i18n — all three locales

New strings added to en_US, zh_CN, zh_TW (.ts + rebuilt .qm, 1403 translations per locale, 0 unfinished).

Files

  • Services/NotificationManager.qml — inline-reply capability, invokeDefaultAction, sendInlineReply, timeout resume
  • Services/UiPreferences.qmllockScreenNotificationPrivacy + persistence
  • Modules/Keystone/NotificationContent/NotificationContent.qml — hover actions, reply, urgency strip
  • Modules/Keystone/Styles/Shared/KeystoneSurface.qml — dynamic popup height, keyboard focus for reply
  • Modules/Sidebars/Left/notifications/NotificationGroup.qml, NotificationItem.qml — click-to-activate
  • Modules/Lock/Cards/NotificationCard.qml — privacy modes
  • Modules/ControlCenter/KeystonePage.qml — privacy setting UI
  • i18n/clavis_{en_US,zh_CN,zh_TW}.ts — translations

Quality

  • git diff --check, lint-qml.sh passed, CTest 10/10, CMake build clean
  • Note: format-qml.sh --check on NotificationManager.qml fails on the current qmlformat (1.0, qt6-declarative 6.11.2) due to pragma ComponentBehavior: Bound — pre-existing issue, also fails on the file from upstream HEAD

- 弹出通知: hover 展开操作按钮、inline reply、点击跳转应用、urgency 色条
- 通知中心: 点击通知跳转应用、分组展开逻辑
- 锁屏通知隐私: 显示内容/隐藏内容/全部隐藏 (Keystone 设置)
- i18n: en_US/zh_CN/zh_TW 三语言
@TraNzeM
TraNzeM force-pushed the feat/notification-interactions-and-lock-privacy branch from 501d8dd to 4ea5530 Compare August 27, 2026 10:40
Клик по телу уведомления теперь активирует приложение даже когда у
уведомления нет действий (default action) или оно загружено из истории
без живого серверного объекта. desktopEntry персистится в JSON и
используется как fallback через gtk-launch (freedesktop).
Clicking a notification body now resolves the target app through
DesktopEntries.heuristicLookup(appName) when the server notification has
no actions and desktopEntry is empty (Quickshell only fills desktopEntry
from an explicit DBus hint 'desktop-entry', which most apps omit).

Previously the click just dismissed the notification whenever
desktopEntry was unset; appName (e.g. org.telegram.desktop) now maps to
the real .desktop id so gtk-launch can bring the app to focus.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant