Merge lp://qastaging/~fboucault/ubuntu-ui-toolkit/flickable_right_speed into lp://qastaging/ubuntu-ui-toolkit/staging

Proposed by Florian Boucault
Status: Rejected
Rejected by: Florian Boucault
Proposed branch: lp://qastaging/~fboucault/ubuntu-ui-toolkit/flickable_right_speed
Merge into: lp://qastaging/ubuntu-ui-toolkit/staging
Diff against target: 138 lines (+84/-0)
5 files modified
components.api (+6/-0)
modules/Ubuntu/Components/Flickable.qml (+23/-0)
modules/Ubuntu/Components/GridView.qml (+23/-0)
modules/Ubuntu/Components/ListView.qml (+23/-0)
modules/Ubuntu/Components/qmldir (+9/-0)
To merge this branch: bzr merge lp://qastaging/~fboucault/ubuntu-ui-toolkit/flickable_right_speed
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Florian Boucault (community) Needs Fixing
Tim Peeters Needs Fixing
Review via email: mp+229343@code.qastaging.launchpad.net

Commit message

Override flickDeceleration and maximumFlickVelocity to respect resolution independence in Flickable, GridView and ListView.

This implicit technique works nearly all the time: a survey of 361 + 32 + 191 uses of ListView, GridView and Flickable in apps for Ubuntu show only 4 of the source files that do not import Ubuntu.Components.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

The survey technique:

grep -r --include="*.qml" Flickable . | wc -l
grep -L "import Ubuntu.Components " `grep -r -l --include="*.qml" Flickable .`

Revision history for this message
Florian Boucault (fboucault) wrote :

Unity8, Camera, Gallery and System Settings have workarounds for that bug that can be removed:

./unity8/qml/Components/Carousel.qml: maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
./unity8/qml/Components/Carousel.qml: flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
./unity8/qml/Dash/ScopeListView.qml: maximumFlickVelocity: height * 10
./unity8/qml/Dash/ScopeListView.qml: flickDeceleration: height * 2
./unity8/qml/Dash/DashContent.qml: maximumFlickVelocity: width * 5
./unity8/qml/Dash/DashContent.qml: flickDeceleration: units.gu(625)
./unity8/qml/Dash/PreviewListView.qml: maximumFlickVelocity: width * 5
./unity8/qml/Dash/PreviewListView.qml: flickDeceleration: units.gu(625)
./unity8/qml/Greeter/LoginList.qml: flickDeceleration: 10000

./camera-app/SlideshowView.qml: flickDeceleration = flickDeceleration * scaleFactor;
./camera-app/SlideshowView.qml: maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
./camera-app/PhotogridView.qml: flickDeceleration = flickDeceleration * scaleFactor;
./camera-app/PhotogridView.qml: maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
./camera-app/camera-app.qml: flickDeceleration = flickDeceleration * scaleFactor;
./camera-app/camera-app.qml: maximumFlickVelocity = maximumFlickVelocity * scaleFactor;

./gallery-app/rc/qml/Components/Checkerboard.qml: flickDeceleration: 800
./gallery-app/rc/qml/Components/MediaGrid.qml: maximumFlickVelocity: units.gu(800)
./gallery-app/rc/qml/Components/MediaGrid.qml: flickDeceleration: maximumFlickVelocity * 0.5
./gallery-app/rc/qml/OrganicView/OrganicView.qml: maximumFlickVelocity: units.gu(350)
./gallery-app/rc/qml/OrganicView/OrganicView.qml: flickDeceleration: maximumFlickVelocity * 0.8
./gallery-app/rc/qml/OrganicView/OrganicMediaList.qml: maximumFlickVelocity: units.gu(300)
./gallery-app/rc/qml/OrganicView/OrganicMediaList.qml: flickDeceleration: maximumFlickVelocity / 3
./gallery-app/rc/qml/MediaViewer/MediaListView.qml: flickDeceleration: units.gu(3)
./gallery-app/rc/qml/MediaViewer/MediaListView.qml: maximumFlickVelocity: units.gu(500)

./ubuntu-system-settings/plugins/about/Software.qml: flickDeceleration: height * 2
./ubuntu-system-settings/plugins/about/Software.qml: maximumFlickVelocity: height * 10

