Merge lp:~renatofilho/address-book-app/input-hints2 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 55
Merged at revision: 64
Proposed branch: lp:~renatofilho/address-book-app/input-hints2
Merge into: lp:address-book-app
Diff against target: 132 lines (+31/-1)
6 files modified
src/imports/Common/ContactDetailGroupBase.qml (+24/-0)
src/imports/ContactEdit/ContactDetailEmailsEditor.qml (+1/-0)
src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml (+2/-0)
src/imports/ContactEdit/ContactDetailOnlineAccountsEditor.qml (+1/-0)
src/imports/ContactEdit/ContactDetailPhoneNumbersEditor.qml (+1/-0)
src/imports/ContactEdit/ContactDetailWithTypeEditor.qml (+2/-1)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/input-hints2
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Bill Filler (community) Approve
Tiago Salem Herrmann Pending
Review via email: mp+185179@code.launchpad.net

This proposal supersedes a proposal from 2013-09-06.

Commit message

fix focus on creation

Description of the change

merge latest from trunk

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote : Posted in a previous version of this proposal

Using Qt.ImhDialableCharactersOnly prevents the user to add some common phone number characters, like parentheses, comma and hyphen. Also, the button '+*' in the osk does not work at all.

review: Needs Information
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote : Posted in a previous version of this proposal

> Using Qt.ImhDialableCharactersOnly prevents the user to add some common phone
> number characters, like parentheses, comma and hyphen. Also, the button '+*'
> in the osk does not work at all.

I do not think the parentheses, comma and hyphen should be accepted. Since they are not DialableCharacters. As the enum says.

About the "+*" there is a related bug report on Qt: https://bugreports.qt-project.org/browse/QTBUG-13696

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote : Posted in a previous version of this proposal

In general we normalize the phone numbers before making calls. So the non diable characters wouldn't be a problem.
It is commom to use () for area codes. IMO we should allow users to enter those chars
Also, comma should be considered as diable, it means to stop a second before dialing the next numbers, used mostly to call extensions IIRC.

Revision history for this message
Bill Filler (bfiller) wrote : Posted in a previous version of this proposal

I think the MR is fine, but the OSK layout is totally broken for phone numbers, both in layout and certain characters not working. Lets hold off on landing this until the OSK is fixed.

review: Abstain
Revision history for this message
Bill Filler (bfiller) wrote : Posted in a previous version of this proposal

btw, the email layout seems ok but not sure it's worth reverting the phone number code or just wait till osk fixed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:54
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~renatofilho/address-book-app/input-hints2/+merge/185179/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/address-book-app-ci/138/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-amd64-ci/138
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-armhf-ci/139
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-armhf-ci/139/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-i386-ci/138
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/851
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3320
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3320/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-saucy/2800
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/853
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/853/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/710
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/720

Click here to trigger a rebuild:
http://s-jenkins:8080/job/address-book-app-ci/138/rebuild

review: Needs Fixing (continuous-integration)
55. By Renato Araujo Oliveira Filho

Avoid fields to get focus during the creation.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:55
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~renatofilho/address-book-app/input-hints2/+merge/185179/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/address-book-app-ci/139/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-amd64-ci/139
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-armhf-ci/140
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-armhf-ci/140/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-saucy-i386-ci/139
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3315
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/853
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3323
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3323/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-saucy/2803
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/855
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/855/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/712
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/722

Click here to trigger a rebuild:
http://s-jenkins:8080/job/address-book-app-ci/139/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

