Merge lp:~nskaggs/reminders-app/newHeader2 into lp:reminders-app

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 153
Merged at revision: 165
Proposed branch: lp:~nskaggs/reminders-app/newHeader2
Merge into: lp:reminders-app
Diff against target: 423 lines (+173/-163)
7 files modified
src/app/qml/reminders.qml (+2/-0)
src/app/qml/ui/NotePage.qml (+34/-29)
src/app/qml/ui/NotebooksPage.qml (+39/-34)
src/app/qml/ui/NotesPage.qml (+78/-66)
src/app/qml/ui/RemindersPage.qml (+17/-22)
src/app/qml/ui/SearchNotesPage.qml (+1/-11)
tests/autopilot/reminders/__init__.py (+2/-1)
To merge this branch: bzr merge lp:~nskaggs/reminders-app/newHeader2
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Michael Zanetti Pending
David Planella Pending
Review via email: mp+224229@code.launchpad.net

This proposal supersedes a proposal from 2014-05-20.

Commit message

First implementation of the new header.

Description of the change

First implementation of the new header.

All works well, but I had to add the title to the search page to have the back button.

Also, the shape in the new toolbar actions is ugly in our design. I'll look for remove it

------

Another resubmit to avoid unintended diff changes

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

Works well! 2 comments:

* I think "Search notes" would be better for the search page title

* can we change the order of the actions so that "add note" is always visible instead of "search"? I think that's more important.

review: Needs Information
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote : Posted in a previous version of this proposal

> Works well! 2 comments:
>
> * I think "Search notes" would be better for the search page title

Agree!

> * can we change the order of the actions so that "add note" is always visible
> instead of "search"? I think that's more important.

Done, but it will change again in next weeks: t1mp is working to have search bar in the header.

But you're right, so I changed it

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote : Posted in a previous version of this proposal

Looks good to me, just a small thing:
- When viewing a note, the default action shown on the right of the header is "Delete". I think it would make more sense for it to be "Edit" (or perhaps even "Add reminder")

review: Needs Fixing
Revision history for this message
David Planella (dpm) wrote : Posted in a previous version of this proposal

Looks good to me: it works as expected and addresses all previous comments.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote : Posted in a previous version of this proposal

Seems trunk has some trouble with the 2 tests invovling using an account, reminders.tests.test_reminders.RemindersTestCaseWithAccount. I'll try and fix so this can land.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml 2014-05-16 08:53:45 +0000
+++ src/app/qml/reminders.qml 2014-06-24 00:09:21 +0000
@@ -39,6 +39,8 @@
39 // Note! applicationName needs to match the "name" field of the click manifest39 // Note! applicationName needs to match the "name" field of the click manifest
40 applicationName: "com.ubuntu.reminders"40 applicationName: "com.ubuntu.reminders"
4141
42 useDeprecatedToolbar: false
43
42 /*44 /*
43 This property enables the application to change orientation45 This property enables the application to change orientation
44 when the device is rotated. The default is false.46 when the device is rotated. The default is false.
4547
=== modified file 'src/app/qml/ui/NotePage.qml'
--- src/app/qml/ui/NotePage.qml 2014-05-12 11:12:06 +0000
+++ src/app/qml/ui/NotePage.qml 2014-06-24 00:09:21 +0000
@@ -29,35 +29,40 @@
29 signal editNote(var note)29 signal editNote(var note)
3030
31 tools: ToolbarItems {31 tools: ToolbarItems {
32 ToolbarButton {32 ToolbarButton {
33 text: i18n.tr("Delete")33 action: Action {
34 iconName: "delete"34 text: i18n.tr("Edit")
35 onTriggered: {35 iconName: "edit"
36 NotesStore.deleteNote(note.guid);36 onTriggered: {
37 pagestack.pop();37 root.editNote(root.note)
38 }38 }
39 }39 }
40 ToolbarSpacer {}40 }
41 ToolbarButton {41 ToolbarButton {
42 text: note.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")42 action: Action {
43 // TODO: use this instead when the toolkit switches from using the43 text: note.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
44 // ubuntu-mobile-icons theme to suru:44 // TODO: use this instead when the toolkit switches from using the
45 //iconName: note.reminder ? "reminder" : "reminder-new"45 // ubuntu-mobile-icons theme to suru:
46 iconSource: note.reminder ?46 //iconName: note.reminder ? "reminder" : "reminder-new"
47 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :47 iconSource: note.reminder ?
48 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")48 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
49 onTriggered: {49 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
50 pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), {title: root.title, note: root.note});50 onTriggered: {
51 }51 pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), {title: root.title, note: root.note});
52 }52 }
53 ToolbarButton {53 }
54 text: i18n.tr("Edit")54 }
55 iconName: "edit"55 ToolbarButton {
56 onTriggered: {56 action: Action {
57 root.editNote(root.note)57 text: i18n.tr("Delete")
58 }58 iconName: "delete"
59 }59 onTriggered: {
60 }60 NotesStore.deleteNote(note.guid);
61 pagestack.pop();
62 }
63 }
64 }
65 }
6166
62 NoteView {67 NoteView {
63 id: noteView68 id: noteView
6469
=== modified file 'src/app/qml/ui/NotebooksPage.qml'
--- src/app/qml/ui/NotebooksPage.qml 2014-05-14 17:50:23 +0000
+++ src/app/qml/ui/NotebooksPage.qml 2014-06-24 00:09:21 +0000
@@ -36,43 +36,48 @@
3636
37 tools: ToolbarItems {37 tools: ToolbarItems {
38 ToolbarButton {38 ToolbarButton {
39 text: i18n.tr("Search")39 action: Action {
40 iconName: "search"40 objectName: "addNotebookButton"
41 onTriggered: {41 text: i18n.tr("Add notebook")
42 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))42 iconName: "add"
43 }43 onTriggered: {
44 }44 contentColumn.newNotebook = true;
4545 }
46 ToolbarButton {46 }
47 text: i18n.tr("Refresh")47 }
48 iconName: "reload"48
49 onTriggered: {49 ToolbarButton {
50 NotesStore.refreshNotebooks();50 action: Action {
51 }51 text: i18n.tr("Search")
52 }52 iconName: "search"
5353 onTriggered: {
54 ToolbarSpacer { }54 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
5555 }
56 ToolbarButton {56 }
57 text: i18n.tr("Accounts")57 }
58 iconName: "contacts-app-symbolic"58
59 visible: accounts.count > 159 ToolbarButton {
60 onTriggered: {60 action: Action {
61 openAccountPage(true);61 text: i18n.tr("Refresh")
62 }62 iconName: "reload"
63 }63 onTriggered: {
6464 NotesStore.refreshNotebooks();
65 ToolbarButton {65 }
66 objectName: "addNotebookButton"66 }
67 text: i18n.tr("Add notebook")67 }
68 iconName: "add"68
69 onTriggered: {69 ToolbarButton {
70 contentColumn.newNotebook = true;70 action: Action {
71 text: i18n.tr("Accounts")
72 iconName: "contacts-app-symbolic"
73 visible: accounts.count > 1
74 onTriggered: {
75 openAccountPage(true);
76 }
71 }77 }
72 }78 }
73 }79 }
7480
75
76 Notebooks {81 Notebooks {
77 id: notebooks82 id: notebooks
78 }83 }
@@ -148,7 +153,7 @@
148 visible: !notebooks.loading && notebooks.error153 visible: !notebooks.loading && notebooks.error
149 text: notebooks.error154 text: notebooks.error
150 }155 }
151 156
152 }157 }
153158
154 Item {159 Item {
155160
=== modified file 'src/app/qml/ui/NotesPage.qml'
--- src/app/qml/ui/NotesPage.qml 2014-05-14 10:31:49 +0000
+++ src/app/qml/ui/NotesPage.qml 2014-06-24 00:09:21 +0000
@@ -41,72 +41,84 @@
4141
42 tools: ToolbarItems {42 tools: ToolbarItems {
43 ToolbarButton {43 ToolbarButton {
44 text: i18n.tr("Search")44 action: Action {
45 iconName: "search"45 text: i18n.tr("Add note")
46 onTriggered: {46 iconName: "add"
47 root.openSearch();47 onTriggered: {
48 }48 NotesStore.createNote("Untitled");
49 }49 }
5050 }
51 ToolbarButton {51 }
52 text: i18n.tr("Refresh")52
53 iconName: "reload"53 ToolbarButton {
54 onTriggered: {54 action: Action {
55 NotesStore.refreshNotes();55 text: i18n.tr("Search")
56 }56 iconName: "search"
57 }57 onTriggered: {
5858 root.openSearch();
59 ToolbarButton {59 }
60 text: i18n.tr("Accounts")60 }
61 iconName: "contacts-app-symbolic"61 }
62 visible: accounts.count > 162
63 onTriggered: {63 ToolbarButton {
64 openAccountPage(true);64 action: Action {
65 }65 text: i18n.tr("Refresh")
66 }66 iconName: "reload"
6767 onTriggered: {
68 ToolbarSpacer { }68 NotesStore.refreshNotes();
6969 }
70 ToolbarButton {70 }
71 text: i18n.tr("Delete")71 }
72 iconName: "delete"72
73 visible: root.selectedNote !== null73 ToolbarButton {
74 onTriggered: {74 action: Action {
75 NotesStore.deleteNote(root.selectedNote.guid);75 text: i18n.tr("Accounts")
76 }76 iconName: "contacts-app-symbolic"
77 }77 visible: accounts.count > 1
78 ToolbarButton {78 onTriggered: {
79 text: root.selectedNote.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")79 openAccountPage(true);
80 // TODO: use this instead when the toolkit switches from using the80 }
81 // ubuntu-mobile-icons theme to suru:81 }
82 //iconName: root.selectedNote.reminder ? "reminder" : "reminder-new"82 }
83 iconSource: root.selectedNote.reminder ?83
84 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :84 ToolbarButton {
85 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")85 action: Action {
86 visible: root.selectedNote !== null86 text: i18n.tr("Delete")
87 onTriggered: {87 iconName: "delete"
88 root.selectedNote.reminder = !root.selectedNote.reminder88 visible: root.selectedNote !== null
89 NotesStore.saveNote(root.selectedNote.guid)89 onTriggered: {
90 }90 NotesStore.deleteNote(root.selectedNote.guid);
91 }91 }
92 ToolbarButton {92 }
93 text: i18n.tr("Edit")93 }
94 iconName: "edit"94 ToolbarButton {
95 visible: root.selectedNote !== null95 action: Action {
96 onTriggered: {96 text: root.selectedNote.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
97 print("should edit note")97 // TODO: use this instead when the toolkit switches from using the
98 root.editNote(root.selectedNote)98 // ubuntu-mobile-icons theme to suru:
99 }99 //iconName: root.selectedNote.reminder ? "reminder" : "reminder-new"
100 }100 iconSource: root.selectedNote.reminder ?
101101 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
102 ToolbarButton {102 Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
103 text: i18n.tr("Add note")103 visible: root.selectedNote !== null
104 iconName: "add"104 onTriggered: {
105 onTriggered: {105 root.selectedNote.reminder = !root.selectedNote.reminder
106 NotesStore.createNote("Untitled");106 NotesStore.saveNote(root.selectedNote.guid)
107 }107 }
108 }108 }
109 }109 }
110 ToolbarButton {
111 action: Action {
112 text: i18n.tr("Edit")
113 iconName: "edit"
114 visible: root.selectedNote !== null
115 onTriggered: {
116 print("should edit note")
117 root.editNote(root.selectedNote)
118 }
119 }
120 }
121 }
110122
111 Notes {123 Notes {
112 id: notes124 id: notes
113125
=== modified file 'src/app/qml/ui/RemindersPage.qml'
--- src/app/qml/ui/RemindersPage.qml 2014-05-08 16:30:57 +0000
+++ src/app/qml/ui/RemindersPage.qml 2014-06-24 00:09:21 +0000
@@ -30,28 +30,23 @@
3030
31 tools: ToolbarItems {31 tools: ToolbarItems {
32 ToolbarButton {32 ToolbarButton {
33 text: i18n.tr("Search")33 action: Action {
34 iconName: "search"34 text: i18n.tr("Search")
35 onTriggered: {35 iconName: "search"
36 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))36 onTriggered: {
37 }37 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
38 }38 }
3939 }
40 ToolbarSpacer { }40 }
4141
42 ToolbarButton {42 ToolbarButton {
43 text: i18n.tr("Accounts")43 action: Action {
44 iconName: "contacts-app-symbolic"44 text: i18n.tr("Accounts")
45 visible: accounts.count > 145 iconName: "contacts-app-symbolic"
46 onTriggered: {46 visible: accounts.count > 1
47 openAccountPage(true);47 onTriggered: {
48 }48 openAccountPage(true);
49 }49 }
50
51 ToolbarButton {
52 text: i18n.tr("Add reminder")
53 iconName: "add"
54 onTriggered: {
55 }50 }
56 }51 }
57 }52 }
5853
=== modified file 'src/app/qml/ui/SearchNotesPage.qml'
--- src/app/qml/ui/SearchNotesPage.qml 2014-05-20 09:07:44 +0000
+++ src/app/qml/ui/SearchNotesPage.qml 2014-06-24 00:09:21 +0000
@@ -27,17 +27,7 @@
2727
28 signal noteSelected(var note)28 signal noteSelected(var note)
2929
30 tools: ToolbarItems {30 title: i18n.tr('Search notes')
31 back: ToolbarButton {
32 iconName: 'back'
33 text: i18n.tr("Back")
34
35 onTriggered: {
36 pagestack.pop()
37 NotesStore.clearSearchResults();
38 }
39 }
40 }
4131
42 Column {32 Column {
43 anchors { fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(2) }33 anchors { fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(2) }
4434
=== modified file 'tests/autopilot/reminders/__init__.py'
--- tests/autopilot/reminders/__init__.py 2014-05-23 12:28:04 +0000
+++ tests/autopilot/reminders/__init__.py 2014-06-24 00:09:21 +0000
@@ -123,7 +123,8 @@
123123
124 """124 """
125 original_number_of_books = self._get_notebooks_listview().count125 original_number_of_books = self._get_notebooks_listview().count
126 self.main_view.open_toolbar().click_button('addNotebookButton')126 header = self.main_view.get_header()
127 header.click_action_button('addNotebookButton')
127 title_textfield = self.select_single(128 title_textfield = self.select_single(
128 ubuntuuitoolkit.TextField, objectName='newNoteTitleTextField')129 ubuntuuitoolkit.TextField, objectName='newNoteTitleTextField')
129 title_textfield.write(title)130 title_textfield.write(title)

Subscribers

People subscribed via source and target branches