Merge lp:~artmello/webbrowser-app/webbrowser-app-changes_on_new_tab into lp:webbrowser-app

Proposed by Arthur Mello
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 620
Merged at revision: 629
Proposed branch: lp:~artmello/webbrowser-app/webbrowser-app-changes_on_new_tab
Merge into: lp:webbrowser-app
Diff against target: 74 lines (+35/-4)
3 files modified
src/app/webbrowser/Favicon.qml (+25/-0)
src/app/webbrowser/PageDelegate.qml (+9/-1)
src/app/webbrowser/UrlDelegate.qml (+1/-3)
To merge this branch: bzr merge lp:~artmello/webbrowser-app/webbrowser-app-changes_on_new_tab
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Olivier Tilloy Approve
Review via email: mp+226300@code.launchpad.net

Commit message

Use favicons in place of blank thumbnails in the new tab view.

Description of the change

Use favicons in place of blank thumbnails
Show an empty Bookmarks section if no bookmarks exist

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:616
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/935/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1807/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1521
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-amd64-ci/134
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/134
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/134/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-i386-ci/134
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2068/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2889
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2889/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9626
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1274
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1708
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1708/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/webbrowser-app-ci/935/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

I’m getting the following error when trying to launch the application:

    file:///home/osomon/dev/phablet/browser/webbrowser-app/src/app/webbrowser/PageDelegate.qml:29 Duplicate property name

(hint: merge the latest changes from trunk into your branch)

review: Needs Fixing
Revision history for this message
Olivier Tilloy (osomon) wrote :

Once the above error is fixed (just remove "property url icon" from PageDelegate.qml), a couple of remarks on the visual aspect:

 - I wouldn’t embed the icon in an UbuntuShape, that makes a lot of nested shapes, and it’s visually loaded up

 - Favicons tend to be low-resolution images that don’t scale up well, so they should have a fixed size. Have a look at what I did in UrlDelegate.qml, you probably want to factor that out in a common Favicon component that can be used by PageDelegate and UrlDelegate.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Why the change to NewTabView.qml ? I’m not sure it makes sense to display an empty bookmarks section, does it?

Revision history for this message
Arthur Mello (artmello) wrote :

> Why the change to NewTabView.qml ? I’m not sure it makes sense to display an
> empty bookmarks section, does it?

It was requested on the Browser UX Freeze Plan doc. I think the issue was that when the user has no Bookmarks he does not know that bookmarks can be displayed there.

Revision history for this message
Olivier Tilloy (osomon) wrote :

> > Why the change to NewTabView.qml ? I’m not sure it makes sense to display an
> > empty bookmarks section, does it?
>
> It was requested on the Browser UX Freeze Plan doc. I think the issue was that
> when the user has no Bookmarks he does not know that bookmarks can be
> displayed there.

In that case there should be a message stating that there are no bookmarks, otherwise I think it’s even more confusing, people will think it’s a bug or something.

617. By Arthur Mello

Merge with trunk

618. By Arthur Mello

Create a Favicon component
Reduce size of the Favicon on the PageDelegate
Remove UbuntuShape from the Favicon on the PageDelegate

619. By Arthur Mello

Do not show empty sections on NewTabView

Revision history for this message
Arthur Mello (artmello) wrote :

> Once the above error is fixed (just remove "property url icon" from
> PageDelegate.qml), a couple of remarks on the visual aspect:
>
> - I wouldn’t embed the icon in an UbuntuShape, that makes a lot of nested
> shapes, and it’s visually loaded up
>
> - Favicons tend to be low-resolution images that don’t scale up well, so they
> should have a fixed size. Have a look at what I did in UrlDelegate.qml, you
> probably want to factor that out in a common Favicon component that can be
> used by PageDelegate and UrlDelegate.

Fixed on rev618

Revision history for this message
Arthur Mello (artmello) wrote :

> > > Why the change to NewTabView.qml ? I’m not sure it makes sense to display
> an
> > > empty bookmarks section, does it?
> >
> > It was requested on the Browser UX Freeze Plan doc. I think the issue was
> that
> > when the user has no Bookmarks he does not know that bookmarks can be
> > displayed there.
>
> In that case there should be a message stating that there are no bookmarks,
> otherwise I think it’s even more confusing, people will think it’s a bug or
> something.

I'm not sure if I like the section with an "empty bookmarks" message. That would use some space that could be better used to display history if there is no bookmarks. Anyway I removed the change on r619 and added a comment to the Browser UX Freeze Plan doc

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

In Favicon.qml:

 - the id is unused, it can be removed

 - you need to add an import for "Ubuntu.Components 0.1", as you’re referring to units.dp(), which is part of the Ubuntu UITK

review: Needs Fixing
620. By Arthur Mello

Minor changes on Favicon

Revision history for this message
Arthur Mello (artmello) wrote :

> In Favicon.qml:
>
> - the id is unused, it can be removed
>
> - you need to add an import for "Ubuntu.Components 0.1", as you’re referring
> to units.dp(), which is part of the Ubuntu UITK

Fixed on r620

Revision history for this message
Olivier Tilloy (osomon) wrote :

LGTM.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'src/app/webbrowser/Favicon.qml'
2--- src/app/webbrowser/Favicon.qml 1970-01-01 00:00:00 +0000
3+++ src/app/webbrowser/Favicon.qml 2014-07-11 16:17:35 +0000
4@@ -0,0 +1,25 @@
5+/*
6+ * Copyright 2014 Canonical Ltd.
7+ *
8+ * This file is part of webbrowser-app.
9+ *
10+ * webbrowser-app is free software; you can redistribute it and/or modify
11+ * it under the terms of the GNU General Public License as published by
12+ * the Free Software Foundation; version 3.
13+ *
14+ * webbrowser-app is distributed in the hope that it will be useful,
15+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+ * GNU General Public License for more details.
18+ *
19+ * You should have received a copy of the GNU General Public License
20+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ */
22+
23+import QtQuick 2.0
24+import Ubuntu.Components 0.1
25+
26+Image {
27+ width: units.dp(16)
28+ height: units.dp(16)
29+}
30
31=== modified file 'src/app/webbrowser/PageDelegate.qml'
32--- src/app/webbrowser/PageDelegate.qml 2014-07-09 10:11:10 +0000
33+++ src/app/webbrowser/PageDelegate.qml 2014-07-11 16:17:35 +0000
34@@ -24,8 +24,8 @@
35
36 property url url
37 property alias thumbnail: thumbnail.source
38+ property alias icon: icon.source
39 property alias label: label.text
40- property url icon
41 property bool canClose: false
42 property bool canBookmark: false
43 property bool bookmarked
44@@ -54,6 +54,14 @@
45 image: Image {
46 id: thumbnail
47 }
48+
49+ // Show the favicon if no thumbnail defined for the url
50+ Favicon {
51+ id: icon
52+ anchors.centerIn: parent
53+
54+ visible: !thumbnail.source.toString()
55+ }
56 }
57
58 MouseArea {
59
60=== modified file 'src/app/webbrowser/UrlDelegate.qml'
61--- src/app/webbrowser/UrlDelegate.qml 2014-07-09 10:35:00 +0000
62+++ src/app/webbrowser/UrlDelegate.qml 2014-07-11 16:17:35 +0000
63@@ -42,11 +42,9 @@
64 height: parent.height
65 width: parent.height
66
67- Image {
68+ Favicon {
69 id: icon
70 anchors.centerIn: parent
71- width: units.dp(16)
72- height: units.dp(16)
73 }
74 }
75

Subscribers

People subscribed via source and target branches

to status/vote changes: