Merge lp:~aacid/unity8/noArtShapeSizeForRegularCards into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 2552
Merged at revision: 2620
Proposed branch: lp:~aacid/unity8/noArtShapeSizeForRegularCards
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/noImplicitHeightForCardGridCards
Diff against target: 169 lines (+3/-15)
13 files modified
plugins/Dash/CardCreator.js (+3/-3)
tests/plugins/Dash/cardcreator/1.res (+0/-1)
tests/plugins/Dash/cardcreator/10.res (+0/-1)
tests/plugins/Dash/cardcreator/11.res (+0/-1)
tests/plugins/Dash/cardcreator/12.res (+0/-1)
tests/plugins/Dash/cardcreator/2.res (+0/-1)
tests/plugins/Dash/cardcreator/3.res (+0/-1)
tests/plugins/Dash/cardcreator/4.res (+0/-1)
tests/plugins/Dash/cardcreator/5.res (+0/-1)
tests/plugins/Dash/cardcreator/6.res (+0/-1)
tests/plugins/Dash/cardcreator/7.res (+0/-1)
tests/plugins/Dash/cardcreator/8.res (+0/-1)
tests/plugins/Dash/cardcreator/9.res (+0/-1)
To merge this branch: bzr merge lp:~aacid/unity8/noArtShapeSizeForRegularCards
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+301054@code.launchpad.net

Commit message

Remove artShapeSize from non cardtool cards

artShapeSize is only used in the cardtool card to read the value them we pass down in fixedArtShapeSize

According to qmlprofiler evaluating this useless binding accounts for ~0.5% when scrolling up and down a very long scope

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2549
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1805/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2359
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1267
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1267
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1267
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2387
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2274
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2274
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2274
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2267/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2267
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2267/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1805/rebuild

review: Needs Fixing (continuous-integration)
2550. By Albert Astals Cid

Merge

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2550
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1906/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2482/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2510
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2396
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2396
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2396
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2389/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2389/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2389/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2389
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2389/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1906/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
review: Needs Fixing
2551. By Albert Astals Cid

Combine the ifs

2552. By Albert Astals Cid

cimi prefers it this way

Revision history for this message
Albert Astals Cid (aacid) wrote :

