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 671980 - Improving the design of the online-accounts panel
Improving the design of the online-accounts panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Online Accounts
git master
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
Control-Center Maintainers
: 654193 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-13 12:33 UTC by Debarshi Ray
Modified: 2012-06-06 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
online-accounts: New "Add Account" dialog (22.30 KB, patch)
2012-03-13 12:36 UTC, Debarshi Ray
needs-work Details | Review
online-accounts: Fix spacing and alignment when showing accounts (1.68 KB, patch)
2012-03-13 12:36 UTC, Debarshi Ray
committed Details | Review
online-accounts: New "Add Account" dialog (22.59 KB, patch)
2012-03-15 21:02 UTC, Debarshi Ray
none Details | Review
online-accounts: Remove horizontal scrolling from accounts list (2.14 KB, patch)
2012-04-04 15:32 UTC, Debarshi Ray
none Details | Review
online-accounts: Load and add the GOA CSS style (3.35 KB, patch)
2012-04-05 14:50 UTC, Debarshi Ray
reviewed Details | Review
online-accounts: Remove horizontal scrolling from accounts list (2.51 KB, patch)
2012-04-16 13:25 UTC, Debarshi Ray
needs-work Details | Review
online-accounts: Don't hardcode the text color (1.19 KB, patch)
2012-05-05 12:46 UTC, Debarshi Ray
committed Details | Review
online-accounts: New "Add Account" dialog (22.92 KB, patch)
2012-05-14 23:21 UTC, Debarshi Ray
needs-work Details | Review
online-accounts: New "Add Account" dialog (22.61 KB, patch)
2012-06-04 20:21 UTC, Debarshi Ray
committed Details | Review
online-accounts: Remove horizontal scrolling from accounts list (2.50 KB, patch)
2012-06-04 20:23 UTC, Debarshi Ray
committed Details | Review
build: require GOA >= 3.5.1 (1.36 KB, patch)
2012-06-04 20:25 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2012-03-13 12:33:56 UTC
The UI of the online-accounts panel needs to be improved to match with what the designers have in mind.

