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 754338 - Inactive time when creating the first collection
Inactive time when creating the first collection
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.17.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-31 08:36 UTC by Alessandro Bono
Modified: 2015-10-07 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
selections: Load spinner while creating first collection (2.26 KB, patch)
2015-08-31 08:38 UTC, Alessandro Bono
none Details | Review
proposed solution (184.79 KB, video/webm)
2015-08-31 15:39 UTC, Alessandro Bono
  Details
selections: Load spinner while creating first collection (2.91 KB, patch)
2015-10-07 13:17 UTC, Debarshi Ray
committed Details | Review

Description Alessandro Bono 2015-08-31 08:36:53 UTC
When you enter the name of your first collection (ie. in the "empty state"), it takes a moment before the database gets updated. Meanwhile, the dialog looks strangely greyed out.
Comment 1 Alessandro Bono 2015-08-31 08:38:40 UTC
Created attachment 310331 [details] [review]
selections: Load spinner while creating first collection
Comment 2 Alessandro Bono 2015-08-31 15:39:46 UTC
Created attachment 310371 [details]
proposed solution
Comment 3 Lapo Calamandrei 2015-10-07 11:23:07 UTC
Looks good to me, surelly an improvement wrt the previous behaviour
Comment 4 Allan Day 2015-10-07 11:44:14 UTC
Looks great!
Comment 5 Debarshi Ray 2015-10-07 13:14:21 UTC
Review of attachment 310331 [details] [review]:

Nice patch, Alessandro. One small thing:

::: data/ui/organize-collection-dialog.ui
@@ +93,3 @@
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <property name="active">True</property>

Instead of having it active all the time, I would make the extra effort to start it only when it is shown and then stopping it.

Otherwise it will needlessly keep the CPU busy.
Comment 6 Debarshi Ray 2015-10-07 13:17:06 UTC
Created attachment 312821 [details] [review]
selections: Load spinner while creating first collection

Start/stop the spinner when needed.
Comment 7 Debarshi Ray 2015-10-07 13:19:51 UTC
Some updates from #gtk+:
13:06 <rishi> What happens to a GtkSpinner (active=TRUE) that is in a GtkStack  
      but is not the visible widget? Is it still spinning and eating CPU?
13:08 * kalev had the same question the other day.
13:13 <rishi> kalev: I think it does because cosimoc said so in 2012, unless    
      gtk+ got smarter in the last 3 years.
13:13 <ebassi> Unless the style system is using child visibility to decide if   
      an animation should progress, then no: the spinner will continue          
      spinning
13:14 <rishi> ebassi: Ok.
13:15 <mclasen> we're certainly not drawing it
13:16 <mclasen> the expensive part is where it invalidates size and that        
      propagates all the way up to the toplevel
13:16 <ebassi> Yeah, the widget won't be drawn, but the style will be           
      invalidated, AFAIR
13:16 <mclasen> but we're fixing that
13:16 <mclasen> any day now, I hope

It's not a lot of effort to start/stop it, so let's take the defensive approach. Plus we need this in 3.18.x.
Comment 8 Debarshi Ray 2015-10-07 13:24:02 UTC
Comment on attachment 312821 [details] [review]
selections: Load spinner while creating first collection

Pushed to master and gnome-3-18.