Merge lp:~renatofilho/ubuntu-ui-toolkit/fix-1213046 into lp:ubuntu-ui-toolkit
- fix-1213046
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Bill Filler | ||||
Approved revision: | 761 | ||||
Merged at revision: | 772 | ||||
Proposed branch: | lp:~renatofilho/ubuntu-ui-toolkit/fix-1213046 | ||||
Merge into: | lp:ubuntu-ui-toolkit | ||||
Diff against target: |
225 lines (+91/-5) 4 files modified
CHANGES (+1/-0) components.api (+1/-0) examples/ubuntu-ui-toolkit-gallery/ListItems.qml (+1/-0) modules/Ubuntu/Components/ListItems/Empty.qml (+88/-5) |
||||
To merge this branch: | bzr merge lp:~renatofilho/ubuntu-ui-toolkit/fix-1213046 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Bill Filler (community) | Approve | ||
Gustavo Pichorim Boiko (community) | Needs Fixing | ||
Review via email: mp+186223@code.launchpad.net |
Commit message
Added "confirmRemoval" in ListItem.Empty
This will ask for confirmation before remove the item.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:752
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:752
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:753
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:754
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:754
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:754
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Gustavo Pichorim Boiko (boiko) wrote : | # |
32 + Defines if the item need confirmation before remove by swiping
I'm no native English speaker, but I think this should read:
Defines if the item needs confirmation before removing by swiping
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:755
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:755
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Francis Ginther (fginther) wrote : | # |
It looks like changes introduced by the following MP may have broken this:
https:/
That MP was merged into trunk just before the build failures started for ubuntu-
QQmlComponent: Component is not ready
WARNING: default alarm manager not installed, using "memory" manager.
This manager may not provide all the needed features.
- 756. By Renato Araujo Oliveira Filho
-
Merged mainline.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:756
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 757. By Renato Araujo Oliveira Filho
-
Merged mainline.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:757
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
You need to update components.api.
- 758. By Renato Araujo Oliveira Filho
-
Fixed components.api.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:758
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 759. By Renato Araujo Oliveira Filho
-
Updated components.api.
- 760. By Renato Araujo Oliveira Filho
-
Updated documentation.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:760
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 761. By Renato Araujo Oliveira Filho
-
Merged mainline.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:761
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'CHANGES' | |||
2 | --- CHANGES 2013-09-12 13:56:14 +0000 | |||
3 | +++ CHANGES 2013-09-30 12:01:05 +0000 | |||
4 | @@ -9,6 +9,7 @@ | |||
5 | 9 | 9 | ||
6 | 10 | API Changes | 10 | API Changes |
7 | 11 | *********** | 11 | *********** |
8 | 12 | * ADDED IN: ListItem.Empty: property bool confirmRemoval | ||
9 | 12 | * ADDED IN: OptionSelectorDelegate: property bool constrainImage | 13 | * ADDED IN: OptionSelectorDelegate: property bool constrainImage |
10 | 13 | * ADDED IN: Empty: property alias divider | 14 | * ADDED IN: Empty: property alias divider |
11 | 14 | * ADDED IN: ListItems/OptionSelector: signal delegateSelected() | 15 | * ADDED IN: ListItems/OptionSelector: signal delegateSelected() |
12 | 15 | 16 | ||
13 | === modified file 'components.api' | |||
14 | --- components.api 2013-09-27 21:17:50 +0000 | |||
15 | +++ components.api 2013-09-30 12:01:05 +0000 | |||
16 | @@ -401,6 +401,7 @@ | |||
17 | 401 | property bool selected | 401 | property bool selected |
18 | 402 | property bool highlightWhenPressed | 402 | property bool highlightWhenPressed |
19 | 403 | property bool removable | 403 | property bool removable |
20 | 404 | property bool confirmRemoval | ||
21 | 404 | readonly property string swipingState | 405 | readonly property string swipingState |
22 | 405 | signal itemRemoved | 406 | signal itemRemoved |
23 | 406 | property int __height | 407 | property int __height |
24 | 407 | 408 | ||
25 | === modified file 'examples/ubuntu-ui-toolkit-gallery/ListItems.qml' | |||
26 | --- examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2013-09-03 10:12:39 +0000 | |||
27 | +++ examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2013-09-30 12:01:05 +0000 | |||
28 | @@ -142,6 +142,7 @@ | |||
29 | 142 | delegate: ListItem.Standard { | 142 | delegate: ListItem.Standard { |
30 | 143 | text: i18n.tr("Slide to remove") | 143 | text: i18n.tr("Slide to remove") |
31 | 144 | removable: true | 144 | removable: true |
32 | 145 | confirmRemoval: (index % 2) | ||
33 | 145 | backgroundIndicator: Rectangle { | 146 | backgroundIndicator: Rectangle { |
34 | 146 | anchors.fill: parent | 147 | anchors.fill: parent |
35 | 147 | color: Theme.palette.normal.base | 148 | color: Theme.palette.normal.base |
36 | 148 | 149 | ||
37 | === modified file 'modules/Ubuntu/Components/ListItems/Empty.qml' | |||
38 | --- modules/Ubuntu/Components/ListItems/Empty.qml 2013-09-18 02:26:23 +0000 | |||
39 | +++ modules/Ubuntu/Components/ListItems/Empty.qml 2013-09-30 12:01:05 +0000 | |||
40 | @@ -97,6 +97,13 @@ | |||
41 | 97 | 97 | ||
42 | 98 | /*! | 98 | /*! |
43 | 99 | \preliminary | 99 | \preliminary |
44 | 100 | Defines if the item needs confirmation before removing by swiping. | ||
45 | 101 | \qmlproperty bool confirmRemoval | ||
46 | 102 | */ | ||
47 | 103 | property alias confirmRemoval: confirmRemovalDialog.visible | ||
48 | 104 | |||
49 | 105 | /*! | ||
50 | 106 | \preliminary | ||
51 | 100 | \qmlproperty string swipingState | 107 | \qmlproperty string swipingState |
52 | 101 | The current swiping state ("SwipingLeft", "SwipingRight", "") | 108 | The current swiping state ("SwipingLeft", "SwipingRight", "") |
53 | 102 | */ | 109 | */ |
54 | @@ -174,7 +181,7 @@ | |||
55 | 174 | /*! \internal | 181 | /*! \internal |
56 | 175 | Defines the offset limit to consider the item removed | 182 | Defines the offset limit to consider the item removed |
57 | 176 | */ | 183 | */ |
59 | 177 | readonly property int itemMoveOffset: width * 0.3 | 184 | readonly property int itemMoveOffset: confirmRemoval ? width * 0.5 : width * 0.3 |
60 | 178 | 185 | ||
61 | 179 | /*! \internal | 186 | /*! \internal |
62 | 180 | Defines the inital pressed possition | 187 | Defines the inital pressed possition |
63 | @@ -211,10 +218,13 @@ | |||
64 | 211 | Resets the item dragging state | 218 | Resets the item dragging state |
65 | 212 | */ | 219 | */ |
66 | 213 | function resetDrag() { | 220 | function resetDrag() { |
67 | 221 | body.x = 0 | ||
68 | 214 | pressedPosition = -1 | 222 | pressedPosition = -1 |
69 | 215 | __mouseArea.drag.target = null | 223 | __mouseArea.drag.target = null |
70 | 216 | held = false | 224 | held = false |
71 | 217 | removeItem = false | 225 | removeItem = false |
72 | 226 | backgroundIndicator.opacity = 0.0 | ||
73 | 227 | backgroundIndicator.visible = false | ||
74 | 218 | backgroundIndicator.state = "" | 228 | backgroundIndicator.state = "" |
75 | 219 | } | 229 | } |
76 | 220 | 230 | ||
77 | @@ -223,7 +233,9 @@ | |||
78 | 223 | */ | 233 | */ |
79 | 224 | function commitDrag() { | 234 | function commitDrag() { |
80 | 225 | if (removeItem) { | 235 | if (removeItem) { |
82 | 226 | removeItemAnimation.start() | 236 | if (!confirmRemoval) { |
83 | 237 | removeItemAnimation.start() | ||
84 | 238 | } | ||
85 | 227 | } else { | 239 | } else { |
86 | 228 | resetDrag() | 240 | resetDrag() |
87 | 229 | } | 241 | } |
88 | @@ -244,10 +256,14 @@ | |||
89 | 244 | } else if (held == true) { | 256 | } else if (held == true) { |
90 | 245 | held = false | 257 | held = false |
91 | 246 | removeItem = true | 258 | removeItem = true |
92 | 259 | var finalX = body.width | ||
93 | 260 | if (emptyListItem.confirmRemoval) { | ||
94 | 261 | finalX = itemMoveOffset | ||
95 | 262 | } | ||
96 | 247 | if (body.x > 0) { | 263 | if (body.x > 0) { |
98 | 248 | body.x = body.width | 264 | body.x = finalX |
99 | 249 | } else { | 265 | } else { |
101 | 250 | body.x = body.width * -1 | 266 | body.x = -finalX |
102 | 251 | } | 267 | } |
103 | 252 | } | 268 | } |
104 | 253 | } | 269 | } |
105 | @@ -307,6 +323,7 @@ | |||
106 | 307 | id: backgroundIndicator | 323 | id: backgroundIndicator |
107 | 308 | 324 | ||
108 | 309 | opacity: 0.0 | 325 | opacity: 0.0 |
109 | 326 | visible: false | ||
110 | 310 | anchors { | 327 | anchors { |
111 | 311 | left: parent.left | 328 | left: parent.left |
112 | 312 | right: parent.right | 329 | right: parent.right |
113 | @@ -314,18 +331,73 @@ | |||
114 | 314 | bottom: parent.bottom | 331 | bottom: parent.bottom |
115 | 315 | } | 332 | } |
116 | 316 | 333 | ||
117 | 334 | Item { | ||
118 | 335 | id: confirmRemovalDialog | ||
119 | 336 | |||
120 | 337 | width: units.gu(15) | ||
121 | 338 | anchors { | ||
122 | 339 | top: parent.top | ||
123 | 340 | bottom: parent.bottom | ||
124 | 341 | } | ||
125 | 342 | |||
126 | 343 | Row { | ||
127 | 344 | anchors { | ||
128 | 345 | top: parent.top | ||
129 | 346 | bottom: parent.bottom | ||
130 | 347 | left: parent.left | ||
131 | 348 | right: parent.right | ||
132 | 349 | leftMargin: units.gu(2) | ||
133 | 350 | rightMargin: units.gu(2) | ||
134 | 351 | } | ||
135 | 352 | |||
136 | 353 | spacing: units.gu(2) | ||
137 | 354 | Image { | ||
138 | 355 | source: "artwork/delete.png" | ||
139 | 356 | fillMode: Image.Pad | ||
140 | 357 | anchors { | ||
141 | 358 | top: parent.top | ||
142 | 359 | bottom: parent.bottom | ||
143 | 360 | } | ||
144 | 361 | width: units.gu(5) | ||
145 | 362 | } | ||
146 | 363 | Label { | ||
147 | 364 | text: i18n.tr("Delete") | ||
148 | 365 | verticalAlignment: Text.AlignVCenter | ||
149 | 366 | anchors { | ||
150 | 367 | top: parent.top | ||
151 | 368 | bottom: parent.bottom | ||
152 | 369 | } | ||
153 | 370 | width: units.gu(7) | ||
154 | 371 | fontSize: "medium" | ||
155 | 372 | } | ||
156 | 373 | } | ||
157 | 374 | |||
158 | 375 | MouseArea { | ||
159 | 376 | anchors.fill: parent | ||
160 | 377 | onClicked: removeItemAnimation.start() | ||
161 | 378 | } | ||
162 | 379 | } | ||
163 | 380 | |||
164 | 381 | |||
165 | 317 | states: [ | 382 | states: [ |
166 | 318 | State { | 383 | State { |
167 | 319 | name: "SwipingRight" | 384 | name: "SwipingRight" |
168 | 385 | |||
169 | 320 | AnchorChanges { | 386 | AnchorChanges { |
170 | 321 | target: backgroundIndicator | 387 | target: backgroundIndicator |
171 | 322 | anchors.left: parent.left | 388 | anchors.left: parent.left |
172 | 323 | anchors.right: body.left | 389 | anchors.right: body.left |
173 | 324 | } | 390 | } |
174 | 391 | |||
175 | 325 | PropertyChanges { | 392 | PropertyChanges { |
176 | 326 | target: backgroundIndicator | 393 | target: backgroundIndicator |
177 | 327 | opacity: 1.0 | 394 | opacity: 1.0 |
178 | 328 | } | 395 | } |
179 | 396 | |||
180 | 397 | PropertyChanges { | ||
181 | 398 | target: confirmRemovalDialog | ||
182 | 399 | x: body.x - confirmRemovalDialog.width - units.gu(2) | ||
183 | 400 | } | ||
184 | 329 | }, | 401 | }, |
185 | 330 | State { | 402 | State { |
186 | 331 | name: "SwipingLeft" | 403 | name: "SwipingLeft" |
187 | @@ -334,10 +406,16 @@ | |||
188 | 334 | anchors.left: body.right | 406 | anchors.left: body.right |
189 | 335 | anchors.right: parent.right | 407 | anchors.right: parent.right |
190 | 336 | } | 408 | } |
191 | 409 | |||
192 | 337 | PropertyChanges { | 410 | PropertyChanges { |
193 | 338 | target: backgroundIndicator | 411 | target: backgroundIndicator |
194 | 339 | opacity: 1.0 | 412 | opacity: 1.0 |
195 | 340 | } | 413 | } |
196 | 414 | |||
197 | 415 | PropertyChanges { | ||
198 | 416 | target: confirmRemovalDialog | ||
199 | 417 | x: units.gu(2) | ||
200 | 418 | } | ||
201 | 341 | } | 419 | } |
202 | 342 | ] | 420 | ] |
203 | 343 | } | 421 | } |
204 | @@ -375,12 +453,17 @@ | |||
205 | 375 | } | 453 | } |
206 | 376 | } | 454 | } |
207 | 377 | 455 | ||
208 | 456 | onClicked: { | ||
209 | 457 | if (body.x != 0) { | ||
210 | 458 | priv.resetDrag() | ||
211 | 459 | } | ||
212 | 460 | } | ||
213 | 461 | |||
214 | 378 | onReleased: { | 462 | onReleased: { |
215 | 379 | priv.endDrag(); | 463 | priv.endDrag(); |
216 | 380 | } | 464 | } |
217 | 381 | 465 | ||
218 | 382 | onCanceled: { | 466 | onCanceled: { |
219 | 383 | |||
220 | 384 | priv.endDrag(); | 467 | priv.endDrag(); |
221 | 385 | } | 468 | } |
222 | 386 | } | 469 | } |
223 | 387 | 470 | ||
224 | === added file 'modules/Ubuntu/Components/ListItems/artwork/delete@8.png' | |||
225 | 388 | Binary files modules/Ubuntu/Components/ListItems/artwork/delete@8.png 1970-01-01 00:00:00 +0000 and modules/Ubuntu/Components/ListItems/artwork/delete@8.png 2013-09-30 12:01:05 +0000 differ | 471 | Binary files modules/Ubuntu/Components/ListItems/artwork/delete@8.png 1970-01-01 00:00:00 +0000 and modules/Ubuntu/Components/ListItems/artwork/delete@8.png 2013-09-30 12:01:05 +0000 differ |
FAILED: Continuous integration, rev:751 jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- ci/670/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/3557/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- touch/1085/ console jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- saucy-amd64- ci/527/ console jenkins. qa.ubuntu. com/job/ ubuntu- ui-toolkit- saucy-armhf- ci/527/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-i386/ 3569/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy-armhf/ 1087/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ ubuntu- ui-toolkit- ci/670/ rebuild
http://