Merge lp:~alexander-wilms/midori/midori into lp:midori

Proposed by 982c80311320c1b
Status: Merged
Approved by: Cody Garver
Approved revision: 6248
Merge reported by: Cody Garver
Merged at revision: not available
Proposed branch: lp:~alexander-wilms/midori/midori
Merge into: lp:midori
Diff against target: 331 lines (+121/-71)
4 files modified
data/about.css (+69/-40)
data/error.html (+13/-13)
midori/midori-app.c (+3/-0)
midori/midori-view.c (+36/-18)
To merge this branch: bzr merge lp:~alexander-wilms/midori/midori
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Cris Dywan Needs Fixing
982c80311320c1b (community) Needs Resubmitting
Danielle Foré (community) Needs Fixing
Review via email: mp+170994@code.launchpad.net

Commit message

Error page redesign

Description of the change

Improved the error page: http://i.imgur.com/2OeaAIQ.png

To post a comment you must log in.
lp:~alexander-wilms/midori/midori updated
6235. By 982c80311320c1b

tweaking

6236. By 982c80311320c1b

tweaking

6237. By 982c80311320c1b

tweaking

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

Now it looks like this: http://i.imgur.com/SV8WBxF.png

lp:~alexander-wilms/midori/midori updated
6238. By 982c80311320c1b

tweaking

Revision history for this message
Cris Dywan (kalikiana) wrote :

The title should mention the domain at minimum, I don't want to read all text to remember which page this actually is about.

The logo is gone. I'm open to tweaks and different layout, but I definitely expect it in some form.

It feels much cleaner, which is nice, but a bit too "borderless". How about a subtle gradient?

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

I agree the title needs to state the entire problem concisely. I think something like "Foobar can't be found" would work well.

While I don't really think the logo is required, if Christian wants it in it needs to stay.

I do think that having the white "dialog" on a grey page looks a little nicer here (even though it's not 100% consistent with how granite does embedded error pages, it is more consistent with how other people do embedded error pages). I would suggest a small border radius (like 4px) and a very small, light shadow.

I'm not sure the line "You might want to try one of these suggestions:" is entirely necessary. I think you could jump straight from the description to the bulleted list.

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

Ah something else I forgot to mention: The button label should be Title Case "Try Again" and it'd be nice if it were a little bigger :)

lp:~alexander-wilms/midori/midori updated
6239. By 982c80311320c1b

Made msot changes suggested by kalikiana and DanRabbit

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

I can get Midori_URI_parse_hostname to work, since it's a C function. Maybe CHristian could fix this bit

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

*can't

Revision history for this message
Danielle Foré (danrabbit) wrote :

For the "dialog" try:

border: 1px solid rgba(0, 0, 0, .3);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

and the body color of "#DEDEDE" to make it blend into elementary's tabs ;D

Starting to look really slick :)

lp:~alexander-wilms/midori/midori updated
6240. By 982c80311320c1b

Tweaking

6241. By 982c80311320c1b

g_free (title)

6242. By 982c80311320c1b

Use parse_hostname

6243. By 982c80311320c1b

fix icon position

6244. By 982c80311320c1b

Merge Pawels branch

Revision history for this message
982c80311320c1b (alexander-wilms) :
review: Needs Resubmitting
Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

^ That was supposed to mean that I resubmitted the branch for a review

Revision history for this message
Cris Dywan (kalikiana) wrote :

No need to resubmit, just make sure Status says Needs Review. If you want to ensure people know you addressed their comment, just mention it briefly in a comment and it will send an email to all reviewers.

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

Ah, ok. Well, I addressed your and Daniel's comments

Revision history for this message
Cris Dywan (kalikiana) wrote :

I didn't realize at first that you changed the icon which was among my suggestions, since it doesn't actually look less like an error than before - different icon, but same association.

How about network-error (error) and network-idle (delayed)? These look suitable to me.

Apart from that I love it.

review: Needs Fixing
Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

These don't seem to be part of the stock icons. How can I use them?

lp:~alexander-wilms/midori/midori updated
6245. By 982c80311320c1b

Use better icons

6246. By 982c80311320c1b

Added colon

Revision history for this message
Paweł Forysiuk (tuxator) wrote :

- There is no logo on the private page
- suggestion could be shown only on network error maybe with checking webkit error beforehand,
- in case of long-ish title of the page it spills over if you have a small monitor size

