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 779368 - Account dialogs - put expired credentials UI in infobars
Account dialogs - put expired credentials UI in infobars
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
Depends on:
Blocks:
 
 
Reported: 2017-02-28 14:41 UTC by Allan Day
Modified: 2017-06-05 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
online-accounts: Tweak account editor dialog (2.22 KB, patch)
2017-04-27 19:48 UTC, Georges Basile Stavracas Neto
none Details | Review
provider: Make expired credentials an info bar (6.17 KB, patch)
2017-04-27 19:49 UTC, Georges Basile Stavracas Neto
none Details | Review
online-accounts: Move the margins and spacing lower down the hierarchy (2.42 KB, patch)
2017-05-30 14:48 UTC, Debarshi Ray
none Details | Review
provider: Use an info bar for accounts needing attention (7.33 KB, patch)
2017-05-30 14:50 UTC, Debarshi Ray
committed Details | Review
IMAP/SMTP - needs attention (82.46 KB, image/png)
2017-05-30 14:52 UTC, Debarshi Ray
  Details
Google - needs attention (79.12 KB, image/png)
2017-05-30 14:52 UTC, Debarshi Ray
  Details
Nextcloud (70.47 KB, image/png)
2017-05-30 14:53 UTC, Debarshi Ray
  Details
imap-smtp: providers, telepathy: Use GtkContainer API instead of GtkBox (3.21 KB, patch)
2017-05-30 14:57 UTC, Debarshi Ray
committed Details | Review
online-accounts: Move the margins and spacing lower down the hierarchy (2.97 KB, patch)
2017-05-30 15:00 UTC, Debarshi Ray
committed Details | Review
imap-smtp: providers, telepathy: Increase horizontal margin (2.80 KB, patch)
2017-05-30 15:56 UTC, Debarshi Ray
committed Details | Review
online-accounts: Increase the spacing above the "Remove Account" button (1.08 KB, patch)
2017-05-30 15:57 UTC, Debarshi Ray
committed Details | Review
utils: Remove the warning icon from the needs-attention GtkInfoBar (2.30 KB, patch)
2017-06-02 14:56 UTC, Debarshi Ray
committed Details | Review
utils: Embolden the heading instead of dimming the description (2.18 KB, patch)
2017-06-02 15:15 UTC, Debarshi Ray
committed Details | Review
utils: Add some margin around the contents of the GtkInfoBar (2.23 KB, patch)
2017-06-02 15:37 UTC, Debarshi Ray
committed Details | Review
Google - needs attention (65.16 KB, image/png)
2017-06-02 15:39 UTC, Debarshi Ray
  Details
IMAP/SMTP - needs attention (69.87 KB, image/png)
2017-06-02 15:40 UTC, Debarshi Ray
  Details
utils: Remove the full stop from the GtkInfoBar's header string (998 bytes, patch)
2017-06-05 13:05 UTC, Debarshi Ray
committed Details | Review

Description Allan Day 2017-02-28 14:41:51 UTC
I have to hold my hands up here - the expired credentials part of the account dialogs wasn't great in terms of design. The goal was to avoid having to move the rest of the dialog elements, but the result was that the credentials part looks out of place and makes the rest of the layout a bit awkward.

The current fine for 3.24 but in future it would be good to move the expired credentials part of the dialogs into infobars, as shown in these updated mockups:

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/online-accounts/aday-alt/online-accounts-account-dialogs.png
Comment 1 Georges Basile Stavracas Neto 2017-04-27 19:48:04 UTC
Created attachment 350595 [details] [review]
online-accounts: Tweak account editor dialog

In order to move the expired credentials button
to an info bar above the other widgets, we need
to tweak Control Center's dialog to have borders
that don't affect the GOA widgets.
Comment 2 Georges Basile Stavracas Neto 2017-04-27 19:49:19 UTC
Created attachment 350596 [details] [review]
provider: Make expired credentials an info bar

(This patch is to be applied on gnome-online-accounts)

Per the mockups at [1], when the account editor dialog
displays the expired credentials widgets, they should
be packed inside a GtkInfoBar.

This patch adds an info bar above the expired credential
widgets, and adjusts the code to tweak the dialog.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/online-accounts/aday-alt/online-accounts-account-dialogs.png
Comment 3 Debarshi Ray 2017-05-30 14:47:37 UTC
Review of attachment 350595 [details] [review]:

Thanks for the patches, Georges!

What's with the super narrow commit messages? :) Would be nice to explain why the margins had to be moved around. Having the UI spread across two modules can make it tricky to follow the logic.

::: panels/online-accounts/online-accounts.ui
@@ +260,3 @@
                     <property name="can_focus">True</property>
+                    <property name="margin-start">36</property>
+                    <property name="margin-end">36</property>

Why 36, not 24? (see below)
Comment 4 Debarshi Ray 2017-05-30 14:47:53 UTC
Review of attachment 350596 [details] [review]:

::: src/goabackend/goaprovider.c
@@ +595,3 @@
   gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
   gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
+  gtk_widget_set_margin_bottom (grid, 24);

Are you sure that you didn't intend to set the top margin?

Earlier, accounts_vbox's parent GtkBox had a margin of 24. To accommodate the InfoBar, it only has a bottom-margin now. So, I assume you wanted to set the other margins here?

Note that accounts_vbox and remove_account_button already has 24 pixels between them due to their parent GtkBox's spacing. So, if we want more spacing between them we can just increase the spacing, no? Just to avoid spreading the values too much and keep the arithmetic simple. Also, having more of this stuff outside the vfunc avoids the need to check and keep the other implementations updated.

@@ +597,3 @@
+  gtk_widget_set_margin_bottom (grid, 24);
+  gtk_widget_set_margin_start (grid, 24);
+  gtk_widget_set_margin_end (grid, 24);