works well, landing

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Common/ContactDetailGroupBase.qml'
2--- src/imports/Common/ContactDetailGroupBase.qml 2013-07-26 00:19:09 +0000
3+++ src/imports/Common/ContactDetailGroupBase.qml 2013-09-11 23:55:19 +0000
4@@ -31,6 +31,7 @@
5 property alias headerDelegate: headerItem.sourceComponent
6 property Component detailDelegate
7 property int minimumHeight: 0
8+ property bool loaded: false
9
10 implicitHeight: root.details.length > 0 ? contents.height : minimumHeight
11 visible: implicitHeight > 0
12@@ -45,6 +46,7 @@
13 onValuesChanged: {
14 if (!values) {
15 clear()
16+ root.loaded = false
17 return
18 }
19
20@@ -61,6 +63,10 @@
21 set(i, {"detail": values[i]})
22 }
23 }
24+
25+ if (!root.loaded) {
26+ loadTimer.restart()
27+ }
28 }
29 }
30
31@@ -92,6 +98,24 @@
32 value: root.details[index]
33 }
34 }
35+
36+ onItemAdded: {
37+ if (root.loaded) {
38+ item.forceActiveFocus()
39+ }
40+ }
41+
42 }
43 }
44+
45+ // This timer will help to avoid fields get focus during the page creation
46+ // At the first time that the page is loaded the timer will start and all
47+ // subsequent details added before the timeout would not receive focus,
48+ // after the timeout the new fields will receive focus as default
49+ Timer {
50+ id: loadTimer
51+
52+ interval: 500
53+ onTriggered: root.loaded = true
54+ }
55 }
56
57=== modified file 'src/imports/ContactEdit/ContactDetailEmailsEditor.qml'
58--- src/imports/ContactEdit/ContactDetailEmailsEditor.qml 2013-07-25 21:16:28 +0000
59+++ src/imports/ContactEdit/ContactDetailEmailsEditor.qml 2013-09-11 23:55:19 +0000
60@@ -25,4 +25,5 @@
61 detailType: QtContacts.ContactDetail.Email
62 fields: [ 0 ]
63 placeholderTexts: [ i18n.tr("Enter an email address") ]
64+ inputMethodHints: Qt.ImhEmailCharactersOnly
65 }
66
67=== modified file 'src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml'
68--- src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml 2013-07-26 00:19:09 +0000
69+++ src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml 2013-09-11 23:55:19 +0000
70@@ -28,6 +28,7 @@
71 property int currentItem: -1
72 property int fieldType: QtContacts.ContactDetail.FieldContext
73 property variant placeholderTexts: []
74+ property variant inputMethodHints
75
76 function save() {
77 var changed = false
78@@ -137,6 +138,7 @@
79 height: implicitHeight
80 width: root.width
81
82+ inputMethodHints: root.inputMethodHints
83 onDetailChanged: updateCombo(false)
84
85 // this is necessary due the default property of ListItem.Empty
86
87=== modified file 'src/imports/ContactEdit/ContactDetailOnlineAccountsEditor.qml'
88--- src/imports/ContactEdit/ContactDetailOnlineAccountsEditor.qml 2013-07-31 19:36:55 +0000
89+++ src/imports/ContactEdit/ContactDetailOnlineAccountsEditor.qml 2013-09-11 23:55:19 +0000
90@@ -27,4 +27,5 @@
91 fields: [ QtContacts.OnlineAccount.AccountUri ]
92 placeholderTexts: [ i18n.tr("Enter a social alias") ]
93 typeModel: ContactDetailOnlineAccountTypeModel { }
94+ inputMethodHints: Qt.ImhEmailCharactersOnly
95 }
96
97=== modified file 'src/imports/ContactEdit/ContactDetailPhoneNumbersEditor.qml'
98--- src/imports/ContactEdit/ContactDetailPhoneNumbersEditor.qml 2013-07-31 19:36:55 +0000
99+++ src/imports/ContactEdit/ContactDetailPhoneNumbersEditor.qml 2013-09-11 23:55:19 +0000
100@@ -27,4 +27,5 @@
101 fields: [ QtContacts.PhoneNumber.Number ]
102 placeholderTexts: [ i18n.tr("Enter a number") ]
103 typeModel: ContactDetailPhoneNumberTypeModel { }
104+ inputMethodHints: Qt.ImhDialableCharactersOnly
105 }
106
107=== modified file 'src/imports/ContactEdit/ContactDetailWithTypeEditor.qml'
108--- src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2013-08-28 17:06:38 +0000
109+++ src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2013-09-11 23:55:19 +0000
110@@ -29,6 +29,7 @@
111 property int fieldType: -1
112 property alias selectedTypeIndex: detailTypeSelector.currentIndex
113 property variant placeholderTexts: []
114+ property var inputMethodHints
115
116 function selectType(type) {
117 detailTypeSelector.selectItem(type)
118@@ -99,13 +100,13 @@
119 Component.onCompleted: {
120 if (index == 0) {
121 focus = true
122- detail.forceActiveFocus()
123 }
124 }
125 focus: false
126 detail: root.detail
127 field: modelData
128 placeholderText: root.placeholderTexts[index]
129+ inputMethodHints: root.inputMethodHints
130
131 anchors {
132 left: parent.left

Subscribers

People subscribed via source and target branches