Merge lp:~nik90/ubuntu-clock-app/new-headers-api into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 22
Merged at revision: 18
Proposed branch: lp:~nik90/ubuntu-clock-app/new-headers-api
Merge into: lp:ubuntu-clock-app
Prerequisite: lp:~nik90/ubuntu-clock-app/fix-first-run-phone-issues
Diff against target: 106 lines (+30/-45)
2 files modified
app/alarm/AlarmPage.qml (+8/-20)
app/alarm/EditAlarmPage.qml (+22/-25)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/new-headers-api
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Review via email: mp+226109@code.launchpad.net

Commit message

Transitions to the new headers API and also removed the redundant back button definition in the alarm page since it is provided by the pagestack automatically.

Description of the change

Transitions to the new headers API. I also removed the redundant back button definition in the alarm page since it is provided by the pagestack automatically.

NOTE: With this MP, we no longer support Trusty since the new header API will require the latest SDK which in turn requires Qt 5.3 which will not be backported to Trusty.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
19. By Nekhelesh Ramananthan

Added the custom back button in the edit alarm page as it requires a custom icon

20. By Nekhelesh Ramananthan

Moved the header actions to the top

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
21. By Nekhelesh Ramananthan

Added labels to the action

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

This looks good. Could we still remove the custom back action but not introduce the Trusty regression? If you have a reason to jump forward to use the "head" property that is also fine.

review: Needs Information
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> This looks good. Could we still remove the custom back action but not
> introduce the Trusty regression? If you have a reason to jump forward to use
> the "head" property that is also fine.

I am afraid we can't :/. The design shown at https://docs.google.com/presentation/d/1Kkl7xT8BYo9mT8i3IXh6rPrDlNg6cBxTajahlRYIGlI/edit#slide=id.g18883f09d_2108 requires the back button to look like a close button and for that we need to have a custom back action. I could request the designers to consider using the default back button, but I notice that when adding a new contact in the address book, it also uses a custom back button to show the close button. So I think we should stick to the design specs.

The Trusty support is being dropped since when working on the next main feature which is the world clocks, the add city page will use the new header search mode which requires the new header API. So we break Trusty compatibility either now or a few days later.

I say we go ahead with this, but will wait for your approval before merging.

22. By Nekhelesh Ramananthan

merged parent branch

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

Lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmPage.qml'
2--- app/alarm/AlarmPage.qml 2014-06-25 20:52:33 +0000
3+++ app/alarm/AlarmPage.qml 2014-07-11 10:08:56 +0000
4@@ -23,6 +23,14 @@
5
6 flickable: null
7
8+ head.actions: Action {
9+ iconName: "add"
10+ text: i18n.tr("Alarm")
11+ onTriggered: {
12+ mainStack.push(Qt.resolvedUrl("EditAlarmPage.qml"))
13+ }
14+ }
15+
16 Component.onCompleted: Utils.log(debugMode, "Alarm Page loaded")
17
18 AlarmList{
19@@ -30,24 +38,4 @@
20 model: alarmModel
21 anchors.fill: parent
22 }
23-
24- tools: ToolbarItems {
25- back: Button {
26- action: Action {
27- iconName: "back"
28- onTriggered: {
29- mainStack.pop()
30- }
31- }
32- }
33-
34- ToolbarButton {
35- action: Action {
36- iconName: "add"
37- onTriggered: {
38- mainStack.push(Qt.resolvedUrl("EditAlarmPage.qml"))
39- }
40- }
41- }
42- }
43 }
44
45=== modified file 'app/alarm/EditAlarmPage.qml'
46--- app/alarm/EditAlarmPage.qml 2014-07-07 09:04:08 +0000
47+++ app/alarm/EditAlarmPage.qml 2014-07-11 10:08:56 +0000
48@@ -35,6 +35,28 @@
49 title: isNewAlarm ? i18n.tr("New Alarm") : i18n.tr("Edit Alarm")
50 visible: false
51
52+ head {
53+ backAction: Action {
54+ iconName: "close"
55+ onTriggered: {
56+ mainStack.pop()
57+ }
58+ }
59+
60+ actions: Action {
61+ iconName: "save"
62+ text: i18n.tr("Alarm")
63+ onTriggered: {
64+ if(isNewAlarm) {
65+ saveNewAlarm()
66+ }
67+ else {
68+ updateAlarm()
69+ }
70+ }
71+ }
72+ }
73+
74 Component.onCompleted: {
75 if(!isNewAlarm) {
76 readAlarm()
77@@ -175,29 +197,4 @@
78 {"alarmSound": _alarmSound})
79 }
80 }
81-
82- tools: ToolbarItems {
83- back: Button {
84- action: Action {
85- iconName: "close"
86- onTriggered: {
87- mainStack.pop()
88- }
89- }
90- }
91-
92- ToolbarButton {
93- action: Action {
94- iconName: "save"
95- onTriggered: {
96- if(isNewAlarm) {
97- saveNewAlarm()
98- }
99- else {
100- updateAlarm()
101- }
102- }
103- }
104- }
105- }
106 }

Subscribers

People subscribed via source and target branches