Shouldn't the horizontal margins be 42 (= 24 + 18)? Currently the Grid's margins are narrower than that of remove_account_button, which breaks the layout - the Switches are too close to the edge.

The mockups seem to suggest even wider margins, but we can do that later.

@@ +598,3 @@
+  gtk_widget_set_margin_start (grid, 24);
+  gtk_widget_set_margin_end (grid, 24);
+  gtk_container_add (GTK_CONTAINER (vbox), grid);

These kind of cosmetic changes are best done in a separate patch.

::: src/goabackend/goatelepathyprovider.c
@@ +947,1 @@
   grid = gtk_grid_new ();

We need to set the margins on this Grid too.

::: src/goabackend/goautils.c
@@ +120,3 @@
+  attention_needed = goa_account_get_attention_needed (account);
+
+  gtk_widget_set_margin_top (GTK_WIDGET (vbox), attention_needed ? 0 : 32);

Umm... I don't understand this.

When attention_needed is FALSE accounts_vbox's (and the Grid's) top margin is 32. When TRUE, there is only a 18 pixel gap between the Grid and the InfoBar. Shouldn't they be the same?
Comment 5 Debarshi Ray 2017-05-30 14:48:44 UTC
Created attachment 352873 [details] [review]
online-accounts: Move the margins and spacing lower down the hierarchy

I took the liberty to make the above adjustments.
Comment 6 Debarshi Ray 2017-05-30 14:50:06 UTC
Review of attachment 350596 [details] [review]:

Forgot to mention that the show_accounts vfunc for the IMAP/SMTP provider needs to be updated too.
Comment 7 Debarshi Ray 2017-05-30 14:50:36 UTC
Created attachment 352874 [details] [review]
provider: Use an info bar for accounts needing attention

I split out the gtk_box_pack_start -> gtk_container_add changes, and updated the Telepathy and IMAP/SMTP providers.
Comment 8 Debarshi Ray 2017-05-30 14:52:09 UTC
Created attachment 352875 [details]
IMAP/SMTP - needs attention
Comment 9 Debarshi Ray 2017-05-30 14:52:45 UTC
Created attachment 352876 [details]
Google - needs attention
Comment 10 Debarshi Ray 2017-05-30 14:53:23 UTC
Created attachment 352877 [details]
Nextcloud
Comment 11 Debarshi Ray 2017-05-30 14:57:02 UTC
Created attachment 352878 [details] [review]
imap-smtp: providers, telepathy: Use GtkContainer API instead of GtkBox
Comment 12 Debarshi Ray 2017-05-30 15:00:33 UTC
Created attachment 352879 [details] [review]
online-accounts: Move the margins and spacing lower down the hierarchy

Let's also bump the gnome-online-accounts requirement since the UI code is so tightly coupled.
Comment 13 Debarshi Ray 2017-05-30 15:01:25 UTC
Comment on attachment 352874 [details] [review]
provider: Use an info bar for accounts needing attention

Pushed to master
Comment 14 Debarshi Ray 2017-05-30 15:01:43 UTC
Comment on attachment 352878 [details] [review]
imap-smtp: providers, telepathy: Use GtkContainer API instead of GtkBox

Pushed to master.
Comment 15 Debarshi Ray 2017-05-30 15:56:24 UTC
Comparing the attached screenshots and the mockups, it seems to me that we need a wider horizontal margin for the account details widgets, and more spacing above the "remove account" button. Not really related to this bug, but ... *shrug*
Comment 16 Debarshi Ray 2017-05-30 15:56:53 UTC
Created attachment 352881 [details] [review]
imap-smtp: providers, telepathy: Increase horizontal margin
Comment 17 Debarshi Ray 2017-05-30 15:57:30 UTC
Created attachment 352882 [details] [review]
online-accounts: Increase the spacing above the "Remove Account" button
Comment 18 Debarshi Ray 2017-05-31 14:39:05 UTC
Allan is on vacation. So I am pushing the patches to increase the margins and spacing for the time being to get this bug out of my queue. We can adjust or revert later if required.

Thanks for all the work here, Georges!
Comment 19 Allan Day 2017-06-01 14:45:41 UTC
This looks good! My only comment would be that the warning icons aren't needed, and that the second line of text in the infobar looks a bit faint. It might be better to use bold for the heading and then standard white text for the description.
Comment 20 Debarshi Ray 2017-06-02 14:56:54 UTC
Created attachment 353088 [details] [review]
utils: Remove the warning icon from the needs-attention GtkInfoBar
Comment 21 Debarshi Ray 2017-06-02 15:15:16 UTC
Created attachment 353089 [details] [review]
utils: Embolden the heading instead of dimming the description
Comment 22 Debarshi Ray 2017-06-02 15:37:47 UTC
Created attachment 353090 [details] [review]
utils: Add some margin around the contents of the GtkInfoBar

Don't we need some horizontal margin inside the GtkInfoBar? How about this?
Comment 23 Debarshi Ray 2017-06-02 15:39:58 UTC
Created attachment 353091 [details]
Google - needs attention
Comment 24 Debarshi Ray 2017-06-02 15:40:28 UTC
Created attachment 353092 [details]
IMAP/SMTP - needs attention
Comment 25 Debarshi Ray 2017-06-02 15:41:37 UTC
Looks like we forgot to update the header string:
"Credentials have expired." vs "Connection has expired"
Comment 26 Allan Day 2017-06-02 16:22:36 UTC
Looks good. Headings don't need full stops at the end, and they could do with more padding.
Comment 27 Debarshi Ray 2017-06-05 13:05:40 UTC
Created attachment 353180 [details] [review]
utils: Remove the full stop from the GtkInfoBar's header string