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 706891 - Add spinner to search popup
Add spinner to search popup
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on: 706715
Blocks:
 
 
Reported: 2013-08-27 14:01 UTC by Jonas Danielsson
Modified: 2013-08-29 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add spinner to search popup (6.31 KB, patch)
2013-08-27 14:02 UTC, Jonas Danielsson
needs-work Details | Review
Add spinner to search popup v2 (6.30 KB, patch)
2013-08-28 06:41 UTC, Jonas Danielsson
none Details | Review
Add spinner to search popup v3 (5.86 KB, patch)
2013-08-29 07:09 UTC, Jonas Danielsson
committed Details | Review
SearchPopup: Call columns autosize on show (1.12 KB, patch)
2013-08-29 07:12 UTC, Jonas Danielsson
committed Details | Review
SearchPopup: Call columns_autosize on show (1.11 KB, patch)
2013-08-29 12:48 UTC, Jonas Danielsson
committed Details | Review
Add spinner to search popup (5.85 KB, patch)
2013-08-29 12:48 UTC, Jonas Danielsson
committed Details | Review

Description Jonas Danielsson 2013-08-27 14:01:25 UTC
We should use GtkStack to have a spinner in the search popup that spins while searching.
Comment 1 Jonas Danielsson 2013-08-27 14:02:31 UTC
Created attachment 253246 [details] [review]
Add spinner to search popup
Comment 2 Jonas Danielsson 2013-08-27 14:03:05 UTC
The patch is based on a repo where bug#706715 is applied.
Comment 3 Zeeshan Ali 2013-08-27 15:26:09 UTC
Review of attachment 253246 [details] [review]:

Looks good otherwise.

::: src/search-popup.ui
@@ +31,3 @@
+            </child>
+            <child>
+              <object class="GtkGrid" id="spin-grid">

Why do we need a grid here?

::: src/searchPopup.js
@@ +122,3 @@
+        this._stack.set_visible_child(this._treeView);
+
+        if (this.get_visible() !== true)

No need to check for equality of booleans :)
Comment 4 Jonas Danielsson 2013-08-28 06:40:41 UTC
Review of attachment 253246 [details] [review]:

::: src/search-popup.ui
@@ +31,3 @@
+            </child>
+            <child>
+              <object class="GtkGrid" id="spin-grid">

I have it because without it the window jumps while going from a search were the popup has been resized to be larget to a search that fits in 500.

Having the grid helps with the resizing. I think we could also do a this._scrolledWindow.queue_draw() in showSpinner if you prefer.

::: src/searchPopup.js
@@ +122,3 @@
+        this._stack.set_visible_child(this._treeView);
+
+        if (this.get_visible() !== true)

I agree :)
Comment 5 Jonas Danielsson 2013-08-28 06:41:32 UTC
Created attachment 253342 [details] [review]
Add spinner to search popup v2
Comment 6 Zeeshan Ali 2013-08-28 14:51:48 UTC
Review of attachment 253246 [details] [review]:

::: src/search-popup.ui
@@ +31,3 @@
+            </child>
+            <child>
+              <object class="GtkGrid" id="spin-grid">

Seems very much like a work around then. Its fine for now as long as you add a FIXME comment explaining this.
Comment 7 Jonas Danielsson 2013-08-29 07:09:53 UTC
Created attachment 253469 [details] [review]
Add spinner to search popup v3

* Do not use a GtkGrid to house the spinner
Comment 8 Jonas Danielsson 2013-08-29 07:12:17 UTC
Created attachment 253470 [details] [review]
SearchPopup: Call columns autosize on show

Call treeView.columns_autosize in a show vfunc and not only for showing results.

This makes sure the search popup with a spinner on top does not stay large after a search that forced the search popup to grow.
Comment 9 Zeeshan Ali 2013-08-29 12:22:19 UTC
Review of attachment 253470 [details] [review]:

ACK if it works.
Comment 10 Zeeshan Ali 2013-08-29 12:26:26 UTC
Review of attachment 253469 [details] [review]:

ACK

side-note: Would be nice to move all these search handling away from MainWindow at some point (to perhaps a separate new class).
Comment 11 Jonas Danielsson 2013-08-29 12:48:13 UTC
The following fixes have been pushed:
b4aa85b SearchPopup: Call columns_autosize on show
7980928 Add spinner to search popup
Comment 12 Jonas Danielsson 2013-08-29 12:48:16 UTC
Created attachment 253496 [details] [review]
SearchPopup: Call columns_autosize on show

We want to make sure that the search popup only exceeds its standard
width when it has to. To avoid a larger popup for the spinner.
Comment 13 Jonas Danielsson 2013-08-29 12:48:20 UTC
Created attachment 253497 [details] [review]
Add spinner to search popup
Comment 14 Jonas Danielsson 2013-08-29 13:23:29 UTC
Review of attachment 253496 [details] [review]:

Commited.
Comment 15 Jonas Danielsson 2013-08-29 13:23:50 UTC
Review of attachment 253497 [details] [review]:

Commited.
Comment 16 Jonas Danielsson 2013-08-29 13:25:28 UTC
Review of attachment 253469 [details] [review]:

Commited
Comment 17 Jonas Danielsson 2013-08-29 13:25:44 UTC
Review of attachment 253470 [details] [review]:

Commited.