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 691900 - offer system actions in shell search
offer system actions in shell search
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: search
3.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
ux
: 724805 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-16 23:19 UTC by William Jon McCann
Modified: 2017-08-22 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
system: prevent leaving the overview on system actions (1.51 KB, patch)
2017-08-22 09:09 UTC, Florian Müllner
none Details | Review
system: Split out system actions to its own module (33.28 KB, patch)
2017-08-22 09:09 UTC, Florian Müllner
committed Details | Review
systemActions: Store properties in a map (8.69 KB, patch)
2017-08-22 09:09 UTC, Florian Müllner
none Details | Review
systemActions: Make actions searchable (6.10 KB, patch)
2017-08-22 09:09 UTC, Florian Müllner
none Details | Review
appDisplay: Include system actions in search results (4.87 KB, patch)
2017-08-22 09:10 UTC, Florian Müllner
committed Details | Review
system: Don't leave overview when activating most items (1.71 KB, patch)
2017-08-22 10:51 UTC, Florian Müllner
committed Details | Review
systemActions: Store properties in a map (8.66 KB, patch)
2017-08-22 10:52 UTC, Florian Müllner
committed Details | Review
systemActions: Make actions searchable (6.21 KB, patch)
2017-08-22 10:53 UTC, Florian Müllner
committed Details | Review

Description William Jon McCann 2013-01-16 23:19:38 UTC
One thing I've seen come up in user testing is a roadblock when the overview search isn't able to find a system action. This is shocking to people because it appears the shell search can find anything.

For example, many of the actions in the "user menu" are not found by search: Power Off, Lock, Log Out, maybe others.

One idea is that we can have the shell fake up application/action targets in the search results for these things. They wouldn't appear in the application view but could still appear in the results. They could be differentiated from applications by their appearance - being symbolic and uncolored.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-01-17 01:02:19 UTC
Should they be grid results, or list results?
Comment 2 Allan Day 2013-08-18 14:38:35 UTC
(In reply to comment #1)
> Should they be grid results, or list results?

Grid, I'd say.
Comment 3 Allan Day 2014-02-20 15:41:20 UTC
*** Bug 724805 has been marked as a duplicate of this bug. ***
Comment 4 Anup 2014-03-13 16:57:26 UTC
Hi, 

I am interested in working on this bug. So please can you assign this bug to me?

Thanks in advance,

Regards,
Anup
Comment 5 Owen Taylor 2014-03-13 22:12:59 UTC
We don't do bug assignments lie(In reply to comment #4)
> Hi, 
> 
> I am interested in working on this bug. So please can you assign this bug to
> me?

Hi Anup - it's great that you want to work on this! We usually don't do bug assignments - your comment is enough to mark that you are interested in it, and let people know to contact you if they are interested in the status.
Comment 6 lof 2015-07-31 12:24:26 UTC
(In reply to Anup from comment #4)
> I am interested in working on this bug. 

Hello Anup, 

have you made any progress?
Comment 7 p.oliveira.castro 2015-09-30 02:03:59 UTC
I would like to hear news regarding this bug. This kind of feature would make me much more productive.
Comment 8 Allan Day 2017-03-29 11:53:13 UTC
A visual treatment for this feature can be found here:

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/shell/search/search-list-layout.png
Comment 9 Florian Müllner 2017-08-22 09:08:10 UTC
As this came up earlier: This bug has been part of Rares' GSoC project, but we agreed to do code reviews on our gitlab test instance to get familiar with the new workflow.
Comment 10 Florian Müllner 2017-08-22 09:09:28 UTC
Created attachment 358117 [details] [review]
system: prevent leaving the overview on system actions

Due to the fact that leaving the overview is an old
behavior it is not deprecated and unnecessary for
most actions, except the settings one. The settings
system action opens an app, therefore leaving the
overview makes sense.
Comment 11 Florian Müllner 2017-08-22 09:09:36 UTC
Created attachment 358118 [details] [review]
system: Split out system actions to its own module

In anticipation of showing the system actions in
the search results, it is fit to move action
specific code to its own module in order to
reuse it.
Comment 12 Florian Müllner 2017-08-22 09:09:47 UTC
Created attachment 358119 [details] [review]
systemActions: Store properties in a map

It is more convenient and structured to use a
map in order to store system actions and their
properties. The current changes are an improvement
over the classic instance properties because
it provides clarity and ease of management.
Comment 13 Florian Müllner 2017-08-22 09:09:54 UTC
Created attachment 358120 [details] [review]
systemActions: Make actions searchable

Every action has specific associated terms that
identify that action and show it in the search
results. Methods to match the actions as well
as getting properties of specific actions are
needed in order to provide a way of using the
actions.
Comment 14 Florian Müllner 2017-08-22 09:10:03 UTC
Created attachment 358121 [details] [review]
appDisplay: Include system actions in search results

The way system actions are displayed in the search
results is by appending them at the end of the list
returned by the ApplicationProvider.
Comment 15 Florian Müllner 2017-08-22 09:37:25 UTC
Review of attachment 358117 [details] [review]:

The commit message needs a bit of work - at the very least:
 - nothing is "prevented", leaving the overview is just no longer
   part of the action. So something like:
   "system: Don't leave overview when activating most items"
 - "it is not deprecated" => "it is now deprecated"
   Not that 'deprecated' makes a lot of sense in that context;
   better mention that the previous behavior was done for
   technical reasons that no longer apply

So my take would be along the lines of:

system: Don't leave overview when activating most items

The current behavior wasn't designed, but was introduced in commit
84efaac52b to work around technical limitations when we were still
using external tools like gnome-screensaver or gnome-session-quit
to handle the actions. Those limitations are long gone, so it makes
sense to make the actions consistent with the corresponding keyboard
shortcuts: Leave the overview when launching an application, and leave
it alone otherwise.
Comment 16 Florian Müllner 2017-08-22 09:37:37 UTC
Review of attachment 358118 [details] [review]:

OK
Comment 17 Florian Müllner 2017-08-22 09:38:24 UTC
Review of attachment 358119 [details] [review]:

The commit message doesn't make sense - you'll have a hard time arguing that

  this._actions.get(POWER_OFF_ACTION_ID).available

is clearer and more convenient than

  this._canPowerOff

This only makes sense in the context of the future search feature, so the commit message needs to mention it.
Comment 18 Florian Müllner 2017-08-22 09:38:39 UTC
Review of attachment 358120 [details] [review]:

::: js/misc/systemActions.js
@@ +97,3 @@
         this._actions.set(POWER_OFF_ACTION_ID,
+                          { // Translators: The name of the power-off action in search
+                            name: _("Power off"),

As suggested by Piotr on gnome-i18n, it is a good idea to add context here:
C_("search-result", "Power off")
Comment 19 Florian Müllner 2017-08-22 09:38:49 UTC
Review of attachment 358121 [details] [review]:

Please remember to push the style changes to gnome-shell-sass and update the submodule before pushing this commit.
Comment 20 Florian Müllner 2017-08-22 10:51:50 UTC
Created attachment 358127 [details] [review]
system: Don't leave overview when activating most items

Updated commit message.
Comment 21 Florian Müllner 2017-08-22 10:52:26 UTC
Created attachment 358128 [details] [review]
systemActions: Store properties in a map

Updated commit message.
Comment 22 Florian Müllner 2017-08-22 10:53:22 UTC
Created attachment 358129 [details] [review]
systemActions: Make actions searchable

Add context to strings
Comment 23 Florian Müllner 2017-08-22 11:17:34 UTC
Attachment 358118 [details] pushed as 9c3b332 - system: Split out system actions to its own module
Attachment 358121 [details] pushed as 52f6047 - appDisplay: Include system actions in search results
Attachment 358127 [details] pushed as 7d95275 - system: Don't leave overview when activating most items
Attachment 358128 [details] pushed as b4b1caf - systemActions: Store properties in a map
Attachment 358129 [details] pushed as 595065b - systemActions: Make actions searchable