GNOME Bugzilla – Bug 689645
Nicer error states
Last modified: 2013-02-28 12:44:04 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
Created attachment 230677 [details] mockup Here's some ideas for how to do this a bit better.
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.
Created attachment 231381 [details] [review] changed infoBar's position hi, i changed infoBar as your comment.
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.
Created attachment 231452 [details] [review] changed infoBar's position hi, i changed as your comment.
Created attachment 231508 [details] [review] attention icon of account i added new patch for attention icon of account
Created attachment 234194 [details] [review] online-accounts: Nicer error states
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.
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.
Created attachment 234215 [details] [review] online-accounts: Nicer error states
Created attachment 234218 [details] Screenshot of work in progress
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.
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.
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.
Review of attachment 236062 [details] [review]: Looks fine.
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.
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