Merge lp:~fboucault/address-book-app/multicolumns into lp:address-book-app
- multicolumns
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Renato Araujo Oliveira Filho |
Approved revision: | 474 |
Merged at revision: | 490 |
Proposed branch: | lp:~fboucault/address-book-app/multicolumns |
Merge into: | lp:address-book-app |
Prerequisite: | lp:~fboucault/address-book-app/toolkit13 |
Diff against target: |
349 lines (+63/-59) 11 files modified
src/imports/ABContactListPage.qml (+25/-18) src/imports/ABContactViewPage.qml (+14/-9) src/imports/MainWindow.qml (+8/-16) src/imports/Settings/SettingsPage.qml (+1/-1) src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml (+3/-4) src/imports/Ubuntu/AddressBook/ContactShare/ContactSharePage.qml (+2/-2) src/imports/Ubuntu/Contacts/ContactListView.qml (+4/-4) src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+2/-1) src/imports/Ubuntu/Contacts/ListItemWithActions.qml (+1/-1) src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml (+1/-1) src/imports/Ubuntu/Contacts/SIMCardImportPage.qml (+2/-2) |
To merge this branch: | bzr merge lp:~fboucault/address-book-app/multicolumns |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Renato Araujo Oliveira Filho (community) | Approve | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Review via email: mp+270113@code.launchpad.net |
Commit message
Use AdaptivePageLayout instead of PageStack to support multi column layouts.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
- 472. By Florian Boucault
-
Merged from toolkit13
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:472
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
- Is correct that the edit page has a small header than other pages?
- Is correct that when opening the edit page from the bottom edge it fills only the right side page? Keeping the left side page empty?
- 473. By Florian Boucault
-
Merged from toolkit13
Florian Boucault (fboucault) wrote : | # |
> - Is correct that the edit page has a small header than other pages?
I'm not sure why the new contact page has a smaller header. That will probably be fixed anyway with the next MR that changes the bottom edge.
> - Is correct that when opening the edit page from the bottom edge it fills
> only the right side page? Keeping the left side page empty?
I intend to fix that in the next merge request as this is not good UX wise but not a regression.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:473
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 474. By Florian Boucault
-
Merged from toolkit13
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:474
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Renato Araujo Oliveira Filho (renatofilho) wrote : | # |
Looks good.
Preview Diff
1 | === modified file 'src/imports/ABContactListPage.qml' |
2 | --- src/imports/ABContactListPage.qml 2015-10-16 13:35:56 +0000 |
3 | +++ src/imports/ABContactListPage.qml 2015-10-16 13:35:56 +0000 |
4 | @@ -66,25 +66,29 @@ |
5 | enabled: false, |
6 | initialFocusSection: "name"}) |
7 | } else { |
8 | - pageStack.push(Qt.resolvedUrl("ABContactEditorPage.qml"), |
9 | - {model: contactList.listModel, |
10 | - contact: newContact, |
11 | - initialFocusSection: "name"}) |
12 | + pageStack.addPageToNextColumn(mainPage, |
13 | + Qt.resolvedUrl("ABContactEditorPage.qml"), |
14 | + {model: contactList.listModel, |
15 | + contact: newContact, |
16 | + initialFocusSection: "name"}) |
17 | } |
18 | } |
19 | |
20 | function showContact(contactId) |
21 | { |
22 | - pageStack.push(Qt.resolvedUrl("ABContactViewPage.qml"), |
23 | - {model: contactList.listModel, contactId: contactId}) |
24 | + pageStack.addPageToNextColumn(mainPage, |
25 | + Qt.resolvedUrl("ABContactViewPage.qml"), |
26 | + {model: contactList.listModel, |
27 | + contactId: contactId}) |
28 | } |
29 | |
30 | function addPhoneToContact(contactId, phoneNumber) |
31 | { |
32 | - pageStack.push(Qt.resolvedUrl("ABContactViewPage.qml"), |
33 | - {model: contactList.listModel, |
34 | - contactId: contactId, |
35 | - addPhoneToContact: phoneNumber}) |
36 | + pageStack.addPageToNextColumn(mainPage, |
37 | + Qt.resolvedUrl("ABContactViewPage.qml"), |
38 | + {model: contactList.listModel, |
39 | + contactId: contactId, |
40 | + addPhoneToContact: phoneNumber}) |
41 | } |
42 | |
43 | function importContact(urls) |
44 | @@ -149,9 +153,10 @@ |
45 | |
46 | onContactClicked: { |
47 | mainPage.state = "default" |
48 | - pageStack.push(Qt.resolvedUrl("ABContactViewPage.qml"), |
49 | - {model: contactList.listModel, |
50 | - contact: contact}) |
51 | + pageStack.addPageToNextColumn(mainPage, |
52 | + Qt.resolvedUrl("ABContactViewPage.qml"), |
53 | + {model: contactList.listModel, |
54 | + contact: contact}) |
55 | } |
56 | onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default" |
57 | onSelectionCanceled: { |
58 | @@ -241,8 +246,9 @@ |
59 | Action { |
60 | text: i18n.tr("Settings") |
61 | iconName: "settings" |
62 | - onTriggered: pageStack.push(Qt.resolvedUrl("./Settings/SettingsPage.qml"), |
63 | - {"contactListModel": contactList.listModel}) |
64 | + onTriggered: pageStack.addPageToNextColumn(mainPage, |
65 | + Qt.resolvedUrl("./Settings/SettingsPage.qml"), |
66 | + {"contactListModel": contactList.listModel}) |
67 | } |
68 | ] |
69 | PropertyChanges { |
70 | @@ -481,9 +487,10 @@ |
71 | // Share contacts to an application chosen by the user |
72 | if (!mainPage.pickMode) { |
73 | contactExporter.dismissBusyDialog() |
74 | - pageStack.push(contactShareComponent, |
75 | - { contactModel: contactExporter.contactModel, |
76 | - contacts: contacts }) |
77 | + pageStack.addPageToNextColumn(mainPage, |
78 | + contactShareComponent, |
79 | + {contactModel: contactExporter.contactModel, |
80 | + contacts: contacts }) |
81 | } |
82 | } |
83 | } |
84 | |
85 | === modified file 'src/imports/ABContactViewPage.qml' |
86 | --- src/imports/ABContactViewPage.qml 2015-10-16 13:35:56 +0000 |
87 | +++ src/imports/ABContactViewPage.qml 2015-10-16 13:35:56 +0000 |
88 | @@ -35,7 +35,10 @@ |
89 | text: i18n.tr("Share") |
90 | iconName: "share" |
91 | onTriggered: { |
92 | - pageStack.push(contactShareComponent, {contactModel: root.model, contacts: [root.contact]}) |
93 | + pageStack.addPageToCurrentColumn(root, |
94 | + contactShareComponent, |
95 | + {contactModel: root.model, |
96 | + contacts: [root.contact]}) |
97 | } |
98 | }, |
99 | Action { |
100 | @@ -43,13 +46,15 @@ |
101 | text: i18n.tr("Edit") |
102 | iconName: "edit" |
103 | onTriggered: { |
104 | - pageStack.push(Qt.resolvedUrl("ABContactEditorPage.qml"), |
105 | - { model: root.model, contact: root.contact}) |
106 | + pageStack.addPageToCurrentColumn(root, |
107 | + Qt.resolvedUrl("ABContactEditorPage.qml"), |
108 | + {model: root.model, |
109 | + contact: root.contact}) |
110 | } |
111 | } |
112 | ] |
113 | |
114 | - onContactRemoved: pageStack.pop() |
115 | + onContactRemoved: pageStack.removePages(root) |
116 | |
117 | extensions: ContactDetailSyncTargetView { |
118 | contact: root.contact |
119 | @@ -68,11 +73,11 @@ |
120 | var newDetail = Qt.createQmlObject(detailSourceTemplate, contact) |
121 | if (newDetail) { |
122 | contact.addDetail(newDetail) |
123 | - pageStack.push(Qt.resolvedUrl("ABContactEditorPage.qml"), |
124 | - { model: root.model, |
125 | - contact: contact, |
126 | - initialFocusSection: "phones", |
127 | - newDetails: [newDetail]}) |
128 | + pageStack.addPageToCurrentColumn(root, Qt.resolvedUrl("ABContactEditorPage.qml"), |
129 | + { model: root.model, |
130 | + contact: contact, |
131 | + initialFocusSection: "phones", |
132 | + newDetails: [newDetail]}) |
133 | root.addPhoneToContact = "" |
134 | } |
135 | } |
136 | |
137 | === modified file 'src/imports/MainWindow.qml' |
138 | --- src/imports/MainWindow.qml 2015-10-16 13:35:56 +0000 |
139 | +++ src/imports/MainWindow.qml 2015-10-16 13:35:56 +0000 |
140 | @@ -35,7 +35,6 @@ |
141 | } else { |
142 | console.error("Contact preview requested but ContactListPage not loaded") |
143 | } |
144 | - mainStack.quitOnDepth = 1 |
145 | } |
146 | |
147 | function create(phoneNumber) |
148 | @@ -99,28 +98,19 @@ |
149 | } |
150 | } |
151 | |
152 | - width: units.gu(40) |
153 | + width: units.gu(90) |
154 | height: units.gu(71) |
155 | anchorToKeyboard: false |
156 | |
157 | - PageStack { |
158 | + AdaptivePageLayout { |
159 | id: mainStack |
160 | |
161 | + primaryPage: contactPage |
162 | property var contactListPage: null |
163 | - property int quitOnDepth: -1 |
164 | |
165 | function resetStack() |
166 | { |
167 | - while(depth > 1) { |
168 | - pop() |
169 | - } |
170 | - } |
171 | - |
172 | - onDepthChanged: { |
173 | - if (depth === quitOnDepth) { |
174 | - quitOnDepth = -1 |
175 | - application.goBackToSourceApp() |
176 | - } |
177 | + mainStack.removePages(primaryPage); |
178 | } |
179 | |
180 | onContactListPageChanged: { |
181 | @@ -134,11 +124,14 @@ |
182 | anchors.fill: parent |
183 | } |
184 | |
185 | + ABContactListPage { |
186 | + id: contactPage |
187 | + } |
188 | + |
189 | Component.onCompleted: { |
190 | application.elapsed() |
191 | i18n.domain = "address-book-app" |
192 | i18n.bindtextdomain("address-book-app", i18nDirectory) |
193 | - mainStack.push(Qt.resolvedUrl("ABContactListPage.qml")) |
194 | mainWindow.applicationReady() |
195 | } |
196 | |
197 | @@ -184,7 +177,6 @@ |
198 | // If application was called from uri handler and lost the focus reset the app to normal state |
199 | onAppActiveChanged: { |
200 | if (!appActive && mainStack.contactListPage) { |
201 | - mainStack.quitOnDepth = -1 |
202 | mainStack.contactListPage.returnToNormalState() |
203 | } |
204 | } |
205 | |
206 | === modified file 'src/imports/Settings/SettingsPage.qml' |
207 | --- src/imports/Settings/SettingsPage.qml 2015-10-16 13:35:56 +0000 |
208 | +++ src/imports/Settings/SettingsPage.qml 2015-10-16 13:35:56 +0000 |
209 | @@ -71,7 +71,7 @@ |
210 | ListItem.Standard { |
211 | text: i18n.tr("Import from SIM") |
212 | progression: true |
213 | - onClicked: pageStack.push(simCardImportPageComponent) |
214 | + onClicked: pageStack.addPageToCurrentColumn(root, simCardImportPageComponent) |
215 | enabled: (simList.sims.length > 0) && (simList.present.length > 0) |
216 | } |
217 | } |
218 | |
219 | === modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml' |
220 | --- src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2015-10-16 13:35:56 +0000 |
221 | +++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2015-10-16 13:35:56 +0000 |
222 | @@ -55,7 +55,7 @@ |
223 | field.cancel() |
224 | } |
225 | } |
226 | - pageStack.pop() |
227 | + pageStack.removePages(contactEditor) |
228 | } |
229 | |
230 | function save() { |
231 | @@ -93,7 +93,7 @@ |
232 | contactEditor.contactSaved(contact) |
233 | } |
234 | } |
235 | - pageStack.pop() |
236 | + pageStack.removePages(contactEditor) |
237 | } |
238 | |
239 | function makeMeVisible(item) { |
240 | @@ -473,8 +473,7 @@ |
241 | // WORKAROUND: SDK element crash if pop the page where the dialog was created |
242 | Component.onDestruction: { |
243 | if (popPages) { |
244 | - contactEditor.pageStack.pop() // editor page |
245 | - contactEditor.pageStack.pop() // view page |
246 | + contactEditor.pageStack.removePages(contactEditor) |
247 | } |
248 | } |
249 | } |
250 | |
251 | === modified file 'src/imports/Ubuntu/AddressBook/ContactShare/ContactSharePage.qml' |
252 | --- src/imports/Ubuntu/AddressBook/ContactShare/ContactSharePage.qml 2015-10-16 13:35:56 +0000 |
253 | +++ src/imports/Ubuntu/AddressBook/ContactShare/ContactSharePage.qml 2015-10-16 13:35:56 +0000 |
254 | @@ -48,13 +48,13 @@ |
255 | if (exporter.activeTransfer) { |
256 | exporter.activeTransfer.state = ContentHub.ContentTransfer.Aborted |
257 | } |
258 | - pageStack.pop() |
259 | + pageStack.removePages(root) |
260 | } |
261 | } |
262 | |
263 | ContactExporter { |
264 | id: exporter |
265 | |
266 | - onDone: pageStack.pop() |
267 | + onDone: pageStack.removePages(root) |
268 | } |
269 | } |
270 | |
271 | === modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml' |
272 | --- src/imports/Ubuntu/Contacts/ContactListView.qml 2015-10-16 13:35:56 +0000 |
273 | +++ src/imports/Ubuntu/Contacts/ContactListView.qml 2015-10-16 13:35:56 +0000 |
274 | @@ -466,10 +466,10 @@ |
275 | visible: (typeof(pageStack) !== "undefined") && |
276 | ((simList.sims.length > 0) && (simList.present.length > 0)) |
277 | onClicked: { |
278 | - pageStack.push(Qt.resolvedUrl("SIMCardImportPage.qml"), |
279 | - {"objectName": "simCardImportPage", |
280 | - "targetModel": view.listModel, |
281 | - "sims": simList.sims}) |
282 | + pageStack.addPageToNextColumn(pageStack.primaryPage, Qt.resolvedUrl("SIMCardImportPage.qml"), |
283 | + {"objectName": "simCardImportPage", |
284 | + "targetModel": view.listModel, |
285 | + "sims": simList.sims}) |
286 | } |
287 | } |
288 | } |
289 | |
290 | === modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml' |
291 | --- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-10-16 13:35:56 +0000 |
292 | +++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-10-16 13:35:56 +0000 |
293 | @@ -260,7 +260,8 @@ |
294 | |
295 | flicking: contactListView.flicking |
296 | width: parent.width |
297 | - selected: contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate) |
298 | + selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate)) |
299 | + || index === contactListView.currentIndex |
300 | selectionMode: contactListView.isInSelectionMode |
301 | defaultAvatarUrl: contactListView.defaultAvatarImageUrl |
302 | isCurrentItem: ListView.isCurrentItem |
303 | |
304 | === modified file 'src/imports/Ubuntu/Contacts/ListItemWithActions.qml' |
305 | --- src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2015-10-16 13:35:56 +0000 |
306 | +++ src/imports/Ubuntu/Contacts/ListItemWithActions.qml 2015-10-16 13:35:56 +0000 |
307 | @@ -164,7 +164,7 @@ |
308 | states: [ |
309 | State { |
310 | name: "select" |
311 | - when: selectionMode || selected |
312 | + when: selectionMode |
313 | PropertyChanges { |
314 | target: selectionIcon |
315 | source: Qt.resolvedUrl("ListItemWithActionsCheckBox.qml") |
316 | |
317 | === modified file 'src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml' |
318 | --- src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml 2015-10-16 13:35:56 +0000 |
319 | +++ src/imports/Ubuntu/Contacts/PageWithBottomEdge.qml 2015-10-16 13:35:56 +0000 |
320 | @@ -103,7 +103,7 @@ |
321 | { |
322 | if (edgeLoader.status === Loader.Ready) { |
323 | edgeLoader.item.active = true |
324 | - page.pageStack.push(edgeLoader.item) |
325 | + page.pageStack.addPageToCurrentColumn(page, edgeLoader.item) |
326 | if (edgeLoader.item.flickable) { |
327 | edgeLoader.item.flickable.contentY = -page.header.height |
328 | edgeLoader.item.flickable.returnToBounds() |
329 | |
330 | === modified file 'src/imports/Ubuntu/Contacts/SIMCardImportPage.qml' |
331 | --- src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2015-10-16 13:35:56 +0000 |
332 | +++ src/imports/Ubuntu/Contacts/SIMCardImportPage.qml 2015-10-16 13:35:56 +0000 |
333 | @@ -100,7 +100,7 @@ |
334 | showBusyIndicator: false |
335 | |
336 | manager: "memory" |
337 | - onSelectionCanceled: pageStack.pop() |
338 | + onSelectionCanceled: pageStack.removePages(root) |
339 | } |
340 | |
341 | Label { |
342 | @@ -167,7 +167,7 @@ |
343 | if ((error === ContactModel.ExportNoError) && targetModel) { |
344 | targetModel.importContacts(url) |
345 | } |
346 | - pageStack.pop() |
347 | + pageStack.removePages(root) |
348 | } |
349 | } |
350 |
FAILED: Continuous integration, rev:471 jenkins. qa.ubuntu. com/job/ address- book-app- ci/905/ jenkins. qa.ubuntu. com/job/ address- book-app- vivid-i386- ci/208/ console jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 4008/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4005/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/905/ rebuild
http://