Merge lp:~canonical-platform-qa/telegram-app/add_object_names_for_sign_in into lp:telegram-app

Proposed by Omer Akram
Status: Merged
Approved by: Jin
Approved revision: 182
Merged at revision: 182
Proposed branch: lp:~canonical-platform-qa/telegram-app/add_object_names_for_sign_in
Merge into: lp:telegram-app
Diff against target: 198 lines (+24/-0)
7 files modified
telegram/app/qml/AuthCodePage.qml (+7/-0)
telegram/app/qml/AuthCountriesPage.qml (+7/-0)
telegram/app/qml/AuthNumberPage.qml (+3/-0)
telegram/app/qml/IntroPage.qml (+2/-0)
telegram/app/qml/components/TelegramPage.qml (+1/-0)
telegram/app/qml/telegram.qml (+1/-0)
telegram/app/qml/ui/dialogs/ConfirmationDialog.qml (+3/-0)
To merge this branch: bzr merge lp:~canonical-platform-qa/telegram-app/add_object_names_for_sign_in
Reviewer Review Type Date Requested Status
Jin (community) Approve
Review via email: mp+293377@code.launchpad.net

Commit message

Add objectNames for sign in screens

Description of the change

Add objectNames for sign in screens

To post a comment you must log in.
179. By Omer Akram

Remove duplicate objectName

Revision history for this message
Jin (jindallo) wrote :

Hello Omer,

Thanks for your patch,
there is a suggestion from us,
could we use the same naming scheme by:
    id: my_item
    objectName: "myItem"

I insert my inline comment below.

180. By Omer Akram

Change objectName naming scheme

181. By Omer Akram

more objectName changes per review

Revision history for this message
Omer Akram (om26er) wrote :

Thanks for the review, I have made the changes as you suggested.

Revision history for this message
Omer Akram (om26er) wrote :

Also since id: is an internal detail and its name may or may not be clear enough for external use, so it makes sense to enhance the objectName text to be more meaningful

182. By Omer Akram

Merge from trunk

Revision history for this message
Jin (jindallo) wrote :

The code looks good to me,
I will approve after verified pass from my local.

Revision history for this message
Jin (jindallo) wrote :

