Merge lp:~renatofilho/address-book-app/fix-bottom-edge-animations into lp:~phablet-team/address-book-app/staging
- fix-bottom-edge-animations
- Merge into staging
Status: | Merged |
---|---|
Approved by: | Renato Araujo Oliveira Filho |
Approved revision: | 298 |
Merged at revision: | 299 |
Proposed branch: | lp:~renatofilho/address-book-app/fix-bottom-edge-animations |
Merge into: | lp:~phablet-team/address-book-app/staging |
Diff against target: |
389 lines (+136/-147) 2 files modified
src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml (+135/-147) tests/autopilot/address_book_app/pages/_common.py (+1/-0) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/fix-bottom-edge-animations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Gustavo Pichorim Boiko (community) | Approve | ||
Nekhelesh Ramananthan (community) | Needs Fixing | ||
Review via email: mp+232925@code.launchpad.net |
Commit message
Fixed bottom edge tip to appear on mouse press instead of click.
Make sure that the animation runs completely to avoid problems on the app (partial run could cause the page to not be pushed to stack)
Added a final animation when bottom edge page get fully visible. (Based on designer transition doc)
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:293
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:294
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:294
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:294
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:294
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Nekhelesh Ramananthan (nik90) wrote : | # |
It would be recommended to take https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:296
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:296
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Nekhelesh Ramananthan (nik90) wrote : | # |
When I try to merge this into the clock app's code, I get an error about referencing to an component not defined at the line,
214 + visible: root.isCollapsed
I searched for "root" in PageWithBottomE
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:297
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Nekhelesh Ramananthan (nik90) wrote : | # |
In your rev 292, you added a final animation when the bottom edge page gets fully visible (based on designer trasition doc). Can you provide a link to that document and also enable sharing with me please since that animation is causing the listview in the bottom edge page to jump up 4 grid units and then come down which is unpleasant. I want to show the document to the clock app designer to get his input.
279 + SmoothedAnimation {
280 + target: edgeLoader
281 + property: "anchors.topMargin"
282 + to: - units.gu(4)
283 + duration: UbuntuAnimation
284 + easing.type: Easing.Linear
285 + }
286 + SmoothedAnimation {
287 + target: edgeLoader
288 + property: "anchors.topMargin"
289 + to: 0
290 + duration: UbuntuAnimation
291 + easing: UbuntuAnimation
292 }
If you look at the bug report and also design doc at https:/
Also the bottom edge should reveal itself automatically after 5 seconds when the user has stopped interacting with the screen. I don't see any timer which does this. Also in my testing, this behavior was not observed.
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
@nik90
The bottom edge will be visible while it has focus.
If it is appearing invisible is because any other component in the UI is stoling the focus.
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
@nick90
This is the video showing the bottom edge animation: https:/
Gustavo Pichorim Boiko (boiko) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:298
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Gustavo Pichorim Boiko (boiko) wrote : | # |
Code looks good and works as expected!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
PS Jenkins bot (ps-jenkins) : | # |
Bill Filler (bfiller) wrote : | # |
works well on address book app. on dialer app after you press the back button on the Recents page it's kind of weird as the tab seems a bit jumpy once it hits the bottom and is partially revealed and then fully revealed. I would think that when hitting the back button you would just leave the tab fully revealed.
Preview Diff
1 | === modified file 'src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml' |
2 | --- src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml 2014-07-30 22:09:12 +0000 |
3 | +++ src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml 2014-09-16 14:32:25 +0000 |
4 | @@ -71,7 +71,7 @@ |
5 | property alias bottomEdgePageComponent: edgeLoader.sourceComponent |
6 | property alias bottomEdgePageSource: edgeLoader.source |
7 | property alias bottomEdgeTitle: tipLabel.text |
8 | - property alias bottomEdgeEnabled: bottomEdge.visible |
9 | + property bool bottomEdgeEnabled: true |
10 | property int bottomEdgeExpandThreshold: page.height * 0.2 |
11 | property int bottomEdgeExposedArea: bottomEdge.state !== "expanded" ? (page.height - bottomEdge.y - bottomEdge.tipHeight) : _areaWhenExpanded |
12 | property bool reloadBottomEdgePage: true |
13 | @@ -142,13 +142,97 @@ |
14 | z: 1 |
15 | } |
16 | |
17 | - Timer { |
18 | - id: hideIndicator |
19 | - |
20 | - interval: 3000 |
21 | - running: true |
22 | - repeat: false |
23 | - onTriggered: tip.hiden = true |
24 | + UbuntuShape { |
25 | + id: tip |
26 | + objectName: "bottomEdgeTip" |
27 | + |
28 | + property bool hidden: (activeFocus === false) || ((bottomEdge.y - units.gu(1)) < tip.y) |
29 | + |
30 | + enabled: mouseArea.enabled |
31 | + anchors { |
32 | + bottom: parent.bottom |
33 | + horizontalCenter: bottomEdge.horizontalCenter |
34 | + bottomMargin: hidden ? - height + units.gu(1) : -units.gu(1) |
35 | + Behavior on bottomMargin { |
36 | + UbuntuNumberAnimation { |
37 | + duration: UbuntuAnimation.SnapDuration |
38 | + } |
39 | + } |
40 | + } |
41 | + |
42 | + z: 1 |
43 | + width: tipLabel.paintedWidth + units.gu(6) |
44 | + height: bottomEdge.tipHeight + units.gu(1) |
45 | + color: Theme.palette.normal.overlay |
46 | + Label { |
47 | + id: tipLabel |
48 | + |
49 | + anchors { |
50 | + top: parent.top |
51 | + left: parent.left |
52 | + right: parent.right |
53 | + } |
54 | + height: bottomEdge.tipHeight |
55 | + verticalAlignment: Text.AlignVCenter |
56 | + horizontalAlignment: Text.AlignHCenter |
57 | + opacity: tip.hidden ? 0.0 : 1.0 |
58 | + Behavior on opacity { |
59 | + UbuntuNumberAnimation { |
60 | + duration: UbuntuAnimation.SnapDuration |
61 | + } |
62 | + } |
63 | + } |
64 | + } |
65 | + |
66 | + Rectangle { |
67 | + id: shadow |
68 | + |
69 | + anchors { |
70 | + left: parent.left |
71 | + right: parent.right |
72 | + bottom: parent.bottom |
73 | + } |
74 | + height: units.gu(1) |
75 | + z: 1 |
76 | + opacity: 0.0 |
77 | + gradient: Gradient { |
78 | + GradientStop { position: 0.0; color: "transparent" } |
79 | + GradientStop { position: 1.0; color: Qt.rgba(0, 0, 0, 0.2) } |
80 | + } |
81 | + } |
82 | + |
83 | + MouseArea { |
84 | + id: mouseArea |
85 | + |
86 | + preventStealing: true |
87 | + drag { |
88 | + axis: Drag.YAxis |
89 | + target: bottomEdge |
90 | + minimumY: bottomEdge.pageStartY |
91 | + maximumY: page.height |
92 | + } |
93 | + enabled: edgeLoader.status == Loader.Ready |
94 | + |
95 | + anchors { |
96 | + left: parent.left |
97 | + right: parent.right |
98 | + bottom: parent.bottom |
99 | + |
100 | + } |
101 | + height: bottomEdge.tipHeight |
102 | + z: 1 |
103 | + |
104 | + onReleased: { |
105 | + page.bottomEdgeReleased() |
106 | + if (bottomEdge.y < (page.height - bottomEdgeExpandThreshold - bottomEdge.tipHeight)) { |
107 | + bottomEdge.state = "expanded" |
108 | + } else { |
109 | + bottomEdge.state = "collapsed" |
110 | + bottomEdge.y = bottomEdge.height |
111 | + } |
112 | + } |
113 | + |
114 | + onPressed: tip.forceActiveFocus() |
115 | } |
116 | |
117 | Rectangle { |
118 | @@ -160,107 +244,14 @@ |
119 | |
120 | z: 1 |
121 | color: Theme.palette.normal.background |
122 | - parent: page |
123 | + clip: true |
124 | anchors { |
125 | left: parent.left |
126 | right: parent.right |
127 | } |
128 | height: page.height |
129 | y: height |
130 | - |
131 | - UbuntuShape { |
132 | - id: tip |
133 | - objectName: "bottomEdgeTip" |
134 | - |
135 | - property bool hiden: false |
136 | - |
137 | - readonly property double visiblePosition: (page.height - bottomEdge.y) < units.gu(1) ? -bottomEdge.tipHeight + (page.height - bottomEdge.y) : 0 |
138 | - readonly property double invisiblePosition: (page.height - bottomEdge.y) < units.gu(1) ? -units.gu(1) : 0 |
139 | - |
140 | - z: -1 |
141 | - anchors.horizontalCenter: parent.horizontalCenter |
142 | - y: hiden ? invisiblePosition : visiblePosition |
143 | - |
144 | - width: tipLabel.paintedWidth + units.gu(6) |
145 | - height: bottomEdge.tipHeight + units.gu(1) |
146 | - color: Theme.palette.normal.overlay |
147 | - Label { |
148 | - id: tipLabel |
149 | - |
150 | - anchors { |
151 | - top: parent.top |
152 | - left: parent.left |
153 | - right: parent.right |
154 | - } |
155 | - height: bottomEdge.tipHeight |
156 | - verticalAlignment: Text.AlignVCenter |
157 | - horizontalAlignment: Text.AlignHCenter |
158 | - opacity: tip.hiden ? 0.0 : 1.0 |
159 | - Behavior on opacity { |
160 | - UbuntuNumberAnimation { |
161 | - duration: UbuntuAnimation.SnapDuration |
162 | - } |
163 | - } |
164 | - } |
165 | - Behavior on y { |
166 | - UbuntuNumberAnimation { |
167 | - duration: UbuntuAnimation.SnapDuration |
168 | - } |
169 | - } |
170 | - } |
171 | - |
172 | - Rectangle { |
173 | - id: shadow |
174 | - |
175 | - anchors { |
176 | - left: parent.left |
177 | - right: parent.right |
178 | - } |
179 | - height: units.gu(1) |
180 | - y: -height |
181 | - z: -2 |
182 | - opacity: 0.0 |
183 | - gradient: Gradient { |
184 | - GradientStop { position: 0.0; color: "transparent" } |
185 | - GradientStop { position: 1.0; color: Qt.rgba(0, 0, 0, 0.2) } |
186 | - } |
187 | - } |
188 | - |
189 | - MouseArea { |
190 | - id: mouseArea |
191 | - |
192 | - preventStealing: true |
193 | - drag { |
194 | - axis: Drag.YAxis |
195 | - target: bottomEdge |
196 | - minimumY: bottomEdge.pageStartY |
197 | - maximumY: page.height |
198 | - threshold: 100 |
199 | - } |
200 | - |
201 | - anchors { |
202 | - left: parent.left |
203 | - right: parent.right |
204 | - } |
205 | - height: bottomEdge.tipHeight |
206 | - y: -height |
207 | - |
208 | - onReleased: { |
209 | - page.bottomEdgeReleased() |
210 | - if (bottomEdge.y < (page.height - bottomEdgeExpandThreshold - bottomEdge.tipHeight)) { |
211 | - bottomEdge.state = "expanded" |
212 | - } else { |
213 | - bottomEdge.state = "collapsed" |
214 | - bottomEdge.y = bottomEdge.height |
215 | - } |
216 | - } |
217 | - |
218 | - onClicked: { |
219 | - tip.hiden = false |
220 | - hideIndicator.restart() |
221 | - } |
222 | - } |
223 | - |
224 | + visible: page.bottomEdgeEnabled && !page.isCollapsed |
225 | state: "collapsed" |
226 | states: [ |
227 | State { |
228 | @@ -273,10 +264,6 @@ |
229 | target: tip |
230 | opacity: 1.0 |
231 | } |
232 | - PropertyChanges { |
233 | - target: hideIndicator |
234 | - running: true |
235 | - } |
236 | }, |
237 | State { |
238 | name: "expanded" |
239 | @@ -284,10 +271,6 @@ |
240 | target: bottomEdge |
241 | y: bottomEdge.pageStartY |
242 | } |
243 | - PropertyChanges { |
244 | - target: hideIndicator |
245 | - running: false |
246 | - } |
247 | }, |
248 | State { |
249 | name: "floating" |
250 | @@ -296,14 +279,6 @@ |
251 | target: shadow |
252 | opacity: 1.0 |
253 | } |
254 | - PropertyChanges { |
255 | - target: hideIndicator |
256 | - running: false |
257 | - } |
258 | - PropertyChanges { |
259 | - target: tip |
260 | - hiden: false |
261 | - } |
262 | } |
263 | ] |
264 | |
265 | @@ -311,10 +286,27 @@ |
266 | Transition { |
267 | to: "expanded" |
268 | SequentialAnimation { |
269 | - UbuntuNumberAnimation { |
270 | + alwaysRunToEnd: true |
271 | + |
272 | + SmoothedAnimation { |
273 | target: bottomEdge |
274 | property: "y" |
275 | - duration: UbuntuAnimation.SlowDuration |
276 | + duration: UbuntuAnimation.FastDuration |
277 | + easing.type: Easing.Linear |
278 | + } |
279 | + SmoothedAnimation { |
280 | + target: edgeLoader |
281 | + property: "anchors.topMargin" |
282 | + to: - units.gu(4) |
283 | + duration: UbuntuAnimation.FastDuration |
284 | + easing.type: Easing.Linear |
285 | + } |
286 | + SmoothedAnimation { |
287 | + target: edgeLoader |
288 | + property: "anchors.topMargin" |
289 | + to: 0 |
290 | + duration: UbuntuAnimation.FastDuration |
291 | + easing: UbuntuAnimation.StandardEasing |
292 | } |
293 | ScriptAction { |
294 | script: page._pushPage() |
295 | @@ -325,6 +317,8 @@ |
296 | from: "expanded" |
297 | to: "collapsed" |
298 | SequentialAnimation { |
299 | + alwaysRunToEnd: true |
300 | + |
301 | ScriptAction { |
302 | script: { |
303 | Qt.inputMethod.hide() |
304 | @@ -333,7 +327,7 @@ |
305 | edgeLoader.item.active = false |
306 | } |
307 | } |
308 | - UbuntuNumberAnimation { |
309 | + SmoothedAnimation { |
310 | target: bottomEdge |
311 | property: "y" |
312 | duration: UbuntuAnimation.SlowDuration |
313 | @@ -343,14 +337,15 @@ |
314 | // destroy current bottom page |
315 | if (page.reloadBottomEdgePage) { |
316 | edgeLoader.active = false |
317 | + // tip will receive focus on page active true |
318 | + } else { |
319 | + tip.forceActiveFocus() |
320 | } |
321 | |
322 | // notify |
323 | page.bottomEdgeDismissed() |
324 | |
325 | edgeLoader.active = true |
326 | - tip.hiden = false |
327 | - hideIndicator.restart() |
328 | } |
329 | } |
330 | } |
331 | @@ -365,30 +360,23 @@ |
332 | } |
333 | ] |
334 | |
335 | - Item { |
336 | + Loader { |
337 | + id: edgeLoader |
338 | + |
339 | + asynchronous: true |
340 | anchors.fill: parent |
341 | - clip: true |
342 | - |
343 | - Loader { |
344 | - id: edgeLoader |
345 | - |
346 | - z: 1 |
347 | - active: true |
348 | - asynchronous: true |
349 | - anchors.fill: parent |
350 | - |
351 | - //WORKAROUND: The SDK move the page contents down to allocate space for the header we need to avoid that during the page dragging |
352 | - Binding { |
353 | - target: edgeLoader.status === Loader.Ready ? edgeLoader : null |
354 | - property: "anchors.topMargin" |
355 | - value: edgeLoader.item && edgeLoader.item.flickable ? edgeLoader.item.flickable.contentY : 0 |
356 | - when: !page.isReady |
357 | - } |
358 | - |
359 | - onLoaded: { |
360 | - if (page.isReady && edgeLoader.item.active !== true) { |
361 | - page._pushPage() |
362 | - } |
363 | + //WORKAROUND: The SDK move the page contents down to allocate space for the header we need to avoid that during the page dragging |
364 | + Binding { |
365 | + target: edgeLoader.status === Loader.Ready ? edgeLoader : null |
366 | + property: "anchors.topMargin" |
367 | + value: edgeLoader.item && edgeLoader.item.flickable ? edgeLoader.item.flickable.contentY : 0 |
368 | + when: !page.isReady |
369 | + } |
370 | + |
371 | + onLoaded: { |
372 | + tip.forceActiveFocus() |
373 | + if (page.isReady && edgeLoader.item.active !== true) { |
374 | + page._pushPage() |
375 | } |
376 | } |
377 | } |
378 | |
379 | === modified file 'tests/autopilot/address_book_app/pages/_common.py' |
380 | --- tests/autopilot/address_book_app/pages/_common.py 2014-08-05 19:02:51 +0000 |
381 | +++ tests/autopilot/address_book_app/pages/_common.py 2014-09-16 14:32:25 +0000 |
382 | @@ -39,6 +39,7 @@ |
383 | """Bring the bottom edge page to the screen""" |
384 | try: |
385 | action_item = self.wait_select_single(objectName='bottomEdgeTip') |
386 | + action_item.enabled.wait_for(True) |
387 | start_x = (action_item.globalRect.x + |
388 | (action_item.globalRect.width * 0.5)) |
389 | start_y = action_item.globalRect.y + (action_item.height * 0.2) |
FAILED: Continuous integration, rev:292 jenkins. qa.ubuntu. com/job/ phablet- team-address- book-app- staging- ci/309/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/4302 jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 3233 jenkins. qa.ubuntu. com/job/ phablet- team-address- book-app- staging- utopic- i386-ci/ 309 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/4109 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/5554 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/5554/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 12447 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-utopic/ 2650 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/3526 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/3526/ artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/phablet- team-address- book-app- staging- ci/309/ rebuild
http://