Merge lp:~renatofilho/address-book-app/fix-1511477 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 496
Merged at revision: 506
Proposed branch: lp:~renatofilho/address-book-app/fix-1511477
Merge into: lp:address-book-app
Diff against target: 178 lines (+38/-23)
4 files modified
src/imports/ABContactListPage.qml (+32/-12)
src/imports/BottomEdge.qml (+1/-1)
src/imports/Ubuntu/Contacts/ContactListView.qml (+1/-6)
src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+4/-4)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1511477
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Tiago Salem Herrmann (community) Approve
Bill Filler (community) Needs Fixing
Review via email: mp+276171@code.launchpad.net

Commit message

Does not leave "searching" state while previewing contact.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
494. By Renato Araujo Oliveira Filho

Does not cancel search after edit a contact.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
495. By Renato Araujo Oliveira Filho

Trunk merged.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

Works nicely in the contacts app. If you search, then open a contact, then press back button, the contact is still selected and the search field has focus which keeps the keyboard open. However if I do the same thing from the dialer app, after pressing the back button the contact is not selected and the search field does not have focus. The dialer-app should work the same as contact app.

review: Needs Fixing
496. By Renato Araujo Oliveira Filho

Only highlight active contacts when in multiple column mode.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Works fine now, including the use case that bill reported.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
497. By Renato Araujo Oliveira Filho

Disable bottom edge while searching.

498. By Renato Araujo Oliveira Filho

Fixed focus on search field when changing the state to searching.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

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

Is your branch in sync with latest trunk?
YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
YES

Did you successfully run all tests found in your component's Test Plan on device or emulator?
YES

If you changed the UI, was the change specified/approved by design?
NO UI CHANGED

If you changed UI labels, did you update the pot file?
NO LABEL CHANGED

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
NO PACKAGING CHANGED

499. By Renato Araujo Oliveira Filho

Trunk merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/imports/ABContactListPage.qml'
--- src/imports/ABContactListPage.qml 2015-10-26 13:18:11 +0000
+++ src/imports/ABContactListPage.qml 2015-11-24 00:27:58 +0000
@@ -89,7 +89,10 @@
8989
90 function showContact(contact)90 function showContact(contact)
91 {91 {
92 mainPage.state = "default";92 // go back to normal state if not searching
93 if (state !== "searching") {
94 mainPage.state = "default";
95 }
93 openViewPage({model: contactList.listModel,96 openViewPage({model: contactList.listModel,
94 contact: contact});97 contact: contact});
95 }98 }
@@ -129,6 +132,11 @@
129132
130 function moveListToContact(contact)133 function moveListToContact(contact)
131 {134 {
135 // skipt it if searching
136 if (state === "searching") {
137 return
138 }
139
132 contactIndex = contact140 contactIndex = contact
133 mainPage.state = "default"141 mainPage.state = "default"
134 // this means a new contact was created142 // this means a new contact was created
@@ -176,15 +184,11 @@
176 filterTerm: searchField.text184 filterTerm: searchField.text
177 multiSelectionEnabled: true185 multiSelectionEnabled: true
178 multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode186 multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode
179 highlightedContact: contactViewPage ? contactViewPage.contact :187 highlightSelected: pageStack.columns > 1
180 contactEditorPage ? contactEditorPage.contact : null
181
182 onAddContactClicked: mainPage.createContactWithPhoneNumber(label)188 onAddContactClicked: mainPage.createContactWithPhoneNumber(label)
183 onAddNewContactClicked: mainPage.createContactWithPhoneNumber(mainPage.newPhoneToAdd)189 onAddNewContactClicked: mainPage.createContactWithPhoneNumber(mainPage.newPhoneToAdd)
184190
185 onContactClicked: {191 onContactClicked: mainPage.showContact(contact)
186 showContact(contact);
187 }
188 onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default"192 onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default"
189 onSelectionCanceled: {193 onSelectionCanceled: {
190 if (pickMode) {194 if (pickMode) {
@@ -209,10 +213,15 @@
209 right: parent.right213 right: parent.right
210 rightMargin: units.gu(2)214 rightMargin: units.gu(2)
211 }215 }
212 visible: mainPage.searching216 focus: false
217 visible: false
213 onTextChanged: contactList.currentIndex = -1218 onTextChanged: contactList.currentIndex = -1
214 inputMethodHints: Qt.ImhNoPredictiveText219 inputMethodHints: Qt.ImhNoPredictiveText
215 placeholderText: i18n.tr("Search...")220 placeholderText: i18n.tr("Search...")
221 onFocusChanged: {
222 if (visible && focus)
223 searchField.forceActiveFocus()
224 }
216 }225 }
217226
218 Connections {227 Connections {
@@ -305,6 +314,11 @@
305 }314 }
306315
307 PropertyChanges {316 PropertyChanges {
317 target: bottomEdge
318 enabled: false
319 }
320
321 PropertyChanges {
308 target: mainPage.head322 target: mainPage.head
309 backAction: searchingState.backAction323 backAction: searchingState.backAction
310 contents: searchField324 contents: searchField
@@ -314,6 +328,12 @@
314 target: searchField328 target: searchField
315 text: ""329 text: ""
316 }330 }
331
332 PropertyChanges {
333 target: searchField
334 visible: true
335 focus: true
336 }
317 },337 },
318 PageHeadState {338 PageHeadState {
319 id: selectionState339 id: selectionState
@@ -414,16 +434,16 @@
414 detailToPick: -1434 detailToPick: -1
415 showAddNewButton: true435 showAddNewButton: true
416 }436 }
417 PropertyChanges {
418 target: bottomEdge
419 enabled: false
420 }
421 }437 }
422 ]438 ]
439
423 onActiveChanged: {440 onActiveChanged: {
424 if (active && contactList.showAddNewButton) {441 if (active && contactList.showAddNewButton) {
425 contactList.positionViewAtBeginning()442 contactList.positionViewAtBeginning()
426 }443 }
444 if (active && (state === "searching")) {
445 searchField.forceActiveFocus()
446 }
427 }447 }
428448
429 KeyboardRectangle {449 KeyboardRectangle {
430450
=== modified file 'src/imports/BottomEdge.qml'
--- src/imports/BottomEdge.qml 2015-10-23 14:32:47 +0000
+++ src/imports/BottomEdge.qml 2015-11-24 00:27:58 +0000
@@ -89,10 +89,10 @@
89 id: bottomEdgeLoader89 id: bottomEdgeLoader
90 sourceComponent: bottomEdge.contentComponent90 sourceComponent: bottomEdge.contentComponent
91 asynchronous: true91 asynchronous: true
92 active: bottomEdge.enabled
92 }93 }
93 }94 }
9495
95
96 BottomEdgeHint {96 BottomEdgeHint {
97 id: bottomEdgeHint97 id: bottomEdgeHint
9898
9999
=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
--- src/imports/Ubuntu/Contacts/ContactListView.qml 2015-10-28 01:07:59 +0000
+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2015-11-24 00:27:58 +0000
@@ -248,12 +248,8 @@
248 This property holds the vertical velocity of the list248 This property holds the vertical velocity of the list
249 */249 */
250 readonly property real verticalVelocity: view.verticalVelocity250 readonly property real verticalVelocity: view.verticalVelocity
251 /*!
252 \qmlproperty Contact highlightedContact
253251
254 This property holds a reference to the Contact that should be highlighted252 property alias highlightSelected: view.highlightSelected
255 */
256 property Contact highlightedContact: null
257253
258 property var _busyDialog: null254 property var _busyDialog: null
259255
@@ -382,7 +378,6 @@
382 property bool showFavourites: true378 property bool showFavourites: true
383 property alias favouritesIsSelected: contactsModel.onlyFavorites379 property alias favouritesIsSelected: contactsModel.onlyFavorites
384 property bool contactsLoaded: false380 property bool contactsLoaded: false
385 highlightedContact: root.highlightedContact
386381
387 function getSectionText(index) {382 function getSectionText(index) {
388 var tag = listModel.contacts[index].tag.tag383 var tag = listModel.contacts[index].tag.tag
389384
=== modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml'
--- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-10-26 13:18:11 +0000
+++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-11-24 00:27:58 +0000
@@ -145,11 +145,11 @@
145 property list<Action> rightSideActions145 property list<Action> rightSideActions
146146
147 /*!147 /*!
148 \qmlproperty Contact highlightedContact148 \qmlproperty highlightSelected
149149
150 This property holds a reference to the Contact that should be highlighted150 This property holds if the current contact should be highlighted or not
151 */151 */
152 property Contact highlightedContact: null152 property bool highlightSelected: false
153153
154 /* internal */154 /* internal */
155 property var _currentSwipedItem: null155 property var _currentSwipedItem: null
@@ -269,7 +269,7 @@
269 flicking: contactListView.flicking269 flicking: contactListView.flicking
270 width: parent.width270 width: parent.width
271 selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate))271 selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate))
272 || (contactListView.highlightedContact && contactListView.highlightedContact.contactId == contact.contactId)272 || (contactListView.highlightSelected && (contactListView.currentIndex == index))
273 selectionMode: contactListView.isInSelectionMode273 selectionMode: contactListView.isInSelectionMode
274 defaultAvatarUrl: contactListView.defaultAvatarImageUrl274 defaultAvatarUrl: contactListView.defaultAvatarImageUrl
275 isCurrentItem: ListView.isCurrentItem275 isCurrentItem: ListView.isCurrentItem

Subscribers

People subscribed via source and target branches