Fixed the review comments

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2552
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2027/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2658
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1458
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1458/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1458
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2686
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2559
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2559
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2559
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2553/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2553
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2553/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2027/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/CardCreator.js'
2--- plugins/Dash/CardCreator.js 2016-08-08 08:32:27 +0000
3+++ plugins/Dash/CardCreator.js 2016-08-24 15:51:21 +0000
4@@ -506,10 +506,10 @@
5 }
6
7 if (hasArt) {
8- code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
9-
10 var artShapeAspect;
11 if (isCardTool) {
12+ code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
13+
14 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
15 if (isNaN(artShapeAspect)) {
16 artShapeAspect = 1;
17@@ -573,7 +573,7 @@
18 .arg(artShapeHolderShapeCode)
19 .arg(fallbackStatusCode)
20 .arg(fallbackURICode);
21- } else {
22+ } else if (isCardTool) {
23 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
24 }
25
26
27=== modified file 'tests/plugins/Dash/cardcreator/1.res'
28--- tests/plugins/Dash/cardcreator/1.res 2016-06-28 15:38:21 +0000
29+++ tests/plugins/Dash/cardcreator/1.res 2016-08-24 15:51:21 +0000
30@@ -11,7 +11,6 @@
31 property int fixedHeaderHeight: -1;
32 property size fixedArtShapeSize: Qt.size(-1, -1);
33 signal action(var actionId);
34-readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
35 Loader {
36 id: artShapeLoader;
37 height: root.fixedArtShapeSize.height;
38
39=== modified file 'tests/plugins/Dash/cardcreator/10.res'
40--- tests/plugins/Dash/cardcreator/10.res 2016-05-26 14:53:20 +0000
41+++ tests/plugins/Dash/cardcreator/10.res 2016-08-24 15:51:21 +0000
42@@ -49,7 +49,6 @@
43 }
44 }
45 }
46-readonly property size artShapeSize: Qt.size(-1, -1);
47 readonly property int headerHeight: row.height;
48 Row {
49 id: row;
50
51=== modified file 'tests/plugins/Dash/cardcreator/11.res'
52--- tests/plugins/Dash/cardcreator/11.res 2016-06-28 15:38:21 +0000
53+++ tests/plugins/Dash/cardcreator/11.res 2016-08-24 15:51:21 +0000
54@@ -49,7 +49,6 @@
55 }
56 }
57 }
58-readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
59 Loader {
60 id: artShapeLoader;
61 height: root.fixedArtShapeSize.height;
62
63=== modified file 'tests/plugins/Dash/cardcreator/12.res'
64--- tests/plugins/Dash/cardcreator/12.res 2016-06-28 15:38:21 +0000
65+++ tests/plugins/Dash/cardcreator/12.res 2016-08-24 15:51:21 +0000
66@@ -11,7 +11,6 @@
67 property int fixedHeaderHeight: -1;
68 property size fixedArtShapeSize: Qt.size(-1, -1);
69 signal action(var actionId);
70-readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
71 Loader {
72 id: artShapeLoader;
73 height: root.fixedArtShapeSize.height;
74
75=== modified file 'tests/plugins/Dash/cardcreator/2.res'
76--- tests/plugins/Dash/cardcreator/2.res 2016-05-26 14:53:20 +0000
77+++ tests/plugins/Dash/cardcreator/2.res 2016-08-24 15:51:21 +0000
78@@ -49,7 +49,6 @@
79 }
80 }
81 }
82-readonly property size artShapeSize: Qt.size(-1, -1);
83 readonly property int headerHeight: row.height;
84 Row {
85 id: row;
86
87=== modified file 'tests/plugins/Dash/cardcreator/3.res'
88--- tests/plugins/Dash/cardcreator/3.res 2016-08-03 15:49:54 +0000
89+++ tests/plugins/Dash/cardcreator/3.res 2016-08-24 15:51:21 +0000
90@@ -11,7 +11,6 @@
91 property int fixedHeaderHeight: -1;
92 property size fixedArtShapeSize: Qt.size(-1, -1);
93 signal action(var actionId);
94-readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
95 Loader {
96 id: artShapeLoader;
97 height: root.fixedArtShapeSize.height;
98
99=== modified file 'tests/plugins/Dash/cardcreator/4.res'
100--- tests/plugins/Dash/cardcreator/4.res 2016-05-26 14:53:20 +0000
101+++ tests/plugins/Dash/cardcreator/4.res 2016-08-24 15:51:21 +0000
102@@ -11,7 +11,6 @@
103 property int fixedHeaderHeight: -1;
104 property size fixedArtShapeSize: Qt.size(-1, -1);
105 signal action(var actionId);
106-readonly property size artShapeSize: Qt.size(-1, -1);
107 readonly property int headerHeight: row.height;
108 Row {
109 id: row;
110
111=== modified file 'tests/plugins/Dash/cardcreator/5.res'
112--- tests/plugins/Dash/cardcreator/5.res 2016-06-28 15:38:21 +0000
113+++ tests/plugins/Dash/cardcreator/5.res 2016-08-24 15:51:21 +0000
114@@ -11,7 +11,6 @@
115 property int fixedHeaderHeight: -1;
116 property size fixedArtShapeSize: Qt.size(-1, -1);
117 signal action(var actionId);
118-readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
119 Loader {
120 id: artShapeLoader;
121 height: root.fixedArtShapeSize.height;
122
123=== modified file 'tests/plugins/Dash/cardcreator/6.res'
124--- tests/plugins/Dash/cardcreator/6.res 2016-05-26 14:53:20 +0000
125+++ tests/plugins/Dash/cardcreator/6.res 2016-08-24 15:51:21 +0000
126@@ -49,7 +49,6 @@
127 }
128 }
129 }
130-readonly property size artShapeSize: Qt.size(-1, -1);
131 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
132 Item {
133 id: headerTitleContainer;
134
135=== modified file 'tests/plugins/Dash/cardcreator/7.res'
136--- tests/plugins/Dash/cardcreator/7.res 2016-05-26 14:53:20 +0000
137+++ tests/plugins/Dash/cardcreator/7.res 2016-08-24 15:51:21 +0000
138@@ -49,7 +49,6 @@
139 }
140 }
141 }
142-readonly property size artShapeSize: Qt.size(-1, -1);
143 readonly property int headerHeight: row.height;
144 Row {
145 id: row;
146
147=== modified file 'tests/plugins/Dash/cardcreator/8.res'
148--- tests/plugins/Dash/cardcreator/8.res 2016-05-26 14:53:20 +0000
149+++ tests/plugins/Dash/cardcreator/8.res 2016-08-24 15:51:21 +0000
150@@ -49,7 +49,6 @@
151 }
152 }
153 }
154-readonly property size artShapeSize: Qt.size(-1, -1);
155 readonly property int headerHeight: row.height;
156 Row {
157 id: row;
158
159=== modified file 'tests/plugins/Dash/cardcreator/9.res'
160--- tests/plugins/Dash/cardcreator/9.res 2016-05-20 14:53:04 +0000
161+++ tests/plugins/Dash/cardcreator/9.res 2016-08-24 15:51:21 +0000
162@@ -11,7 +11,6 @@
163 property int fixedHeaderHeight: -1;
164 property size fixedArtShapeSize: Qt.size(-1, -1);
165 signal action(var actionId);
166-readonly property size artShapeSize: Qt.size(-1, -1);
167 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;
168 Label {
169 id: titleLabel;

Subscribers

People subscribed via source and target branches