Revision history for this message
Florian Boucault (fboucault) wrote :

The case of UbuntuWebView needs to be studied separately.
Reference:

./webbrowser-app/src/Ubuntu/Components/Extras/Browser/UbuntuWebView01.qml: maximumFlickVelocity: height * 5

Revision history for this message
Florian Boucault (fboucault) wrote :

One file in Unity8 does not import Ubuntu.Components yet uses a ListView:

unity8$ grep -L "import Ubuntu.Components " `grep -r -l --include="*.qml" ListView .`
./unity8/qml/Dash/Previews/PreviewImageGallery.qml

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

> The case of UbuntuWebView needs to be studied separately.
> Reference:
>
> ./webbrowser-app/src/Ubuntu/Components/Extras/Browser/UbuntuWebView01.qml:
> maximumFlickVelocity: height * 5

This is version 0.1 of the Ubuntu WebView API, which can be safely ignored, as it’s deprecated (and not even documented).

Version 0.2 of the API uses Oxide under the covers, and the Oxide WebView doesn’t inherit Flickable like the QtWebKit WebView did, so the mechanism is entirely different.

Oxide does use the value of GRID_UNIT_PX to compute the device scale factor (see http://bazaar.launchpad.net/~oxide-developers/oxide/oxide.trunk/view/head:/qt/core/base/oxide_qt_screen_utils.cc#L31), which in turn is a parameter of the gesture detector config (see http://bazaar.launchpad.net/~oxide-developers/oxide/oxide.trunk/view/head:/shared/browser/oxide_gesture_provider.cc).

So if the flick velocity and deceleration of the WebView are too different from those of flickables in the UITK, we might want to tweak the parameters in oxide_gesture_provider.cc.

Revision history for this message
Andrea Cimitan (cimi) wrote :

> One file in Unity8 does not import Ubuntu.Components yet uses a ListView:
>
> unity8$ grep -L "import Ubuntu.Components " `grep -r -l --include="*.qml"
> ListView .`
> ./unity8/qml/Dash/Previews/PreviewImageGallery.qml

https://code.launchpad.net/~cimi/unity8/import_ubuntu_components/+merge/229417

Revision history for this message
Andrea Cimitan (cimi) wrote :

When we land this, I will remove all the unity8 workarounds...

Revision history for this message
Andrea Cimitan (cimi) wrote :

Florian, apparently you forgot to push the Flickable file... (I can only see gridview and listview here)

1179. By Florian Boucault

Added Flickable. Fixed imports.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1180. By Florian Boucault

Merged from staging

1181. By Florian Boucault

Fixed up components.api

Revision history for this message
Florian Boucault (fboucault) wrote :

For some reason the dash breaks down completely with that patch.

1182. By Florian Boucault

Import latest QtQuick

Revision history for this message
Florian Boucault (fboucault) wrote :

> For some reason the dash breaks down completely with that patch.

Fixed with latest commit.

Revision history for this message
Tim Peeters (tpeeters) wrote :

> The survey technique:
>
> grep -r --include="*.qml" Flickable . | wc -l
> grep -L "import Ubuntu.Components " `grep -r -l --include="*.qml" Flickable
> .`

they might import like this:
import Ubuntu.Components 1.1 as Toolkit

Then if they use Flickable instead of Toolkit.Flickable, it won't be fixed automatically.

Revision history for this message
Florian Boucault (fboucault) wrote :

> > The survey technique:
> >
> > grep -r --include="*.qml" Flickable . | wc -l
> > grep -L "import Ubuntu.Components " `grep -r -l --include="*.qml" Flickable
> > .`
>
> they might import like this:
> import Ubuntu.Components 1.1 as Toolkit
>
> Then if they use Flickable instead of Toolkit.Flickable, it won't be fixed
> automatically.

Indeed but grepping revealed no such case so far.

Revision history for this message
Tim Peeters (tpeeters) wrote :

We have UbuntuListView which needs to be updated to inherit from Toolkit.ListView instead of QtQuick.ListView.

review: Needs Fixing
Revision history for this message
Tim Peeters (tpeeters) wrote :

because you need to import QtQuick 5.3, UITK now requires Qt 5.3, and thus we cannot develop or run UITK and UITK apps any more on trusty. Even though trusty was not supported for newer UITK any more, UITK still worked fine (and I some times work on it from a trusty machine).

Revision history for this message
Tim Peeters (tpeeters) wrote :

We do add API here, so maybe we should only export the new Flickable/ListView/GridView in Ubuntu.Components 1.1. That means apps that didn't change the import version yet need to update it.

Revision history for this message
Tim Peeters (tpeeters) wrote :

46 +import Ubuntu.Components 0.1
74 +import Ubuntu.Components 0.1
102 +import Ubuntu.Components 0.1

we should give the good example and import 1.1

Revision history for this message
Florian Boucault (fboucault) wrote :

> because you need to import QtQuick 5.3, UITK now requires Qt 5.3, and thus we
> cannot develop or run UITK and UITK apps any more on trusty. Even though
> trusty was not supported for newer UITK any more, UITK still worked fine (and
> I some times work on it from a trusty machine).

It is necessary otherwise people wanting the latest features of GridView etc. cannot have them.
And yes we do not support Qt5.2, so I don't think it is an issue.

Revision history for this message
Florian Boucault (fboucault) wrote :

> because you need to import QtQuick 5.3, UITK now requires Qt 5.3, and thus we
> cannot develop or run UITK and UITK apps any more on trusty. Even though
> trusty was not supported for newer UITK any more, UITK still worked fine (and
> I some times work on it from a trusty machine).

It is necessary to import 5.3 so that the latest features of GridView etc. are available to users.
And yeah we do not support Qt5.2 anymore.

Revision history for this message
Florian Boucault (fboucault) wrote :

> We do add API here, so maybe we should only export the new
> Flickable/ListView/GridView in Ubuntu.Components 1.1. That means apps that
> didn't change the import version yet need to update it.

We really want all apps to have the new value, now.

Revision history for this message
Florian Boucault (fboucault) wrote :

> > We do add API here, so maybe we should only export the new
> > Flickable/ListView/GridView in Ubuntu.Components 1.1. That means apps that
> > didn't change the import version yet need to update it.
>
> We really want all apps to have the new value, now.

In fact, it is not a new API, it is a bug fix.

Revision history for this message
Florian Boucault (fboucault) wrote :

> 46 +import Ubuntu.Components 0.1
> 74 +import Ubuntu.Components 0.1
> 102 +import Ubuntu.Components 0.1
>
> we should give the good example and import 1.1

I did that in case it would break apps that only import Ubuntu.Components 0.1

Revision history for this message
Florian Boucault (fboucault) wrote :

One case where is severely breaks down is attached components:

        ListView.onRemove: [...]

review: Needs Fixing
Revision history for this message
Tim Peeters (tpeeters) wrote :

> > 46 +import Ubuntu.Components 0.1
> > 74 +import Ubuntu.Components 0.1
> > 102 +import Ubuntu.Components 0.1
> >
> > we should give the good example and import 1.1
>
> I did that in case it would break apps that only import Ubuntu.Components 0.1

I don't think it will, but you can test it ;)

1.0 is the same as 0.1, so we could use at least 1.0 here.

Revision history for this message
Florian Boucault (fboucault) wrote :

> One case where is severely breaks down is attached components:
>
> ListView.onRemove: [...]

Error message is "Non-existent attached object"

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1181
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/731/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3043
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2415
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/563
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/563
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/563/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/563
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3085
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4286
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4286/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11009
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1997
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2683
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2683/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/731/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Florian Boucault (fboucault) wrote :

https://bugreports.qt-project.org/browse/QTBUG-15554 prevents us from fixing that I'm afraid.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1182
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/733/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3046
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2418
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/565
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/565
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/565/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/565
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3088
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4289
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4289/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11016
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1999
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2686
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2686/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/733/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

I really think now's the time to implement and propose an upstream fix, you've spent enough time trying to work around the issue :/

Can we commission someone to do that work?

Unmerged revisions

1182. By Florian Boucault

Import latest QtQuick

1181. By Florian Boucault

Fixed up components.api

1180. By Florian Boucault

Merged from staging

1179. By Florian Boucault

Added Flickable. Fixed imports.

1178. By Florian Boucault

Override flickDeceleration and maximumFlickVelocity to respect resolution independence in Flickable, GridView and ListView.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches