Merge lp:~mzanetti/reminders-app/cleanup-toolbars into lp:reminders-app

Proposed by Michael Zanetti
Status: Merged
Approved by: Riccardo Padovani
Approved revision: 360
Merged at revision: 366
Proposed branch: lp:~mzanetti/reminders-app/cleanup-toolbars
Merge into: lp:reminders-app
Diff against target: 176 lines (+17/-73)
6 files modified
src/app/qml/reminders.qml (+13/-1)
src/app/qml/ui/AccountSelectorPage.qml (+1/-5)
src/app/qml/ui/NotebooksPage.qml (+0/-21)
src/app/qml/ui/NotesPage.qml (+3/-13)
src/app/qml/ui/RemindersPage.qml (+0/-11)
src/app/qml/ui/TagsPage.qml (+0/-22)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/cleanup-toolbars
Reviewer Review Type Date Requested Status
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+251347@code.launchpad.net

Commit message

cleanup and align toolbars.

Search is now always in the same place on every page.
Accounts is moved to be a separate tab

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: Approve (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Why did you keep the accounts action button in the notebooks page (and related code)?

review: Needs Fixing
359. By Michael Zanetti

drop all account buttons

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Why did you keep the accounts action button in the notebooks page (and related
> code)?

Good catch! Because the Actions in RemindersPage and NotebooksPage were invisible, I missed them. Thanks.

I still would keep the openAccountsPage() in reminders.qml because when there is no account set up, I want to push the AccountsPage to the stack, so the user can't switch to the other tabs.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

> I still would keep the openAccountsPage() in reminders.qml because when there
> is no account set up, I want to push the AccountsPage to the stack, so the
> user can't switch to the other tabs.

Makes sense, but then you can drop the showBackButton property. If the AccountsPage is used only when there isn't any account set up, then the backButton is always hide (and you can simply hide it, and simplify the code about the backButton in the AccountPage).

review: Needs Fixing
360. By Michael Zanetti

drop some old code

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> > I still would keep the openAccountsPage() in reminders.qml because when
> there
> > is no account set up, I want to push the AccountsPage to the stack, so the
> > user can't switch to the other tabs.
>
> Makes sense, but then you can drop the showBackButton property. If the
> AccountsPage is used only when there isn't any account set up, then the
> backButton is always hide (and you can simply hide it, and simplify the code
> about the backButton in the AccountPage).

Thanks! fixed.

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Now looks perfect, thanks :-)

review: Approve

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 2015-03-01 17:30:43 +0000
3+++ src/app/qml/reminders.qml 2015-03-01 22:11:53 +0000
4@@ -104,7 +104,7 @@
5 accountPage.destroy(100)
6 }
7 var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));
8- accountPage = component.createObject(root, { accounts: accounts, isChangingAccount: isChangingAccount, unauthorizedAccounts: unauthorizedAccounts });
9+ accountPage = component.createObject(root, { accounts: accounts, unauthorizedAccounts: unauthorizedAccounts });
10 accountPage.accountSelected.connect(function(username, handle) { accountService.startAuthentication(username, handle); pagestack.pop(); root.accountPage = null });
11 pagestack.push(accountPage);
12 }
13@@ -542,6 +542,18 @@
14 onOpenSearch: root.openSearch();
15 }
16 }
17+ Tab {
18+ title: i18n.tr("Accounts")
19+
20+ page: AccountSelectorPage {
21+ accounts: accounts
22+ unauthorizedAccounts: true
23+ onAccountSelected: {
24+ accountService.startAuthentication(username, handle)
25+ rootTabs.selectedTabIndex = 0;
26+ }
27+ }
28+ }
29 }
30 }
31
32
33=== modified file 'src/app/qml/ui/AccountSelectorPage.qml'
34--- src/app/qml/ui/AccountSelectorPage.qml 2014-12-09 22:43:00 +0000
35+++ src/app/qml/ui/AccountSelectorPage.qml 2015-03-01 22:11:53 +0000
36@@ -29,7 +29,6 @@
37 title: i18n.tr("Select account")
38
39 property alias accounts: optionSelector.model
40- property bool isChangingAccount
41 property bool unauthorizedAccounts
42
43 signal accountSelected(string username, var handle)
44@@ -100,9 +99,6 @@
45 }
46
47 head.backAction: Action {
48- visible: isChangingAccount
49- iconName: "back"
50- text: i18n.tr("Back")
51- onTriggered: { pagestack.pop(); }
52+ visible: false
53 }
54 }
55
56=== modified file 'src/app/qml/ui/NotebooksPage.qml'
57--- src/app/qml/ui/NotebooksPage.qml 2015-02-28 01:43:49 +0000
58+++ src/app/qml/ui/NotebooksPage.qml 2015-03-01 22:11:53 +0000
59@@ -58,27 +58,6 @@
60 }
61 }
62 }
63-
64- ToolbarButton {
65- action: Action {
66- text: i18n.tr("Refresh")
67- iconName: "reload"
68- onTriggered: {
69- NotesStore.refreshNotebooks();
70- }
71- }
72- }
73-
74- ToolbarButton {
75- action: Action {
76- text: i18n.tr("Accounts")
77- iconName: "contacts-app-symbolic"
78- visible: allAccounts.count > 1
79- onTriggered: {
80- openAccountPage(true);
81- }
82- }
83- }
84 }
85
86 Notebooks {
87
88=== modified file 'src/app/qml/ui/NotesPage.qml'
89--- src/app/qml/ui/NotesPage.qml 2015-03-01 17:15:48 +0000
90+++ src/app/qml/ui/NotesPage.qml 2015-03-01 22:11:53 +0000
91@@ -71,16 +71,6 @@
92
93 ToolbarButton {
94 action: Action {
95- text: i18n.tr("Search")
96- iconName: "search"
97- onTriggered: {
98- root.openSearch();
99- }
100- }
101- }
102-
103- ToolbarButton {
104- action: Action {
105 iconSource: "../images/sorting.svg"
106 text: i18n.tr("Sorting")
107 onTriggered: {
108@@ -97,10 +87,10 @@
109
110 ToolbarButton {
111 action: Action {
112- text: i18n.tr("Accounts")
113- iconName: "contacts-app-symbolic"
114+ text: i18n.tr("Search")
115+ iconName: "search"
116 onTriggered: {
117- openAccountPage(true);
118+ root.openSearch();
119 }
120 }
121 }
122
123=== modified file 'src/app/qml/ui/RemindersPage.qml'
124--- src/app/qml/ui/RemindersPage.qml 2015-03-01 17:30:43 +0000
125+++ src/app/qml/ui/RemindersPage.qml 2015-03-01 22:11:53 +0000
126@@ -40,17 +40,6 @@
127 }
128 }
129 }
130-
131- ToolbarButton {
132- action: Action {
133- text: i18n.tr("Accounts")
134- iconName: "contacts-app-symbolic"
135- visible: allAccounts.count > 1
136- onTriggered: {
137- openAccountPage(true);
138- }
139- }
140- }
141 }
142
143 Notes {
144
145=== modified file 'src/app/qml/ui/TagsPage.qml'
146--- src/app/qml/ui/TagsPage.qml 2015-03-01 17:30:43 +0000
147+++ src/app/qml/ui/TagsPage.qml 2015-03-01 22:11:53 +0000
148@@ -55,28 +55,6 @@
149 }
150 }
151 }
152-
153- ToolbarButton {
154- action: Action {
155- text: i18n.tr("Refresh")
156- iconName: "reload"
157- onTriggered: {
158- NotesStore.refreshNotes();
159- tags.refresh();
160- }
161- }
162- }
163-
164- ToolbarButton {
165- action: Action {
166- text: i18n.tr("Accounts")
167- iconName: "contacts-app-symbolic"
168- visible: accounts.count > 1
169- onTriggered: {
170- openAccountPage(true);
171- }
172- }
173- }
174 }
175
176 Tags {

Subscribers

People subscribed via source and target branches