Verified pass locally,
I approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/AuthCodePage.qml'
2--- telegram/app/qml/AuthCodePage.qml 2015-09-30 14:55:01 +0000
3+++ telegram/app/qml/AuthCodePage.qml 2016-05-03 05:27:06 +0000
4@@ -6,6 +6,7 @@
5
6 TelegramPage {
7 id: auth_code_page
8+ objectName: "authCodePage"
9
10 property bool phoneRegistered: true
11 property bool allowCall: true
12@@ -102,6 +103,7 @@
13
14 TextField {
15 id: code_text
16+ objectName: "verificationCodeEntry"
17 width: column.width
18 anchors.horizontalCenter: parent.horizontalCenter
19 horizontalAlignment: TextInput.AlignHCenter
20@@ -121,6 +123,7 @@
21
22 TextField {
23 id: fname_text
24+ objectName: "firstNameEntry"
25 width: column.width
26 anchors.horizontalCenter: parent.horizontalCenter
27 placeholderText: i18n.tr("First Name")
28@@ -130,6 +133,7 @@
29
30 TextField {
31 id: lname_text
32+ objectName: "lastNameEntry"
33 width: column.width
34 anchors.horizontalCenter: parent.horizontalCenter
35 placeholderText: i18n.tr("Last Name")
36@@ -139,6 +143,7 @@
37
38 TelegramButton {
39 id: accept_button
40+ objectName: "signInButton"
41 width: column.width
42 height: code_text.height
43 anchors.horizontalCenter: parent.horizontalCenter
44@@ -149,6 +154,7 @@
45
46 TelegramButton {
47 id: resend_button
48+ objectName: "resendCodeButton"
49 width: column.width
50 height: code_text.height
51 anchors.horizontalCenter: parent.horizontalCenter
52@@ -163,6 +169,7 @@
53
54 TelegramButton {
55 id: call_button
56+ objectName: "requestCallButton"
57 width: column.width
58 height: code_text.height
59 anchors.horizontalCenter: parent.horizontalCenter
60
61=== modified file 'telegram/app/qml/AuthCountriesPage.qml'
62--- telegram/app/qml/AuthCountriesPage.qml 2016-04-08 06:26:31 +0000
63+++ telegram/app/qml/AuthCountriesPage.qml 2016-05-03 05:27:06 +0000
64@@ -5,6 +5,7 @@
65
66 Page {
67 id: page
68+ objectName: "countriesListPage"
69
70 property string code
71
72@@ -22,6 +23,7 @@
73
74 ListView {
75 id: country_list
76+ objectName: "countriesList"
77
78 anchors.fill: parent
79 currentIndex: -1
80@@ -32,6 +34,7 @@
81
82 model: CountriesModel {}
83 delegate: ListItem.SingleValue {
84+ objectName: getObjectName()
85 text: name
86 value: nativeName
87 onClicked: {
88@@ -41,6 +44,10 @@
89 page.code = "";
90 page.code = callingCode;
91 }
92+
93+ function getObjectName() {
94+ return name.toLowerCase().split(' ').join('_')
95+ }
96 }
97
98 Component.onCompleted: {
99
100=== modified file 'telegram/app/qml/AuthNumberPage.qml'
101--- telegram/app/qml/AuthNumberPage.qml 2015-12-09 11:27:12 +0000
102+++ telegram/app/qml/AuthNumberPage.qml 2016-05-03 05:27:06 +0000
103@@ -7,6 +7,7 @@
104
105 TelegramPage {
106 id: auth_phone_page
107+ objectName: "authPhonePage"
108
109 property string countryCode
110 property string fullPhoneNumber: "+" + countryCode + phoneNumber
111@@ -58,6 +59,7 @@
112
113 TextField {
114 id: phone_number
115+ objectName: "phoneNumberEntry"
116 width: column.width
117 inputMethodHints: Qt.ImhDialableCharactersOnly
118 anchors.horizontalCenter: parent.horizontalCenter
119@@ -82,6 +84,7 @@
120 }
121
122 TelegramButton {
123+ objectName: "doneButton"
124 width: phone_number.width
125 height: phone_number.height
126 anchors.horizontalCenter: parent.horizontalCenter
127
128=== modified file 'telegram/app/qml/IntroPage.qml'
129--- telegram/app/qml/IntroPage.qml 2016-03-04 11:43:19 +0000
130+++ telegram/app/qml/IntroPage.qml 2016-05-03 05:27:06 +0000
131@@ -7,6 +7,7 @@
132
133 TelegramPage {
134 id: page
135+ objectName: "introPage"
136
137 property bool isWide: page.width > units.gu(70)
138 property alias startMessagingButton: startMessagingButton
139@@ -163,6 +164,7 @@
140 // font: Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium"), color: "#000000"})
141 TelegramButton {
142 id: startMessagingButton
143+ objectName: "startMessagingButton"
144 z: 2
145 anchors {
146 horizontalCenter: parent.horizontalCenter
147
148=== modified file 'telegram/app/qml/components/TelegramPage.qml'
149--- telegram/app/qml/components/TelegramPage.qml 2015-09-30 14:55:01 +0000
150+++ telegram/app/qml/components/TelegramPage.qml 2016-05-03 05:27:06 +0000
151@@ -28,6 +28,7 @@
152
153 ActivityIndicator {
154 id: activity_indicator
155+ objectName: "processingIndicator"
156
157 anchors.centerIn: parent
158 running: isBusy
159
160=== modified file 'telegram/app/qml/telegram.qml'
161--- telegram/app/qml/telegram.qml 2016-04-08 06:08:04 +0000
162+++ telegram/app/qml/telegram.qml 2016-05-03 05:27:06 +0000
163@@ -31,6 +31,7 @@
164
165 MainView {
166 id: mainView
167+ objectName: "appMainView"
168 width: units.gu(38)
169 height: units.gu(50)
170 focus: true
171
172=== modified file 'telegram/app/qml/ui/dialogs/ConfirmationDialog.qml'
173--- telegram/app/qml/ui/dialogs/ConfirmationDialog.qml 2015-09-22 09:57:07 +0000
174+++ telegram/app/qml/ui/dialogs/ConfirmationDialog.qml 2016-05-03 05:27:06 +0000
175@@ -4,6 +4,7 @@
176
177 Dialog {
178 id: dialogue
179+ objectName: "confirmationDialog"
180 title: i18n.tr("Telegram")
181 // text is the property to fill for the dialog body
182
183@@ -17,6 +18,7 @@
184 }
185
186 Button {
187+ objectName: "acceptButton"
188 text: acceptText
189 color: UbuntuColors.green
190 onClicked: optionSelected(onAccept)
191@@ -30,6 +32,7 @@
192 }
193
194 Button {
195+ objectName: "cancelButton"
196 text: cancelText
197 color: UbuntuColors.lightGrey
198 onClicked: optionSelected(onCancel)

Subscribers

People subscribed via source and target branches

to status/vote changes: