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 689645 - Nicer error states
Nicer error states
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Online Accounts
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
Control-Center Maintainers
3.8?
Depends on:
Blocks:
 
 
Reported: 2012-12-04 17:07 UTC by Allan Day
Modified: 2013-02-28 12:44 UTC
See Also:
GNOME target: 3.8
GNOME version: 3.7/3.8


Attachments
screenshot (176.78 KB, image/png)
2012-12-04 17:07 UTC, Allan Day
  Details
mockup (43.28 KB, image/png)
2012-12-04 17:08 UTC, Allan Day
  Details
changed infoBar's position (2.01 KB, patch)
2012-12-12 15:28 UTC, Ebru Akagündüz
none Details | Review
changed infoBar's position (2.37 KB, patch)
2012-12-13 09:13 UTC, Ebru Akagündüz
none Details | Review
attention icon of account (1.19 KB, patch)
2012-12-13 19:51 UTC, Ebru Akagündüz
none Details | Review
online-accounts: Nicer error states (4.39 KB, patch)
2013-01-23 13:50 UTC, Debarshi Ray
none Details | Review
provider: Desensitize and turn off the switches if there is an error (1.54 KB, patch)
2013-01-23 13:54 UTC, Debarshi Ray
committed Details | Review
Screenshot of work in progress (41.06 KB, image/png)
2013-01-23 13:56 UTC, Debarshi Ray
  Details
online-accounts: Nicer error states (4.90 KB, patch)
2013-01-23 15:27 UTC, Debarshi Ray
none Details | Review
Screenshot of work in progress (41.23 KB, image/png)
2013-01-23 15:33 UTC, Debarshi Ray
  Details
online-accounts: Nicer error states (5.28 KB, patch)
2013-02-14 14:40 UTC, Debarshi Ray
accepted-commit_now Details | Review
online-accounts: Nicer error states (4.90 KB, patch)
2013-02-25 14:16 UTC, Debarshi Ray
accepted-commit_now Details | Review
online-accounts: Nicer error states (4.91 KB, patch)
2013-02-25 17:37 UTC, Debarshi Ray
committed Details | Review

Description Allan Day 2012-12-04 17:07:14 UTC
Created attachment 230676 [details]
screenshot

Sometimes, an account will stop working for some reason. When it does, we need to indicate which account isn't working, why it isn't working, and how to make it work again.

The way we currently do this has a few issues (see attached screenshot):

 * The symbolic icon in the list is red when the row is selected (it should be white like the text)
 * The yellow box doesn't look very nice, and there isn't enough padding between it and the content below
 * The switches are both on and sensitive, yet the other information suggests that the account isn't working
Comment 1 Allan Day 2012-12-04 17:08:16 UTC
Created attachment 230677 [details]
mockup

Here's some ideas for how to do this a bit better.
Comment 2 William Jon McCann 2012-12-04 17:40:22 UTC
Looks much better to me. As mentioned on IRC, I would center align the warning icon with the sign in button. We might want to have a sign out button in the panel all the time and locate it in the same position as the sign in button.
Comment 3 Ebru Akagündüz 2012-12-12 15:28:30 UTC
Created attachment 231381 [details] [review]
changed infoBar's position

hi, i changed infoBar as your comment.
Comment 4 Debarshi Ray 2012-12-12 21:57:57 UTC
Comment on attachment 231381 [details] [review]
changed infoBar's position

Great! A few comments:

- Please use hbox and image, instead of h_Box and image_. You can consider re-using the box variable instead of hbox too.

- You are missing a space before the opening parenthesis:
    +      h_Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
  Also, you might be better off using 6 instead of 10. It is usually recommended to use multiples of 6, and 10 looks a bit high if you compare it with Allan's mockup.

- Use GTK_ICON_SIZE_SMALL_TOOLBAR instead of 2:
    +      image_ = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,2);
  The enum is easier to read than the numeric constant.

- It is not very clear from Allan's mockups, but I think he wants a dim label for the message. You can have that by adding something like this:
    gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");

- Currently, the label is in one single line. This causes the width of the panel to increase. You can notice this if you have more than one account and one of them has the error. The panel's width increases for the one with error. Use gtk_label_set_line_wrap to avoid this by breaking the line.

- You can consider this opportunity to improve this bit in the original code:
       if (provider != NULL)
+        gtk_info_bar_add_button (GTK_INFO_BAR (bar), _("_Sign In"), GTK_RESPONSE_OK);
  My suggestion would be to always add the button, and if provider == NULL, then use gtk_info_bar_set_response_sensitive to make it insensitive.
Comment 5 Ebru Akagündüz 2012-12-13 09:13:26 UTC
Created attachment 231452 [details] [review]
changed infoBar's position

hi, i changed as your comment.
Comment 6 Ebru Akagündüz 2012-12-13 19:51:21 UTC
Created attachment 231508 [details] [review]
attention icon of account

i added new patch for attention icon of account
Comment 7 Debarshi Ray 2013-01-23 13:50:17 UTC
Created attachment 234194 [details] [review]
online-accounts: Nicer error states
Comment 8 Debarshi Ray 2013-01-23 13:54:32 UTC
Created attachment 234197 [details] [review]
provider: Desensitize and turn off the switches if there is an error

This patch is against gnome-online-accounts, where the GtkSwitches are created and added to the view.
Comment 9 Debarshi Ray 2013-01-23 13:56:59 UTC
Created attachment 234199 [details]
Screenshot of work in progress

I do not know how to ensure the colour of the icon is the same as the colour of the text (ie. white) when the row is selected.
Comment 10 Debarshi Ray 2013-01-23 15:27:02 UTC
Created attachment 234215 [details] [review]
online-accounts: Nicer error states
Comment 11 Debarshi Ray 2013-01-23 15:33:45 UTC
Created attachment 234218 [details]
Screenshot of work in progress
Comment 12 Debarshi Ray 2013-02-13 16:38:16 UTC
Can we get this in for 3.7.90?

Even though the colour of the icon when selected is still not as it should be, overall it is much better than what we currently have.
Comment 13 Jakub Steiner 2013-02-13 17:14:37 UTC
The reason why the icon doesn't recolor is because it uses a 'warning' named color. Those are special cased in the injected stylesheet. I think we should just use the default for dialog-wanrnig perhaps. I am not much of a fan of using local color in the symbolic icons.
Comment 14 Debarshi Ray 2013-02-14 14:40:14 UTC
Created attachment 236062 [details] [review]
online-accounts: Nicer error states

Add some spacing to accounts-vbox. In case there is too much stuff being shown for the account there should be some minimum spacing between the warning and the info.
Comment 15 Bastien Nocera 2013-02-15 23:37:29 UTC
Review of attachment 236062 [details] [review]:

Looks fine.
Comment 16 Debarshi Ray 2013-02-25 14:16:18 UTC
Created attachment 237357 [details] [review]
online-accounts: Nicer error states

This is same as attachment 234215 [details] [review], which was obsoleted by 236062. We don't need the spacing in accounts-vbox which was added in 236062, after all.

Sorry for the confusion.

Bastien, I am marking this as accepted-commitnow because we need to ask the release team for approval and the difference between the two is almost trivial. I hope it is ok.
Comment 17 Debarshi Ray 2013-02-25 17:37:17 UTC
Created attachment 237374 [details] [review]
online-accounts: Nicer error states

Fix the string as suggested in:
https://mail.gnome.org/archives/gnome-doc-list/2013-February/msg00039.html