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
1=== modified file 'src/imports/ABContactListPage.qml'
2--- src/imports/ABContactListPage.qml 2015-10-26 13:18:11 +0000
3+++ src/imports/ABContactListPage.qml 2015-11-24 00:27:58 +0000
4@@ -89,7 +89,10 @@
5
6 function showContact(contact)
7 {
8- mainPage.state = "default";
9+ // go back to normal state if not searching
10+ if (state !== "searching") {
11+ mainPage.state = "default";
12+ }
13 openViewPage({model: contactList.listModel,
14 contact: contact});
15 }
16@@ -129,6 +132,11 @@
17
18 function moveListToContact(contact)
19 {
20+ // skipt it if searching
21+ if (state === "searching") {
22+ return
23+ }
24+
25 contactIndex = contact
26 mainPage.state = "default"
27 // this means a new contact was created
28@@ -176,15 +184,11 @@
29 filterTerm: searchField.text
30 multiSelectionEnabled: true
31 multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode
32- highlightedContact: contactViewPage ? contactViewPage.contact :
33- contactEditorPage ? contactEditorPage.contact : null
34-
35+ highlightSelected: pageStack.columns > 1
36 onAddContactClicked: mainPage.createContactWithPhoneNumber(label)
37 onAddNewContactClicked: mainPage.createContactWithPhoneNumber(mainPage.newPhoneToAdd)
38
39- onContactClicked: {
40- showContact(contact);
41- }
42+ onContactClicked: mainPage.showContact(contact)
43 onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default"
44 onSelectionCanceled: {
45 if (pickMode) {
46@@ -209,10 +213,15 @@
47 right: parent.right
48 rightMargin: units.gu(2)
49 }
50- visible: mainPage.searching
51+ focus: false
52+ visible: false
53 onTextChanged: contactList.currentIndex = -1
54 inputMethodHints: Qt.ImhNoPredictiveText
55 placeholderText: i18n.tr("Search...")
56+ onFocusChanged: {
57+ if (visible && focus)
58+ searchField.forceActiveFocus()
59+ }
60 }
61
62 Connections {
63@@ -305,6 +314,11 @@
64 }
65
66 PropertyChanges {
67+ target: bottomEdge
68+ enabled: false
69+ }
70+
71+ PropertyChanges {
72 target: mainPage.head
73 backAction: searchingState.backAction
74 contents: searchField
75@@ -314,6 +328,12 @@
76 target: searchField
77 text: ""
78 }
79+
80+ PropertyChanges {
81+ target: searchField
82+ visible: true
83+ focus: true
84+ }
85 },
86 PageHeadState {
87 id: selectionState
88@@ -414,16 +434,16 @@
89 detailToPick: -1
90 showAddNewButton: true
91 }
92- PropertyChanges {
93- target: bottomEdge
94- enabled: false
95- }
96 }
97 ]
98+
99 onActiveChanged: {
100 if (active && contactList.showAddNewButton) {
101 contactList.positionViewAtBeginning()
102 }
103+ if (active && (state === "searching")) {
104+ searchField.forceActiveFocus()
105+ }
106 }
107
108 KeyboardRectangle {
109
110=== modified file 'src/imports/BottomEdge.qml'
111--- src/imports/BottomEdge.qml 2015-10-23 14:32:47 +0000
112+++ src/imports/BottomEdge.qml 2015-11-24 00:27:58 +0000
113@@ -89,10 +89,10 @@
114 id: bottomEdgeLoader
115 sourceComponent: bottomEdge.contentComponent
116 asynchronous: true
117+ active: bottomEdge.enabled
118 }
119 }
120
121-
122 BottomEdgeHint {
123 id: bottomEdgeHint
124
125
126=== modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml'
127--- src/imports/Ubuntu/Contacts/ContactListView.qml 2015-10-28 01:07:59 +0000
128+++ src/imports/Ubuntu/Contacts/ContactListView.qml 2015-11-24 00:27:58 +0000
129@@ -248,12 +248,8 @@
130 This property holds the vertical velocity of the list
131 */
132 readonly property real verticalVelocity: view.verticalVelocity
133- /*!
134- \qmlproperty Contact highlightedContact
135
136- This property holds a reference to the Contact that should be highlighted
137- */
138- property Contact highlightedContact: null
139+ property alias highlightSelected: view.highlightSelected
140
141 property var _busyDialog: null
142
143@@ -382,7 +378,6 @@
144 property bool showFavourites: true
145 property alias favouritesIsSelected: contactsModel.onlyFavorites
146 property bool contactsLoaded: false
147- highlightedContact: root.highlightedContact
148
149 function getSectionText(index) {
150 var tag = listModel.contacts[index].tag.tag
151
152=== modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml'
153--- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-10-26 13:18:11 +0000
154+++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2015-11-24 00:27:58 +0000
155@@ -145,11 +145,11 @@
156 property list<Action> rightSideActions
157
158 /*!
159- \qmlproperty Contact highlightedContact
160+ \qmlproperty highlightSelected
161
162- This property holds a reference to the Contact that should be highlighted
163+ This property holds if the current contact should be highlighted or not
164 */
165- property Contact highlightedContact: null
166+ property bool highlightSelected: false
167
168 /* internal */
169 property var _currentSwipedItem: null
170@@ -269,7 +269,7 @@
171 flicking: contactListView.flicking
172 width: parent.width
173 selected: (contactListView.multiSelectionEnabled && contactListView.isSelected(contactDelegate))
174- || (contactListView.highlightedContact && contactListView.highlightedContact.contactId == contact.contactId)
175+ || (contactListView.highlightSelected && (contactListView.currentIndex == index))
176 selectionMode: contactListView.isInSelectionMode
177 defaultAvatarUrl: contactListView.defaultAvatarImageUrl
178 isCurrentItem: ListView.isCurrentItem

Subscribers

People subscribed via source and target branches