77 + result = midori_view_display_error (view,
278 + uri,
279 + "stock://network-error",
280 + title,
281 + message,
282 + error->message,
283 + g_string_free (suggestions, FALSE),
284 + _("Try Again"),
285 + web_frame);

could be squeezed to 2-3 lines

lp:~alexander-wilms/midori/midori updated
6247. By 982c80311320c1b

Fixes

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

- I added the logo, but somehow the CSS to position it doesn't work
- I don't understand what you mean. Maybe kalikiana knows what should be done
- Can't reproduce that: http://i.imgur.com/t5QmvfU.png
- Condensed them a bit

Revision history for this message
Paweł Forysiuk (tuxator) wrote :

You added ellipsis so it no longer spills
for logo in private html dir="ltr" should to the trick
otherwise looks fine

lp:~alexander-wilms/midori/midori updated
6248. By 982c80311320c1b

Added ltr

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

The icons shown should be 48px, but they're 16px.

The dialog-warning was 48px, so what needs to be done to get the icons in the same size?

Revision history for this message
Danielle Foré (danrabbit) wrote :

Alex, I think this is something weird with GNOME icons and not with your branch. I pushed 48px network icons to lp:elementaryicons and they seem to work fine with your branch.

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

Interesting. I copied your icons inro .../elementary/status/48 and I still saw the 16 variants.

