Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3500 closed defect (fixed)

Better error message when a page can not be loaded

Reported by: erikos Owned by: humitos
Priority: Normal Milestone:
Component: Browse Version: Git as of bugdate
Severity: Unspecified Keywords: patch
Cc: manuq, humitos Distribution/OS: Unspecified
Bug Status: New

Description

At the momet we do get the standard error message. Have the message translated etc.

Attachments (5)

Browse_not_connected_to_internet_mesage.png (56.7 KB) - added by garycmartin 9 years ago.
Browse_page_could_not_be_found_mesage.png (57.1 KB) - added by garycmartin 9 years ago.
0001-Error-page-SL-3500.patch (11.7 KB) - added by humitos 9 years ago.
Browse_unable_to_load_page.png (62.1 KB) - added by garycmartin 9 years ago.
0001-Error-page-SL-3500.2.patch (12.2 KB) - added by humitos 9 years ago.
v2

Download all attachments as: .zip

Change History (19)

comment:1 Changed 9 years ago by manuq

  • Cc manuq added

comment:2 Changed 9 years ago by manuq

We need to handle the load-error signal to display our custom page.

http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#WebKitWebView-load-error

"By default, if the signal is not handled, the web_view will display a stock error page. You need to handle the signal if you want to provide your own error page."

Epiphany does this in load_error_cb of embed/ephy-web-view.c .

comment:3 Changed 9 years ago by humitos

  • Cc humitos added
  • Priority changed from Unspecified by Maintainer to Normal

comment:4 Changed 9 years ago by humitos

  • Owner changed from erikos to humitos
  • Status changed from new to accepted

There is a ticket related with this one

http://dev.laptop.org/ticket/2520

comment:5 Changed 9 years ago by garycmartin

Thanks for digging out that old ticket humitos. I do like the design and intent behind the two mockup images from Eben, though the wording for no-network-error would need a little adjustment regarding the reference to mesh, and the black background with white content should be swapped to closer match current designs:

http://dev.laptop.org/attachment/ticket/2520/activity_browse_no-network-error.png
http://dev.laptop.org/attachment/ticket/2520/activity_browse_page-not-found-error.png

I'll attach a mockup of the two above cases to this ticket.

Changed 9 years ago by garycmartin

Changed 9 years ago by garycmartin

comment:6 Changed 9 years ago by garycmartin

Just added mockups of the two example Sugar friendly messages. Any more cases of Brows error messages that need work?

Changed 9 years ago by humitos

comment:7 follow-up: Changed 9 years ago by humitos

Gary: I've just see your last comment. WebKit doesn't make different between being connected to internet or not. It just says: "Cannot resolve hostname (google.com)" and the error code is always "2".

So, we need another way to check if we are connected to the internet or not and make that difference. Any idea?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 9 years ago by garycmartin

Replying to humitos:

Gary: I've just see your last comment. WebKit doesn't make different between being connected to internet or not. It just says: "Cannot resolve hostname (google.com)" and the error code is always "2".

So, we need another way to check if we are connected to the internet or not and make that difference. Any idea?

Blast, I hoped webkit had some hooks. I had a quick look at using javascript testing navigator.onLine, but that always seems to be reporting that our browser is online (even when it isn't), and most other scripts 'phone home' to their servers to test for internet access (which is not a general enough solution for us). Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 9 years ago by humitos

Replying to garycmartin:

Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.

Thanks. I think it's very useful to show the url typed to know if we made some mistake or not.

Changed 9 years ago by garycmartin

comment:10 in reply to: ↑ 9 Changed 9 years ago by garycmartin

Replying to humitos:

Replying to garycmartin:

Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.

Thanks. I think it's very useful to show the url typed to know if we made some mistake or not.

I've just added a mockup with updated wording to cover for the error case that webkit provides for. Please keep an eye on how the text layout flows when the URL is long (lots of web sites these days have quite deep URL structures so will be fairly common).

Changed 9 years ago by humitos

v2

comment:11 Changed 9 years ago by humitos

  • Keywords patch added

comment:12 Changed 9 years ago by manuq

  • Resolution set to fixed
  • Status changed from accepted to closed

Great, I will push it with the small changes described below, and I have noticed the following things to be solved later:

  • the error page doesn't show the faulty url, the url entry is empty (it is displayed if you switch to another tab and go back to the tab with the error page)
  • pdf tabs don't display error page when there is no internet connection
  • button color is in a slightly different grey tone than sugar buttons

What I've changed:

  • converted tabs to spaces in from the error page template
  • removed the bottom margin because otherwise the page can scroll unnecessarily:
--- a/data/error_page.tmpl
+++ b/data/error_page.tmpl
@@ -39,7 +39,7 @@
       #container {
           /* we need double percent sign here because
              of Python sustitution */
-         margin: 15%%;
+         margin: 15%% 15%% 0 15%%;
       }
     </style>
   </head>

Pushed as e9915e3d .

comment:13 Changed 9 years ago by humitos

These improvements are tracked in #3969. Thanks!

comment:14 Changed 8 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.