Merge lp:~zsombi/ubuntu-ui-toolkit/asyncAPL into lp:ubuntu-ui-toolkit/staging
- asyncAPL
- Merge into staging
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Zsombor Egri | ||||
Approved revision: | 1842 | ||||
Merged at revision: | 1867 | ||||
Proposed branch: | lp:~zsombi/ubuntu-ui-toolkit/asyncAPL | ||||
Merge into: | lp:ubuntu-ui-toolkit/staging | ||||
Prerequisite: | lp:~zsombi/ubuntu-ui-toolkit/redoSoneTests | ||||
Diff against target: |
96 lines (+32/-7) 3 files modified
components.api (+1/-0) src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+12/-7) tests/unit_x11/tst_components/tst_adaptivepagelayout.qml (+19/-0) |
||||
To merge this branch: | bzr merge lp:~zsombi/ubuntu-ui-toolkit/asyncAPL | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Review via email:
|
This proposal supersedes a proposal from 2016-02-10.
Commit message
Introduce AdaptivePageLay
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrea Bernabei (faenil) wrote : Posted in a previous version of this proposal | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1839
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1839
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1839
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1839
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1839
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal | # |
- property color highlightColor: theme.palette.
69 + property color highlightColor: theme.palette.
Rogue change?
Other than that, looks good to me.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1840
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1840
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1840
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:1840
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:1840
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1841
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
- 1842. By Zsombor Egri
-
staging sync
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:1842
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) : | # |
Preview Diff
1 | === modified file 'components.api' |
2 | --- components.api 2016-02-17 12:57:49 +0000 |
3 | +++ components.api 2016-02-24 06:41:18 +0000 |
4 | @@ -83,6 +83,7 @@ |
5 | property bool onScreen |
6 | property bool running |
7 | Ubuntu.Components.AdaptivePageLayout 1.3: PageTreeNode |
8 | + property bool asynchronous |
9 | readonly property int columns |
10 | property list<PageColumnsLayou> layouts |
11 | function var addPageToCurrentColumn(var sourcePage, var page, var properties) |
12 | |
13 | === modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml' |
14 | --- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-02-15 13:19:05 +0000 |
15 | +++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-02-24 06:41:18 +0000 |
16 | @@ -216,13 +216,17 @@ |
17 | /*! |
18 | The property specifies the source of the primaryPage in case the primary |
19 | page is created from a Component or loaded from an external document. It |
20 | - has precedence over \l primaryPage. The page specified in this way will |
21 | - be cerated asynchronously and the instance will be reported through |
22 | - \l primaryPage property. |
23 | + has precedence over \l primaryPage. |
24 | */ |
25 | property var primaryPageSource |
26 | |
27 | /*! |
28 | + The property drives the way the pages should be loaded, synchronously or |
29 | + asynchronously. Defaults to true. |
30 | + */ |
31 | + property bool asynchronous: true |
32 | + |
33 | + /*! |
34 | \qmlproperty int columns |
35 | \readonly |
36 | The property holds the number of columns shown in the layout. |
37 | @@ -244,9 +248,10 @@ |
38 | is created. \c sourcePage must be active. |
39 | |
40 | The function creates the new page asynchronously if the new \c page to be |
41 | - added is a Component or a QML document. In this case the function returns |
42 | - an incubator which can be used to track the page creation.For more about |
43 | - incubation in QML and creating components asynchronously, see |
44 | + added is a Component or a QML document and the \l asynchronous property is |
45 | + set to true. In this case the function returns an incubator which can be |
46 | + used to track the page creation. For more about incubation in QML and creating |
47 | + components asynchronously, see |
48 | \l {http://doc.qt.io/qt-5/qml-qtqml-component.html#incubateObject-method} |
49 | {Component.incubateObject()}. |
50 | The following example removes an element from the list model whenever the |
51 | @@ -463,7 +468,7 @@ |
52 | } |
53 | |
54 | function createWrapper(page, properties) { |
55 | - var wrapperObject = pageWrapperComponent.createObject(hiddenPages, {synchronous: false}); |
56 | + var wrapperObject = pageWrapperComponent.createObject(hiddenPages, {synchronous: !layout.asynchronous}); |
57 | wrapperObject.pageStack = layout; |
58 | wrapperObject.properties = properties; |
59 | // set reference last because it will trigger creation of the object |
60 | |
61 | === modified file 'tests/unit_x11/tst_components/tst_adaptivepagelayout.qml' |
62 | --- tests/unit_x11/tst_components/tst_adaptivepagelayout.qml 2016-01-18 17:06:47 +0000 |
63 | +++ tests/unit_x11/tst_components/tst_adaptivepagelayout.qml 2016-02-24 06:41:18 +0000 |
64 | @@ -160,6 +160,7 @@ |
65 | compare(defaults.primaryPageSource, undefined, "primaryPageSource not set by default"); |
66 | compare(defaults.layouts.length, 0, "no layouts by default"); |
67 | compare(defaults.columns, columns, columns + " column(s) as default"); |
68 | + compare(defaults.asynchronous, true, "default page loading is asynchronous"); |
69 | |
70 | verify(page1.active, "Page1 is not active but should be! Bug(1535241)"); |
71 | verify(!page2.active, "Page2 is active but should not be! Bug(1535241)"); |
72 | @@ -290,6 +291,24 @@ |
73 | } |
74 | } |
75 | |
76 | + function test_forced_synchronous_loading_bug1540449_data() { |
77 | + return [ |
78 | + {tag: "To current column", func: "addPageToCurrentColumn", page: pageComponent, expectedTitle: "DynamicPage"}, |
79 | + {tag: "To next column", func: "addPageToNextColumn", page: pageComponent, expectedTitle: "DynamicPage"}, |
80 | + ]; |
81 | + } |
82 | + function test_forced_synchronous_loading_bug1540449(data) { |
83 | + layout[data.func](layout.primaryPage, data.page); |
84 | + waitForRendering(layout, 400); |
85 | + |
86 | + var wrapper = getPageWrapper(layout, layout.primaryPage); |
87 | + verify(wrapper); |
88 | + var testColumn = MathUtils.clamp(wrapper.column + (data.func == "addPageToCurrentColumn" ? 0 : 1), |
89 | + 0, layout.columns - 1); |
90 | + var testHolder = getColumnHolder(layout, testColumn); |
91 | + compare(testHolder.pageWrapper.object.title, data.expectedTitle, "page not found"); |
92 | + } |
93 | + |
94 | function test_asynchronous_page_loading_incubator_forcecompletion() { |
95 | var incubator = layout.addPageToCurrentColumn(layout.primaryPage, pageComponent); |
96 | verify(incubator, "Page added synchronously!"); |
just a tiny comment