Latest: http://ur1.ca/8m05c
Earlier: https://live.gnome.org/Design/SystemSettings/OnlineAccounts
Comment 1 Debarshi Ray 2012-03-13 12:36:07 UTC
Created attachment 209597 [details] [review]
online-accounts: New "Add Account" dialog
Comment 2 Debarshi Ray 2012-03-13 12:36:24 UTC
Created attachment 209598 [details] [review]
online-accounts: Fix spacing and alignment when showing accounts
Comment 3 Debarshi Ray 2012-03-13 12:50:28 UTC
These patches are meant to work with these changes to gnome-online-accounts:
https://bugzilla.gnome.org/671982
Comment 4 André Klapper 2012-03-13 14:25:04 UTC
Assuming that this is 3.5 stuff as we are under UI freeze. If not, please ask for a freeze exception - see https://live.gnome.org/ThreePointThree#Schedule
Comment 5 Bastien Nocera 2012-03-13 17:46:29 UTC
(In reply to comment #1)
> Created an attachment (id=209597) [details] [review]
> online-accounts: New "Add Account" dialog

You're missing the frame around the list.
Comment 6 Bastien Nocera 2012-03-13 17:52:48 UTC
Review of attachment 209597 [details] [review]:

It's currently unclear what happens when you click one of the item in the dialogue, as processing the click is somewhat lengthy.

You should add an async version of goa_provider_add_account(), and add a spinner to the tree row until the click is processed, and add_account has finished.

::: panels/online-accounts/cc-online-accounts-add-account-dialog.c
@@ +110,3 @@
+
+static gboolean
+tree_view_button_press_event_cb (GtkWidget      *widget,

Eek. No. Use selection-changed instead.

@@ +124,3 @@
+
+static gboolean
+tree_view_button_release_event_cb (GtkWidget      *widget,

Ditto.
Comment 7 Debarshi Ray 2012-03-15 21:02:12 UTC
Created attachment 209885 [details] [review]
online-accounts: New "Add Account" dialog
Comment 8 Debarshi Ray 2012-03-15 21:02:33 UTC
(In reply to comment #5)
> (In reply to comment #1)
> > Created an attachment (id=209597) [details] [review] [details] [review]
> > online-accounts: New "Add Account" dialog
> 
> You're missing the frame around the list.

Done.
Comment 9 Debarshi Ray 2012-04-04 15:32:30 UTC
Created attachment 211307 [details] [review]
online-accounts: Remove horizontal scrolling from accounts list
Comment 10 Debarshi Ray 2012-04-05 14:50:59 UTC
Created attachment 211390 [details] [review]
online-accounts: Load and add the GOA CSS style
Comment 11 Debarshi Ray 2012-04-05 16:48:19 UTC
(In reply to comment #6)
> Review of attachment 209597 [details] [review]:
> 
> It's currently unclear what happens when you click one of the item in the
> dialogue, as processing the click is somewhat lengthy.
> 
> You should add an async version of goa_provider_add_account(), and add a
> spinner to the tree row until the click is processed, and add_account has
> finished.

Currently there are quite a few places GOA blocks the Gtk main loop while adding an account. Some of these have now been fixed in GOA's master, while there are a few remaining.

See: https://bugzilla.gnome.org/672510

> ::: panels/online-accounts/cc-online-accounts-add-account-dialog.c
> @@ +110,3 @@
> +
> +static gboolean
> +tree_view_button_press_event_cb (GtkWidget      *widget,
> 
> Eek. No. Use selection-changed instead.
> 
> @@ +124,3 @@
> +
> +static gboolean
> +tree_view_button_release_event_cb (GtkWidget      *widget,
> 
> Ditto.

I lifted this idea from shell/cc-shell-item-view.c so that one can navigate using the keyboard and hit enter to activate, or just single click to activate.
Comment 12 Debarshi Ray 2012-04-16 13:25:48 UTC
Created attachment 212144 [details] [review]
online-accounts: Remove horizontal scrolling from accounts list

Prevent the accounts treeview from shrinking too much when there are no added accounts.
Comment 13 Debarshi Ray 2012-05-05 12:45:39 UTC
*** Bug 654193 has been marked as a duplicate of this bug. ***
Comment 14 Debarshi Ray 2012-05-05 12:46:49 UTC
Created attachment 213492 [details] [review]
online-accounts: Don't hardcode the text color
Comment 15 William Jon McCann 2012-05-14 14:35:04 UTC
As mentioned on IRC.

 * The designs for the first screen of the add dialog assumed a different titlebar design. Since we don't have these yet we'll need to have a heading text. Perhaps just like the titlebar text "Add Account".
 * The spinner that is used after the account type selection is far too large.
 * The spinner seems to jump a bit to the upper left just at the end
 * We still have the google auth page size issue.. separate bug.
Comment 16 Debarshi Ray 2012-05-14 23:21:14 UTC
Created attachment 214050 [details] [review]
online-accounts: New "Add Account" dialog

This should address the following problems:

> * The designs for the first screen of the add dialog assumed a
> different titlebar design. Since we don't have these yet we'll
> need to have a heading text. Perhaps just like the titlebar text
> "Add Account".
> * The spinner that is used after the account type selection is far too large.
Comment 17 Bastien Nocera 2012-05-28 10:57:21 UTC
Review of attachment 211390 [details] [review]:

::: panels/online-accounts/cc-online-accounts-add-account-dialog.c
@@ +262,3 @@
   priv = add_account->priv;
 
+  css_path = goa_util_get_css ();

If you're going to stuff the css file somewhere, might as well be using a GResource so we don't have to load it from the disk.
Comment 18 Bastien Nocera 2012-05-28 11:00:04 UTC
Review of attachment 212144 [details] [review]:

Looks good.

No shortened URL in the commit logs though. Use the anchor inside the design page instead.
Comment 19 Bastien Nocera 2012-05-28 11:00:29 UTC
Review of attachment 213492 [details] [review]:

Looks good
Comment 20 Bastien Nocera 2012-05-28 11:06:28 UTC
Review of attachment 214050 [details] [review]:

::: panels/online-accounts/cc-online-accounts-add-account-dialog.c
@@ +118,3 @@
+
+  /* be sure to ignore double and triple clicks */
+  priv->ignore_release = (event->type != GDK_BUTTON_PRESS);

You know that a double-click will generate GDK_BUTTON_PRESS, right?

@@ +173,3 @@
+      gint height;
+
+      gtk_window_get_size (parent, &width, &height);

You do that sort of thing in ->realize, not ->show

@@ +180,3 @@
+
+  if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->tree_view)) == NULL)
+    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree_view), GTK_TREE_MODEL (priv->list_store));

Why in ->show? Why is the NULL check necessary?

@@ +190,3 @@
+
+  if (priv->tree_view != NULL)
+    priv->tree_view = NULL;

Why is this necessary?

@@ +194,3 @@
+  if (priv->list_store != NULL)
+    {
+      g_object_unref (priv->list_store);

Use g_clear_object()
Comment 21 Debarshi Ray 2012-06-04 20:20:32 UTC
(In reply to comment #20)
> Review of attachment 214050 [details] [review]:
> 
> ::: panels/online-accounts/cc-online-accounts-add-account-dialog.c
> @@ +118,3 @@
> +
> +  /* be sure to ignore double and triple clicks */
> +  priv->ignore_release = (event->type != GDK_BUTTON_PRESS);
> 
> You know that a double-click will generate GDK_BUTTON_PRESS, right?

Yes.

I made a mistake in the release handler where the && should be || to
have the same behaviour as shell/cc-shell-item-view.c. Fixed.

Anything else?

> @@ +173,3 @@
> +      gint height;
> +
> +      gtk_window_get_size (parent, &width, &height);
> 
> You do that sort of thing in ->realize, not ->show

True, but I vaguely recollect having tried it but for some reason it did not work. I don't remember the details anymore.

Anyway, I have changed it to ->realize now.
 
> @@ +180,3 @@
> +
> +  if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->tree_view)) == NULL)
> +    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree_view), GTK_TREE_MODEL
> (priv->list_store));
> 
> Why in ->show? Why is the NULL check necessary?

The NULL check was to avoid setting the model once it has already been set.

Anyway, I have changed it to ->realize now and removed the check.

> @@ +190,3 @@
> +
> +  if (priv->tree_view != NULL)
> +    priv->tree_view = NULL;
> 
> Why is this necessary?

To mark the state between ->dispose and ->finalize. Should I remove it?

> Use g_clear_object()

Fixed.
Comment 22 Debarshi Ray 2012-06-04 20:21:51 UTC
Created attachment 215584 [details] [review]
online-accounts: New "Add Account" dialog
Comment 23 Debarshi Ray 2012-06-04 20:23:37 UTC
Created attachment 215585 [details] [review]
online-accounts: Remove horizontal scrolling from accounts list

The designs on live.gnome.org used to be outdated. Not any more.
Comment 24 Debarshi Ray 2012-06-04 20:25:17 UTC
Created attachment 215586 [details] [review]
build: require GOA >= 3.5.1

The CSS is now part of the theme. So we don't need to carry it any more. However we still need to bump the GOA version.
Comment 25 Matthias Clasen 2012-06-05 11:33:44 UTC
Review of attachment 215584 [details] [review]:

Looks good to me now, fwiw
Comment 26 Matthias Clasen 2012-06-05 11:34:57 UTC
Review of attachment 215585 [details] [review]:

Looks like you did what Bastien asked here, so should be good to commit.
Comment 27 Matthias Clasen 2012-06-05 11:36:43 UTC
Review of attachment 215586 [details] [review]:

Looks fine to me
Comment 28 Debarshi Ray 2012-06-06 12:26:41 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.