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
1=== modified file 'src/app/qml/reminders.qml'
2--- src/app/qml/reminders.qml 2014-05-16 08:53:45 +0000
3+++ src/app/qml/reminders.qml 2014-06-24 00:09:21 +0000
4@@ -39,6 +39,8 @@
5 // Note! applicationName needs to match the "name" field of the click manifest
6 applicationName: "com.ubuntu.reminders"
7
8+ useDeprecatedToolbar: false
9+
10 /*
11 This property enables the application to change orientation
12 when the device is rotated. The default is false.
13
14=== modified file 'src/app/qml/ui/NotePage.qml'
15--- src/app/qml/ui/NotePage.qml 2014-05-12 11:12:06 +0000
16+++ src/app/qml/ui/NotePage.qml 2014-06-24 00:09:21 +0000
17@@ -29,35 +29,40 @@
18 signal editNote(var note)
19
20 tools: ToolbarItems {
21- ToolbarButton {
22- text: i18n.tr("Delete")
23- iconName: "delete"
24- onTriggered: {
25- NotesStore.deleteNote(note.guid);
26- pagestack.pop();
27- }
28- }
29- ToolbarSpacer {}
30- ToolbarButton {
31- text: note.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
32- // TODO: use this instead when the toolkit switches from using the
33- // ubuntu-mobile-icons theme to suru:
34- //iconName: note.reminder ? "reminder" : "reminder-new"
35- iconSource: note.reminder ?
36- Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
37- Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
38- onTriggered: {
39- pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), {title: root.title, note: root.note});
40- }
41- }
42- ToolbarButton {
43- text: i18n.tr("Edit")
44- iconName: "edit"
45- onTriggered: {
46- root.editNote(root.note)
47- }
48- }
49- }
50+ ToolbarButton {
51+ action: Action {
52+ text: i18n.tr("Edit")
53+ iconName: "edit"
54+ onTriggered: {
55+ root.editNote(root.note)
56+ }
57+ }
58+ }
59+ ToolbarButton {
60+ action: Action {
61+ text: note.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
62+ // TODO: use this instead when the toolkit switches from using the
63+ // ubuntu-mobile-icons theme to suru:
64+ //iconName: note.reminder ? "reminder" : "reminder-new"
65+ iconSource: note.reminder ?
66+ Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
67+ Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
68+ onTriggered: {
69+ pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), {title: root.title, note: root.note});
70+ }
71+ }
72+ }
73+ ToolbarButton {
74+ action: Action {
75+ text: i18n.tr("Delete")
76+ iconName: "delete"
77+ onTriggered: {
78+ NotesStore.deleteNote(note.guid);
79+ pagestack.pop();
80+ }
81+ }
82+ }
83+ }
84
85 NoteView {
86 id: noteView
87
88=== modified file 'src/app/qml/ui/NotebooksPage.qml'
89--- src/app/qml/ui/NotebooksPage.qml 2014-05-14 17:50:23 +0000
90+++ src/app/qml/ui/NotebooksPage.qml 2014-06-24 00:09:21 +0000
91@@ -36,43 +36,48 @@
92
93 tools: ToolbarItems {
94 ToolbarButton {
95- text: i18n.tr("Search")
96- iconName: "search"
97- onTriggered: {
98- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
99- }
100- }
101-
102- ToolbarButton {
103- text: i18n.tr("Refresh")
104- iconName: "reload"
105- onTriggered: {
106- NotesStore.refreshNotebooks();
107- }
108- }
109-
110- ToolbarSpacer { }
111-
112- ToolbarButton {
113- text: i18n.tr("Accounts")
114- iconName: "contacts-app-symbolic"
115- visible: accounts.count > 1
116- onTriggered: {
117- openAccountPage(true);
118- }
119- }
120-
121- ToolbarButton {
122- objectName: "addNotebookButton"
123- text: i18n.tr("Add notebook")
124- iconName: "add"
125- onTriggered: {
126- contentColumn.newNotebook = true;
127+ action: Action {
128+ objectName: "addNotebookButton"
129+ text: i18n.tr("Add notebook")
130+ iconName: "add"
131+ onTriggered: {
132+ contentColumn.newNotebook = true;
133+ }
134+ }
135+ }
136+
137+ ToolbarButton {
138+ action: Action {
139+ text: i18n.tr("Search")
140+ iconName: "search"
141+ onTriggered: {
142+ pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
143+ }
144+ }
145+ }
146+
147+ ToolbarButton {
148+ action: Action {
149+ text: i18n.tr("Refresh")
150+ iconName: "reload"
151+ onTriggered: {
152+ NotesStore.refreshNotebooks();
153+ }
154+ }
155+ }
156+
157+ ToolbarButton {
158+ action: Action {
159+ text: i18n.tr("Accounts")
160+ iconName: "contacts-app-symbolic"
161+ visible: accounts.count > 1
162+ onTriggered: {
163+ openAccountPage(true);
164+ }
165 }
166 }
167 }
168
169-
170 Notebooks {
171 id: notebooks
172 }
173@@ -148,7 +153,7 @@
174 visible: !notebooks.loading && notebooks.error
175 text: notebooks.error
176 }
177-
178+
179 }
180
181 Item {
182
183=== modified file 'src/app/qml/ui/NotesPage.qml'
184--- src/app/qml/ui/NotesPage.qml 2014-05-14 10:31:49 +0000
185+++ src/app/qml/ui/NotesPage.qml 2014-06-24 00:09:21 +0000
186@@ -41,72 +41,84 @@
187
188 tools: ToolbarItems {
189 ToolbarButton {
190- text: i18n.tr("Search")
191- iconName: "search"
192- onTriggered: {
193- root.openSearch();
194- }
195- }
196-
197- ToolbarButton {
198- text: i18n.tr("Refresh")
199- iconName: "reload"
200- onTriggered: {
201- NotesStore.refreshNotes();
202- }
203- }
204-
205- ToolbarButton {
206- text: i18n.tr("Accounts")
207- iconName: "contacts-app-symbolic"
208- visible: accounts.count > 1
209- onTriggered: {
210- openAccountPage(true);
211- }
212- }
213-
214- ToolbarSpacer { }
215-
216- ToolbarButton {
217- text: i18n.tr("Delete")
218- iconName: "delete"
219- visible: root.selectedNote !== null
220- onTriggered: {
221- NotesStore.deleteNote(root.selectedNote.guid);
222- }
223- }
224- ToolbarButton {
225- text: root.selectedNote.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
226- // TODO: use this instead when the toolkit switches from using the
227- // ubuntu-mobile-icons theme to suru:
228- //iconName: root.selectedNote.reminder ? "reminder" : "reminder-new"
229- iconSource: root.selectedNote.reminder ?
230- Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
231- Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
232- visible: root.selectedNote !== null
233- onTriggered: {
234- root.selectedNote.reminder = !root.selectedNote.reminder
235- NotesStore.saveNote(root.selectedNote.guid)
236- }
237- }
238- ToolbarButton {
239- text: i18n.tr("Edit")
240- iconName: "edit"
241- visible: root.selectedNote !== null
242- onTriggered: {
243- print("should edit note")
244- root.editNote(root.selectedNote)
245- }
246- }
247-
248- ToolbarButton {
249- text: i18n.tr("Add note")
250- iconName: "add"
251- onTriggered: {
252- NotesStore.createNote("Untitled");
253- }
254- }
255- }
256+ action: Action {
257+ text: i18n.tr("Add note")
258+ iconName: "add"
259+ onTriggered: {
260+ NotesStore.createNote("Untitled");
261+ }
262+ }
263+ }
264+
265+ ToolbarButton {
266+ action: Action {
267+ text: i18n.tr("Search")
268+ iconName: "search"
269+ onTriggered: {
270+ root.openSearch();
271+ }
272+ }
273+ }
274+
275+ ToolbarButton {
276+ action: Action {
277+ text: i18n.tr("Refresh")
278+ iconName: "reload"
279+ onTriggered: {
280+ NotesStore.refreshNotes();
281+ }
282+ }
283+ }
284+
285+ ToolbarButton {
286+ action: Action {
287+ text: i18n.tr("Accounts")
288+ iconName: "contacts-app-symbolic"
289+ visible: accounts.count > 1
290+ onTriggered: {
291+ openAccountPage(true);
292+ }
293+ }
294+ }
295+
296+ ToolbarButton {
297+ action: Action {
298+ text: i18n.tr("Delete")
299+ iconName: "delete"
300+ visible: root.selectedNote !== null
301+ onTriggered: {
302+ NotesStore.deleteNote(root.selectedNote.guid);
303+ }
304+ }
305+ }
306+ ToolbarButton {
307+ action: Action {
308+ text: root.selectedNote.reminder ? i18n.tr("Edit reminder") : i18n.tr("Set reminder")
309+ // TODO: use this instead when the toolkit switches from using the
310+ // ubuntu-mobile-icons theme to suru:
311+ //iconName: root.selectedNote.reminder ? "reminder" : "reminder-new"
312+ iconSource: root.selectedNote.reminder ?
313+ Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder.svg") :
314+ Qt.resolvedUrl("/usr/share/icons/suru/actions/scalable/reminder-new.svg")
315+ visible: root.selectedNote !== null
316+ onTriggered: {
317+ root.selectedNote.reminder = !root.selectedNote.reminder
318+ NotesStore.saveNote(root.selectedNote.guid)
319+ }
320+ }
321+ }
322+ ToolbarButton {
323+ action: Action {
324+ text: i18n.tr("Edit")
325+ iconName: "edit"
326+ visible: root.selectedNote !== null
327+ onTriggered: {
328+ print("should edit note")
329+ root.editNote(root.selectedNote)
330+ }
331+ }
332+ }
333+ }
334
335 Notes {
336 id: notes
337
338=== modified file 'src/app/qml/ui/RemindersPage.qml'
339--- src/app/qml/ui/RemindersPage.qml 2014-05-08 16:30:57 +0000
340+++ src/app/qml/ui/RemindersPage.qml 2014-06-24 00:09:21 +0000
341@@ -30,28 +30,23 @@
342
343 tools: ToolbarItems {
344 ToolbarButton {
345- text: i18n.tr("Search")
346- iconName: "search"
347- onTriggered: {
348- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
349- }
350- }
351-
352- ToolbarSpacer { }
353-
354- ToolbarButton {
355- text: i18n.tr("Accounts")
356- iconName: "contacts-app-symbolic"
357- visible: accounts.count > 1
358- onTriggered: {
359- openAccountPage(true);
360- }
361- }
362-
363- ToolbarButton {
364- text: i18n.tr("Add reminder")
365- iconName: "add"
366- onTriggered: {
367+ action: Action {
368+ text: i18n.tr("Search")
369+ iconName: "search"
370+ onTriggered: {
371+ pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
372+ }
373+ }
374+ }
375+
376+ ToolbarButton {
377+ action: Action {
378+ text: i18n.tr("Accounts")
379+ iconName: "contacts-app-symbolic"
380+ visible: accounts.count > 1
381+ onTriggered: {
382+ openAccountPage(true);
383+ }
384 }
385 }
386 }
387
388=== modified file 'src/app/qml/ui/SearchNotesPage.qml'
389--- src/app/qml/ui/SearchNotesPage.qml 2014-05-20 09:07:44 +0000
390+++ src/app/qml/ui/SearchNotesPage.qml 2014-06-24 00:09:21 +0000
391@@ -27,17 +27,7 @@
392
393 signal noteSelected(var note)
394
395- tools: ToolbarItems {
396- back: ToolbarButton {
397- iconName: 'back'
398- text: i18n.tr("Back")
399-
400- onTriggered: {
401- pagestack.pop()
402- NotesStore.clearSearchResults();
403- }
404- }
405- }
406+ title: i18n.tr('Search notes')
407
408 Column {
409 anchors { fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(2) }
410
411=== modified file 'tests/autopilot/reminders/__init__.py'
412--- tests/autopilot/reminders/__init__.py 2014-05-23 12:28:04 +0000
413+++ tests/autopilot/reminders/__init__.py 2014-06-24 00:09:21 +0000
414@@ -123,7 +123,8 @@
415
416 """
417 original_number_of_books = self._get_notebooks_listview().count
418- self.main_view.open_toolbar().click_button('addNotebookButton')
419+ header = self.main_view.get_header()
420+ header.click_action_button('addNotebookButton')
421 title_textfield = self.select_single(
422 ubuntuuitoolkit.TextField, objectName='newNoteTitleTextField')
423 title_textfield.write(title)

Subscribers

People subscribed via source and target branches