After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739426 - Asking for permission to receive files should be a CRITICAL notification
Asking for permission to receive files should be a CRITICAL notification
Status: RESOLVED FIXED
Product: gnome-user-share
Classification: Core
Component: bluetooth
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-30 19:44 UTC by Mario Sánchez Prada
Modified: 2014-11-01 02:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal (1.01 KB, patch)
2014-10-30 19:46 UTC, Mario Sánchez Prada
needs-work Details | Review
Patch proposal (1.39 KB, patch)
2014-10-31 22:10 UTC, Mario Sánchez Prada
committed Details | Review

Description Mario Sánchez Prada 2014-10-30 19:44:14 UTC
The notification that is presented to the user when it's about to receive files over bluetooth is not the easiest one to use, as it:

- Expires very early as soon as the mouse starts moving, forcing the user to have to go to the messages tray to see it again and accept/decline the incoming file

- It shows up not in its full extension, so the Receive/Cancel buttons are only seen if you hover the notification, assuming you were fast enough to reach it before it hides :)

So, I think it would be better to make this notification CRITICAL, so it never expires until the user explicitly accepts or rejects it, and so it's shown in its full extension (showing buttons) right from the start
Comment 1 Mario Sánchez Prada 2014-10-30 19:46:23 UTC
Created attachment 289695 [details] [review]
Patch proposal
Comment 2 Bastien Nocera 2014-10-30 21:59:15 UTC
Review of attachment 289695 [details] [review]:

Ditto about the "obex: " prefix.

::: src/obexpush.c
@@ +242,3 @@
 						"bluetooth");
 
+	notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);

How does replace the "never expires" timeout fix it?
Should have both lines, even if the critical urgency behaves like the "never expires" timeout.
Comment 3 Mario Sánchez Prada 2014-10-30 22:14:31 UTC
(In reply to comment #2)
> Review of attachment 289695 [details] [review]:
> 
> Ditto about the "obex: " prefix.
> 
> ::: src/obexpush.c
> @@ +242,3 @@
>                          "bluetooth");
> 
> +    notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
> 
> How does replace the "never expires" timeout fix it?
> Should have both lines, even if the critical urgency behaves like the "never
> expires" timeout.

The CRITICAL urgency implies that the notification never expires until explicitly dismissed, so the two lines are not needed.

From https://developer.gnome.org/notification-spec/:
"""
Critical notifications should not automatically expire, as they are things that the user will most likely want to know about. They should only be closed when the user dismisses them, for example, by clicking on the notification.
"""

Also, from gnome-shell:js/ui/messageTray.js:

      [...]
      } else if (this._notificationState == State.SHOWN) {
            let expired = (this._userActiveWhileNotificationShown &&
                           this._notificationTimeoutId == 0 &&
                           this._notification.urgency != Urgency.CRITICAL &&
                           !this._notification.focused &&
                           !this._pointerInNotification) || this._notificationExpired;
            let mustClose = (this._notificationRemoved || !hasNotifications || expired || this._traySummoned);
      [...]


...it confirms that the notification won't expire if it's marked as CRITICAL, so this is why I think this might be the right fix (although I recognise that initially I had the two lines).
Comment 4 Mario Sánchez Prada 2014-10-30 22:22:59 UTC
Hmm.. .just realized that my previous comment might look as if I strongly opposed to having both lines, which I don't. I was just trying to explain why it's not needed, but if we prefer to leave it for other reasons (e.g. readability?) I'm fine with it too.
Comment 5 Bastien Nocera 2014-10-31 12:23:06 UTC
(In reply to comment #4)
> Hmm.. .just realized that my previous comment might look as if I strongly
> opposed to having both lines, which I don't. I was just trying to explain why
> it's not needed, but if we prefer to leave it for other reasons (e.g.
> readability?) I'm fine with it too.

I'd rather it was there as well, as it helps readability. The chunk from the notification spec should probably also be in the commit message.
Comment 6 Mario Sánchez Prada 2014-10-31 21:53:39 UTC
Ok, I'll prepare a new patch adding that line then and the chunk from the spec too
Comment 7 Mario Sánchez Prada 2014-10-31 22:10:30 UTC
Created attachment 289762 [details] [review]
Patch proposal
Comment 8 Bastien Nocera 2014-11-01 00:04:14 UTC
Review of attachment 289762 [details] [review]:

Looks good.
Comment 9 Mario Sánchez Prada 2014-11-01 02:04:25 UTC
Thanks. Just committed it to the master branch