ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04195
[Merge] lp:~nik90/ubuntu-clock-app/alternate-alarm-information into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-clock-app/alternate-alarm-information into lp:ubuntu-clock-app.
Commit message:
Alternates the alarm frequency & alarm ETA every 5 seconds and using a nice fade-in-out animation as per the new UX suggestion
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1466000 in Ubuntu Clock App: "[clock][ux] Alarm interval information inconsistent"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1466000
For more details, see:
https://code.launchpad.net/~nik90/ubuntu-clock-app/alternate-alarm-information/+merge/267721
This MP alternates the alarm frequency & alarm ETA every 5 seconds and using a nice fade-in-out animation as per the new UX suggestion.
--- --- --- ---
UX Comment:
Thank you for reporting this bug. I think the suggestion to alternate the two pieces of info would be a nice refinement to the U.I.
Have updated the spec accordingly:
https://docs.google.com/presentation/d/1JvDyhsW17d1-Mz8OY1YMBKwfRI2z9qgyRjbujEsxEMk/edit#slide=id.g34303b1ce_2_11
"Once [Alarm] changes are confirmed, user lands in the main view again. The alarm is automatically activated.
For one off alarms only the time until the alarm sounds (e.g. ‘1hr 10m’) is shown in the alarms subtitle area.
For repeating alarms, the repeat interval (‘daily’, ‘weekdays’, etc) and time until the alarm sounds (e.g. ‘1hr 10m’) are alternated within the alarms subtitle area (one value fades out to be replaced by the other on a 5-10 second interval)".
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~nik90/ubuntu-clock-app/alternate-alarm-information into lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmDelegate.qml'
--- app/alarm/AlarmDelegate.qml 2015-08-05 12:50:42 +0000
+++ app/alarm/AlarmDelegate.qml 2015-08-11 21:52:19 +0000
@@ -24,6 +24,7 @@
id: root
property var localTime
+ property bool showAlarmFrequency
width: parent ? parent.width : 0
height: units.gu(9)
@@ -82,6 +83,68 @@
text: type === Alarm.Repeating ? alarmUtils.format_day_string(daysOfWeek, type)
: model.enabled ? alarmUtils.get_time_to_next_alarm(model.date - localTime)
: "Alarm Disabled"
+
+ states: [
+ State {
+ name: "AlarmFrequency"
+ when: root.showAlarmFrequency && type === Alarm.Repeating
+ },
+
+ State {
+ name: "AlarmETA"
+ when: !root.showAlarmFrequency && type === Alarm.Repeating
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "AlarmFrequency"
+ to: "AlarmETA"
+ SequentialAnimation {
+ PropertyAnimation {
+ target: alarmSubtitle
+ property: "opacity"
+ to: 0
+ duration: UbuntuAnimation.BriskDuration
+ }
+
+ ScriptAction {
+ script: alarmSubtitle.text = alarmUtils.get_time_to_next_alarm(model.date - localTime)
+ }
+
+ PropertyAnimation {
+ target: alarmSubtitle
+ property: "opacity"
+ to: 1.0
+ duration: UbuntuAnimation.BriskDuration
+ }
+ }
+ },
+
+ Transition {
+ from: "AlarmETA"
+ to: "AlarmFrequency"
+ SequentialAnimation {
+ PropertyAnimation {
+ target: alarmSubtitle
+ property: "opacity"
+ to: 0
+ duration: UbuntuAnimation.BriskDuration
+ }
+
+ ScriptAction {
+ script: alarmSubtitle.text = alarmUtils.format_day_string(daysOfWeek, type)
+ }
+
+ PropertyAnimation {
+ target: alarmSubtitle
+ property: "opacity"
+ to: 1.0
+ duration: UbuntuAnimation.BriskDuration
+ }
+ }
+ }
+ ]
}
}
}
@@ -120,30 +183,6 @@
}
}
- Component {
- id: _internalTimerComponent
- Timer {
- running: false
- interval: 5000
- repeat: false
- onTriggered: {
- alarmSubtitle.text = alarmUtils.format_day_string(daysOfWeek)
- _internalTimerLoader.sourceComponent = undefined
- }
- }
- }
-
- Loader {
- id: _internalTimerLoader
- asynchronous: true
-
- onStatusChanged: {
- if(status === Loader.Ready) {
- _internalTimerLoader.item.restart()
- }
- }
- }
-
Connections {
target: model
onStatusChanged: {
@@ -153,11 +192,6 @@
*/
if (model.status === Alarm.Ready) {
alarmStatus.checked = model.enabled;
-
- if(alarmStatus.checked && type === Alarm.Repeating) {
- alarmSubtitle.text = alarmUtils.get_time_to_next_alarm(model.date - localTime)
- _internalTimerLoader.sourceComponent = _internalTimerComponent
- }
}
}
}
=== modified file 'app/alarm/AlarmList.qml'
--- app/alarm/AlarmList.qml 2015-08-05 12:50:42 +0000
+++ app/alarm/AlarmList.qml 2015-08-11 21:52:19 +0000
@@ -24,6 +24,7 @@
objectName: "alarmListView"
property var localTime
+ property bool showAlarmFrequency: true
signal clearSelection()
signal closeSelection()
@@ -32,6 +33,16 @@
clip: true
anchors.fill: parent
+ Timer {
+ id: alarmTimer
+ running: alarmListView.visible
+ interval: 5000
+ repeat: true
+ onTriggered: {
+ showAlarmFrequency = !showAlarmFrequency
+ }
+ }
+
displaced: Transition {
UbuntuNumberAnimation { property: "y"; duration: UbuntuAnimation.BriskDuration }
}
@@ -41,6 +52,7 @@
objectName: "alarm" + index
localTime: alarmListView.localTime
+ showAlarmFrequency: alarmListView.showAlarmFrequency
leadingActions: ListItemActions {
actions: [
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-11 20:40:33 +0000
+++ debian/changelog 2015-08-11 21:52:19 +0000
@@ -6,6 +6,7 @@
[Nekhelesh Ramananthan]
* Increase the height of times in the alarm screen (LP: #1365428)
+ * Fix alarm interval information being inconsistent (LP: #1466000)
[Victor Thompson]
* Show all README files in QtCreator
References