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 723179 - Support the extended folders schema
Support the extended folders schema
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-28 17:42 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-01-29 19:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
appDisplay: Properly check for TerminalEmulator in the Categories key (1.42 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
appDisplay: Only reload frequently used data when mapping the frequent view (3.04 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
appDisplay: Make AllView handle the display of the all apps view (7.20 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
appDisplay: Make refiltering folders more efficient (5.43 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
appDisplay: Support the 'categories' key for app folders (2.00 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
appDisplay; Support the 'excluded-apps' key for app folders (1.06 KB, patch)
2014-01-28 17:42 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
appDisplay: Make AllView handle the display of the all apps view (7.20 KB, patch)
2014-01-28 18:33 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
appDisplay: Make refiltering folders more efficient (6.13 KB, patch)
2014-01-28 18:33 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
appDisplay: Support the 'categories' key for app folders (1.93 KB, patch)
2014-01-28 18:33 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
appDisplay: Support the 'excluded-apps' key for app folders (946 bytes, patch)
2014-01-28 18:33 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
appDisplay: Only reload frequently used data when mapping the frequent view (3.13 KB, patch)
2014-01-28 18:36 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
appDisplay: Make refiltering folders more efficient (7.65 KB, patch)
2014-01-28 21:30 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:23 UTC
This will allow us to reimplement folders like "Games" and "Wine" on
the new system.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:26 UTC
Created attachment 267422 [details] [review]
appDisplay: Properly check for TerminalEmulator in the Categories key

get_categories() returns an unparsed string, not a list of categories.
We need to parse the list by splitting on ';' to deterine whether the
actual 'TerminalEmulator' category is in the list, rather than something
like 'X-GNOME-TerminalEmulator'. It's an edge case, but I need to split
the list properly for the new folders, so I might as well fix this.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:29 UTC
Created attachment 267423 [details] [review]
appDisplay: Only reload frequently used data when mapping the frequent view

If the user mostly uses the All Apps view and uses it as his default view,
we shouldn't reload frequent data after a timeout. Simply do it when the
view is mapped.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:33 UTC
Created attachment 267424 [details] [review]
appDisplay: Make AllView handle the display of the all apps view

Rather than having the central component handle it. Just a code tidying-up.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:36 UTC
Created attachment 267425 [details] [review]
appDisplay: Make refiltering folders more efficient

Rather than queueing a full redisplay, simply filter the apps inside
folders by toggling the icon's visibility.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:40 UTC
Created attachment 267426 [details] [review]
appDisplay: Support the 'categories' key for app folders
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-01-28 17:42:43 UTC
Created attachment 267427 [details] [review]
appDisplay; Support the 'excluded-apps' key for app folders
Comment 7 Giovanni Campagna 2014-01-28 18:11:13 UTC
Review of attachment 267422 [details] [review]:

Yes
Comment 8 Giovanni Campagna 2014-01-28 18:13:16 UTC
Review of attachment 267424 [details] [review]:

Yes
Comment 9 Giovanni Campagna 2014-01-28 18:15:52 UTC
Review of attachment 267426 [details] [review]:

::: js/ui/appDisplay.js
@@ +67,3 @@
+            if (itemA == itemB)
+                return true;
+        }

b.indexOf(itemA) >= 0 ?
Comment 10 Giovanni Campagna 2014-01-28 18:17:38 UTC
Review of attachment 267427 [details] [review]:

::: js/ui/appDisplay.js
@@ +1061,3 @@
 
+            if (excludedApps.indexOf(appId) >= 0)
+                return;

Kinda ugh looking at the linear search, I'd much rather use a hash map here, because this is called often if the folder is crowded.
Nevertheless, I agree the excluded list should be empty or very limited anyway, so I'm ok with this.
Comment 11 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:32:59 UTC
Comment on attachment 267422 [details] [review]
appDisplay: Properly check for TerminalEmulator in the Categories key

Attachment 267422 [details] pushed as 887a21a - appDisplay: Properly check for TerminalEmulator in the Categories key
Comment 12 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:33:32 UTC
Created attachment 267430 [details] [review]
appDisplay: Make AllView handle the display of the all apps view

Rather than having the central component handle it. Just a code tidying-up.
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:33:38 UTC
Created attachment 267431 [details] [review]
appDisplay: Make refiltering folders more efficient

Rather than queueing a full redisplay, simply filter the apps inside
folders by toggling the icon's visibility.
Comment 14 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:33:44 UTC
Created attachment 267432 [details] [review]
appDisplay: Support the 'categories' key for app folders
Comment 15 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:33:50 UTC
Created attachment 267433 [details] [review]
appDisplay: Support the 'excluded-apps' key for app folders
Comment 16 Jasper St. Pierre (not reading bugmail) 2014-01-28 18:36:44 UTC
Created attachment 267434 [details] [review]
appDisplay: Only reload frequently used data when mapping the frequent view

If the user mostly uses the All Apps view and uses it as his default view,
we shouldn't reload frequent data after a timeout. Simply do it when the
view is mapped.
Comment 17 Giovanni Campagna 2014-01-28 18:40:49 UTC
Review of attachment 267434 [details] [review]:

Ok
Comment 18 Giovanni Campagna 2014-01-28 18:41:06 UTC
Review of attachment 267430 [details] [review]:

Yes, as before.
Comment 19 Giovanni Campagna 2014-01-28 18:43:31 UTC
Review of attachment 267431 [details] [review]:

::: js/ui/appDisplay.js
@@ +385,3 @@
+    _resortGrid: function() {
+        this._grid.destroyAll();
+        this.loadGrid();

As you mentioned, clutter_actor_new() is what takes most time in profile. But you can avoid it, if you push this resort() down to BaseIcon, and remove/sort/add the existing actors.

@@ +1050,3 @@
+        this.name = _getFolderName(this._folder);
+        this.icon.label.text = this.name;
+        this.emit('name-changed');

There is no point in two signals, if you always emit both of them. Instead, check if the name is different than before.
Comment 20 Giovanni Campagna 2014-01-28 18:43:51 UTC
Review of attachment 267432 [details] [review]:

Yes
Comment 21 Giovanni Campagna 2014-01-28 18:44:14 UTC
Review of attachment 267433 [details] [review]:

Ok
Comment 22 Jasper St. Pierre (not reading bugmail) 2014-01-28 21:30:21 UTC
Created attachment 267446 [details] [review]
appDisplay: Make refiltering folders more efficient

Rather than queueing a full redisplay, simply filter the apps inside
folders by toggling the icon's visibility.
Comment 23 Giovanni Campagna 2014-01-29 19:03:58 UTC
Review of attachment 267446 [details] [review]:

Awesome. Only moving the one element that changed is a nice touch.
Comment 24 Jasper St. Pierre (not reading bugmail) 2014-01-29 19:04:59 UTC
Attachment 267430 [details] pushed as 3779ac2 - appDisplay: Make AllView handle the display of the all apps view
Attachment 267432 [details] pushed as bb8fa61 - appDisplay: Support the 'categories' key for app folders
Attachment 267433 [details] pushed as bb8397b - appDisplay: Support the 'excluded-apps' key for app folders
Attachment 267434 [details] pushed as bdad4db - appDisplay: Only reload frequently used data when mapping the frequent view
Attachment 267446 [details] pushed as 10147ee - appDisplay: Make refiltering folders more efficient