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 699714 - appDisplay: Hide frequent view when app monitoring is disabled
appDisplay: Hide frequent view when app monitoring is disabled
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: 2013-05-05 17:18 UTC by Florian Müllner
Modified: 2013-06-05 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
appDisplay: Hide frequent view when app monitoring is disabled (2.00 KB, patch)
2013-05-05 17:18 UTC, Florian Müllner
needs-work Details | Review
Replace 'enable-app-monitoring' setting (5.27 KB, patch)
2013-05-05 17:24 UTC, Florian Müllner
committed Details | Review
appDisplay: Hide frequent view when app monitoring is disabled (2.12 KB, patch)
2013-05-05 17:44 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2013-05-05 17:18:47 UTC
See patch.
Comment 1 Florian Müllner 2013-05-05 17:18:51 UTC
Created attachment 243341 [details] [review]
appDisplay: Hide frequent view when app monitoring is disabled

Currently we stop monitoring application usage when disabling the
'enable-app-monitoring' setting, but we still expose previously
gathered data in the app picker's frequent view. This is not what
users should expect, so hide the view in that case.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-05-05 17:24:02 UTC
Review of attachment 243341 [details] [review]:

::: js/ui/appDisplay.js
@@ +427,3 @@
+        this._controls.visible = visibleViews > 1;
+        if (!enabled && this._views[Views.FREQUENT].view.actor.visible)
+            this._showView(Views.ALL);

Ideally, we'd make showView fail early if the view wasn't available. Would make the API easier for consumers.
Comment 3 Florian Müllner 2013-05-05 17:24:34 UTC
Created attachment 243345 [details] [review]
Replace 'enable-app-monitoring' setting

The org.gnome.desktop.privacy schema gained a 'remember-app-usage'
key, use that instead of our own preference.


Patch depends on bug 699715. See bug 699716 for a related privacy panel patch.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-05-05 17:27:22 UTC
Review of attachment 243345 [details] [review]:

OK.
Comment 5 Florian Müllner 2013-05-05 17:30:08 UTC
(In reply to comment #2)
> Review of attachment 243341 [details] [review]:
> 
> ::: js/ui/appDisplay.js
> @@ +427,3 @@
> +        this._controls.visible = visibleViews > 1;
> +        if (!enabled && this._views[Views.FREQUENT].view.actor.visible)
> +            this._showView(Views.ALL);
> 
> Ideally, we'd make showView fail early if the view wasn't available. Would make
> the API easier for consumers.

I don't see how that's related here? It certainly won't help with the code above (except that it assumes that Views.ALL will always be available). The code does basically:

  if (!enabled)
      this._showView(Views.ALL);

The additional condition is for the case that extensions have added additional views - if one of those has focus, there's no need to switch to the ALL view after hiding the frequent view.
Comment 6 Florian Müllner 2013-05-05 17:31:10 UTC
Comment on attachment 243341 [details] [review]
appDisplay: Hide frequent view when app monitoring is disabled

It's only half-generic though, the controls are either hidden or shown as a whole - should take the case into account where it remains visible after hiding the frequent view.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-05-05 17:35:00 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > Review of attachment 243341 [details] [review] [details]:
> > 
> > ::: js/ui/appDisplay.js
> > @@ +427,3 @@
> > +        this._controls.visible = visibleViews > 1;
> > +        if (!enabled && this._views[Views.FREQUENT].view.actor.visible)
> > +            this._showView(Views.ALL);
> > 
> > Ideally, we'd make showView fail early if the view wasn't available. Would make
> > the API easier for consumers.
> 
> I don't see how that's related here? It certainly won't help with the code
> above (except that it assumes that Views.ALL will always be available). The
> code does basically:

What I mean is that changing this._showView(Views.FREQUENT); to instead show the ALL view would solve that case.
Comment 8 Florian Müllner 2013-05-05 17:37:18 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > I don't see how that's related here? It certainly won't help with the code
> > above (except that it assumes that Views.ALL will always be available). The
> > code does basically:
> 
> What I mean is that changing this._showView(Views.FREQUENT); to instead show
> the ALL view would solve that case.

How? We don't ever call this._showView(Views.FREQUENT); in this method, nor do I think we should.
Comment 9 Florian Müllner 2013-05-05 17:44:11 UTC
Created attachment 243348 [details] [review]
appDisplay: Hide frequent view when app monitoring is disabled

Fixed problem noted in comment #6.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-05-14 18:09:32 UTC
Review of attachment 243348 [details] [review]:

OK.
Comment 11 Florian Müllner 2013-05-18 18:17:12 UTC
Attachment 243345 [details] pushed as 731e8bf - Replace 'enable-app-monitoring' setting
Attachment 243348 [details] pushed as f88d9c0 - appDisplay: Hide frequent view when app monitoring is disabled

Getting this off the list ...
Comment 12 Jakub Steiner 2013-06-05 11:21:22 UTC
I refrained from commenting, hoping to find a silver bullet, but that didn't happen. I don't think using "fake" data for the period of time when we don't yet have frequency is good (favorites). But this label gives off an "unfinished" vibe for a default state. 

There is something wrong about seeing a toggle to enable a view that's empty and telling me it's empty as the initial experience. 

Out of all the options, I like exposing all pass by default, without the view toggle at all. Only after you gather enough frequency data (5?), you present this option. 1 might be a more logical behavior, but presenting just a single item also has its downsides. I'd love to hear Jon chime in.