But I think now it's ready to be merged

Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/about.css'
--- data/about.css 2013-03-21 17:09:08 +0000
+++ data/about.css 2013-06-30 07:38:25 +0000
@@ -3,48 +3,53 @@
3 This file is licensed under the terms of the expat license, see the file EXPAT.3 This file is licensed under the terms of the expat license, see the file EXPAT.
4 */4 */
5body {5body {
6 background-color: #eee;6 background-color: #dedede;
7 margin: 0;7 color: #222222;
8 padding: 0;8 font-family: 'Open Sans', 'Droid Sans', Arial, sans-serif;
9}9 font-size: 14px;
1010 font-style: normal;
11#container {11 font-variant: normal;
12 background: #f6fff3;12 font-weight: normal;
13 min-width: 70%;13 margin-top: 100px;
14 max-width: 70%;
15 margin: 2em auto 1em;
16 padding: 1em;
17 border: 0.2em solid #9acb7f;
18 -webkit-border-radius: 1em;
19}
20
21#icon {
22 float: left;
23 padding-left: 1%;
24 padding-top: 1%;
25}14}
2615
27html[dir="rtl"] #icon {16html[dir="rtl"] #icon {
28 float: right;17 float: right;
29 padding-right: 1%;18 padding-right: 1%;
19}
20
21.indent {
22 margin-left: 60px;
30}23}
3124
32#main {25#main {
33 float: right;26 max-width: 50%;
34 width: 75%;27 margin-left: auto;
28 margin-right: auto;
29 min-width: 480px;
30 background-repeat: no-repeat;
31 background-color: #ffffff;
32 border: 1px solid rgba(0, 0, 0, .3);
33 padding: 25px;
34 -webkit-border-radius: 4px;
35 -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
36 background-position-x: 22px;
37 background-position-y: 54px;
38}
39
40#text {
41 margin-left: 80px;
35}42}
3643
37h1 {44h1 {
38 font-size: 1.4em;45 font-family: 'Open Sans', 'Droid Sans', arial, sans-serif;
39 font-weight: bold;46 font-size: 32px;
40 white-space: nowrap;47 font-style: normal;
41 overflow: hidden;48 font-variant: normal;
42 text-overflow: ellipsis;49 font-weight: 300;
43}50 width: 100%;
4451 overflow: hidden;
45#logo {52 text-overflow: ellipsis;
46 position: absolute; bottom: 15px;
47 z-index: -1;
48}53}
4954
50html[dir="ltr"] #logo {55html[dir="ltr"] #logo {
@@ -61,11 +66,35 @@
61 padding: 2px 1px;66 padding: 2px 1px;
62}67}
6368
64#message {69button {
65 font-size: 1.1em;70 font-size: 14px;
66 word-wrap: break-word;71}
67}72
6873.message {
69#description {74 overflow: hidden;
70 font-size: 1em;75 text-overflow: ellipsis;
76}
77
78.description {
79 font-size: 1em;
80 overflow: hidden;
81 text-overflow: ellipsis;
82}
83
84#suggestions {
85 overflow: hidden;
86 text-overflow: ellipsis;
87}
88
89#button {
90 text-align: right;
91}
92
93#logo {
94 position: absolute; bottom: 15px;
95 z-index: -1;
96}
97
98form {
99 margin-bottom: 0px;
71}100}
72101
=== modified file 'data/error.html'
--- data/error.html 2013-02-25 23:51:48 +0000
+++ data/error.html 2013-06-30 07:38:25 +0000
@@ -9,21 +9,21 @@
9<link rel="stylesheet" type="text/css" href="res://about.css" />9<link rel="stylesheet" type="text/css" href="res://about.css" />
10</head>10</head>
11<body>11<body>
12 <div id="container">12<img id="logo" src="res://logo-shade.png" />
13 <img id="logo" src="res://logo-shade.png" />13<div id="main" style="background-image: url({error_icon});">
14 <img id="icon" src="stock://gtk-dialog-error" />14 <div id="text">
15 <div id="main">15 <h1>{title}</h1>
16 <h1>{title}</h1>16 <p class="message">{message}<br><i>{description}</i></p>
17 <p id="message">{message}</p>17 {suggestions}
18 <p id="description">{description}</p>18 </div>
19 <form method="GET" action="{uri}">19 <form method="GET" action="{uri}" id="button">
20 <button type="submit" onclick="location.reload(); return false;">20 <button type="submit" onclick="location.reload(); return false;" autofocus="true" >
21 <img style="{hide-button-images}" src="stock://gtk-refresh"/>
22 <span>{tryagain}</span>21 <span>{tryagain}</span>
23 </button>22 </button>
24 </form>23 </form>
25 </div>24 </div>
26 <br style="clear: both;"/>25
27 </div>26<br style="clear: both;"/>
28 </body>27</div>
28</body>
29</html>29</html>
3030
=== modified file 'midori/midori-app.c'
--- midori/midori-app.c 2013-06-26 21:54:50 +0000
+++ midori/midori-app.c 2013-06-30 07:38:25 +0000
@@ -1320,6 +1320,7 @@
1320 gchar** *argument_vector,1320 gchar** *argument_vector,
1321 const GOptionEntry *entries)1321 const GOptionEntry *entries)
1322{1322{
1323
1323 GtkIconSource* icon_source;1324 GtkIconSource* icon_source;
1324 GtkIconSet* icon_set;1325 GtkIconSet* icon_set;
1325 GtkIconFactory* factory;1326 GtkIconFactory* factory;
@@ -1329,6 +1330,8 @@
13291330
1330 static GtkStockItem items[] =1331 static GtkStockItem items[] =
1331 {1332 {
1333 { "network-error" },
1334 { "network-idle" },
1332 { STOCK_IMAGE },1335 { STOCK_IMAGE },
1333 { MIDORI_STOCK_WEB_BROWSER },1336 { MIDORI_STOCK_WEB_BROWSER },
1334 { STOCK_NEWS_FEED },1337 { STOCK_NEWS_FEED },
13351338
=== modified file 'midori/midori-view.c'
--- midori/midori-view.c 2013-06-25 22:32:12 +0000
+++ midori/midori-view.c 2013-06-30 07:38:25 +0000
@@ -79,9 +79,11 @@
79static gboolean79static gboolean
80midori_view_display_error (MidoriView* view,80midori_view_display_error (MidoriView* view,
81 const gchar* uri,81 const gchar* uri,
82 const gchar* error_icon,
82 const gchar* title,83 const gchar* title,
83 const gchar* message,84 const gchar* message,
84 const gchar* description,85 const gchar* description,
86 const gchar* suggestions,
85 const gchar* try_again,87 const gchar* try_again,
86#ifndef HAVE_WEBKIT288#ifndef HAVE_WEBKIT2
87 WebKitWebFrame* web_frame);89 WebKitWebFrame* web_frame);
@@ -667,7 +669,7 @@
667 gchar* slots = g_strjoinv (" , ", (gchar**)gcr_pkcs11_get_trust_lookup_uris ());669 gchar* slots = g_strjoinv (" , ", (gchar**)gcr_pkcs11_get_trust_lookup_uris ());
668 gchar* title = g_strdup_printf ("Error granting trust: %s", error->message);670 gchar* title = g_strdup_printf ("Error granting trust: %s", error->message);
669 midori_tab_stop_loading (MIDORI_TAB (view));671 midori_tab_stop_loading (MIDORI_TAB (view));
670 midori_view_display_error (view, NULL, NULL, title, slots,672 midori_view_display_error (view, NULL, NULL, NULL, title, slots, NULL,
671 _("Trust this website"), NULL);673 _("Trust this website"), NULL);
672 g_free (title);674 g_free (title);
673 g_free (slots);675 g_free (slots);
@@ -789,8 +791,8 @@
789 {791 {
790 midori_tab_set_security (MIDORI_TAB (view), MIDORI_SECURITY_UNKNOWN);792 midori_tab_set_security (MIDORI_TAB (view), MIDORI_SECURITY_UNKNOWN);
791 midori_tab_stop_loading (MIDORI_TAB (view));793 midori_tab_stop_loading (MIDORI_TAB (view));
792 midori_view_display_error (view, NULL, NULL, _("Security unknown"),794 midori_view_display_error (view, NULL, NULL, NULL, _("Security unknown"),
793 midori_location_action_tls_flags_to_string (tls_flags),795 midori_location_action_tls_flags_to_string (tls_flags), NULL,
794 _("Trust this website"),796 _("Trust this website"),
795 NULL);797 NULL);
796 }798 }
@@ -1171,9 +1173,11 @@
1171static gboolean1173static gboolean
1172midori_view_display_error (MidoriView* view,1174midori_view_display_error (MidoriView* view,
1173 const gchar* uri,1175 const gchar* uri,
1176 const gchar* error_icon,
1174 const gchar* title,1177 const gchar* title,
1175 const gchar* message,1178 const gchar* message,
1176 const gchar* description,1179 const gchar* description,
1180 const gchar* suggestions,
1177 const gchar* try_again,1181 const gchar* try_again,
1178#ifndef HAVE_WEBKIT21182#ifndef HAVE_WEBKIT2
1179 WebKitWebFrame* web_frame)1183 WebKitWebFrame* web_frame)
@@ -1210,8 +1214,10 @@
1210 "rtl" : "ltr",1214 "rtl" : "ltr",
1211 "{title}", title_escaped,1215 "{title}", title_escaped,
1212 "{favicon}", katze_str_non_null (favicon),1216 "{favicon}", katze_str_non_null (favicon),
1217 "{error_icon}", katze_str_non_null (error_icon),
1213 "{message}", message,1218 "{message}", message,
1214 "{description}", description,1219 "{description}", description,
1220 "{suggestions}", katze_str_non_null (suggestions),
1215 "{tryagain}", try_again,1221 "{tryagain}", try_again,
1216 "{uri}", uri,1222 "{uri}", uri,
1217 "{hide-button-images}", show_button_images ? "" : "display:none",1223 "{hide-button-images}", show_button_images ? "" : "display:none",
@@ -1248,6 +1254,7 @@
1248 #endif1254 #endif
1249 gchar* title;1255 gchar* title;
1250 gchar* message;1256 gchar* message;
1257 GString* suggestions;
1251 gboolean result;1258 gboolean result;
12521259
1253 /* The unholy trinity; also ignored in Webkit's default error handler */1260 /* The unholy trinity; also ignored in Webkit's default error handler */
@@ -1262,10 +1269,18 @@
1262 return FALSE;1269 return FALSE;
1263 }1270 }
12641271
1265 title = g_strdup_printf (_("Error - %s"), uri);1272 title = g_strdup_printf (_("'%s' can't be found"), midori_uri_parse_hostname(uri, NULL));
1266 message = g_strdup_printf (_("The page '%s' couldn't be loaded."), uri);1273 message = g_strdup_printf (_("The page '%s' couldn't be loaded:"), midori_uri_parse_hostname(uri, NULL));
1267 result = midori_view_display_error (view, uri, title,1274
1268 message, error->message, _("Try again"), web_frame);1275 suggestions = g_string_new ("<ul id=\"suggestions\"><li>");
1276 g_string_append_printf (suggestions, "%s</li><li>%s</li><li>%s</li></ul>",
1277 _("Check the address for typos"),
1278 _("Make sure that an ethernet cable is plugged in or the wireless card is activated"),
1279 _("Verify that your network settings are correct"));
1280
1281 result = midori_view_display_error (view, uri, "stock://network-error", title,
1282 message, error->message, g_string_free (suggestions, FALSE),
1283 _("Try Again"), web_frame);
1269 g_free (message);1284 g_free (message);
1270 g_free (title);1285 g_free (title);
1271 return result;1286 return result;
@@ -1397,8 +1412,8 @@
1397 const gchar* uri = webkit_web_view_get_uri (web_view);1412 const gchar* uri = webkit_web_view_get_uri (web_view);
1398 gchar* title = g_strdup_printf (_("Oops - %s"), uri);1413 gchar* title = g_strdup_printf (_("Oops - %s"), uri);
1399 gchar* message = g_strdup_printf (_("Something went wrong with '%s'."), uri);1414 gchar* message = g_strdup_printf (_("Something went wrong with '%s'."), uri);
1400 midori_view_display_error (view, uri, title,1415 midori_view_display_error (view, uri, NULL, title,
1401 message, "", _("Try again"), NULL);1416 message, "", NULL, _("Try again"), NULL);
1402 g_free (message);1417 g_free (message);
1403 g_free (title);1418 g_free (title);
1404}1419}
@@ -4093,15 +4108,16 @@
4093 else if (!strcmp (uri, "about:private"))4108 else if (!strcmp (uri, "about:private"))
4094 {4109 {
4095 data = g_strdup_printf (4110 data = g_strdup_printf (
4096 "<html><head><title>%s</title>"4111 "<html dir=\"ltr\"><head><title>%s</title>"
4097 "<link rel=\"stylesheet\" type=\"text/css\" href=\"res://about.css\">"4112 "<link rel=\"stylesheet\" type=\"text/css\" href=\"res://about.css\">"
4098 "</head><body><div id=\"container\">"4113 "</head>"
4099 "<img id=\"logo\" src=\"res://logo-shade.png\" "4114 "<body>"
4100 "style=\"position: absolute; right: 15px; bottom: 15px; z-index: -9;\">"4115 "<img id=\"logo\" src=\"res://logo-shade.png\" />"
4101 "<img id=\"icon\" src=\"stock://gtk-dialog-info\">"4116 "<div id=\"main\" style=\"background-image: url(stock://gtk-dialog-info);\">"
4102 "<div id=\"main\"><h1>%s</h1>"4117 "<div id=\"text\">"
4103 "<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li></ul>"4118 "<h1>%s</h1>"
4104 "<p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>"4119 "<p class=\"message\">%s</p><ul class=\" suggestions\"><li>%s</li><li>%s</li><li>%s</li></ul>"
4120 "<p class=\"message\">%s</p><ul class=\" suggestions\"><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>"
4105 "</div><br style=\"clear: both\"></div></body></html>",4121 "</div><br style=\"clear: both\"></div></body></html>",
4106 _("Private Browsing"), _("Private Browsing"),4122 _("Private Browsing"), _("Private Browsing"),
4107 _("Midori doesn't store any personal data:"),4123 _("Midori doesn't store any personal data:"),
@@ -4204,8 +4220,10 @@
4204 midori_tab_set_uri (MIDORI_TAB (view), uri);4220 midori_tab_set_uri (MIDORI_TAB (view), uri);
4205 midori_tab_set_special (MIDORI_TAB (view), TRUE);4221 midori_tab_set_special (MIDORI_TAB (view), TRUE);
4206 katze_item_set_meta_integer (view->item, "delay", MIDORI_DELAY_PENDING_UNDELAY);4222 katze_item_set_meta_integer (view->item, "delay", MIDORI_DELAY_PENDING_UNDELAY);
4207 midori_view_display_error (view, NULL, NULL, _("Page loading delayed"),4223 midori_view_display_error (view, NULL, "stock://network-idle", NULL,
4224 _("Page loading delayed:"),
4208 _("Loading delayed either due to a recent crash or startup preferences."),4225 _("Loading delayed either due to a recent crash or startup preferences."),
4226 NULL,
4209 _("Load Page"),4227 _("Load Page"),
4210 NULL);4228 NULL);
4211 }4229 }

Subscribers

People subscribed via source and target branches

to all changes: