Merge lp:~gcollura/ubuntu-calculator-app/swipe-copy-button-improvements into lp:ubuntu-calculator-app

Proposed by Giulio Collura
Status: Merged
Approved by: Bartosz Kosiorek
Approved revision: 77
Merged at revision: 75
Proposed branch: lp:~gcollura/ubuntu-calculator-app/swipe-copy-button-improvements
Merge into: lp:ubuntu-calculator-app
Diff against target: 87 lines (+29/-8)
2 files modified
app/ubuntu-calculator-app.qml (+22/-7)
app/ui/KeyboardButton.qml (+7/-1)
To merge this branch: bzr merge lp:~gcollura/ubuntu-calculator-app/swipe-copy-button-improvements
Reviewer Review Type Date Requested Status
Bartosz Kosiorek Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Riccardo Padovani Approve
Review via email: mp+247357@code.launchpad.net

Commit message

Add swipe to copy feature on single calculation. Add pressed button effect and fix button height on landscape mode.

Description of the change

Various improvements. I've decided to put all of them in the same MP to save time :)
What I've done:
* Added swipe to copy on single calculation as Riccardo requested
* Added a small effect when a button gets pressed
* (REMOVED) Fix button height in landscape mode (see http://i.imgur.com/XyE1Ide.png)
Tell me what you think and if you see anything wrong.
Thank you!

Giulio

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

On krillin it doesn't *quite* fit on screen.

http://popey.mooo.com/screenshots/device-2015-01-22-222330.png

I'm not sure if we should have the date fully off screen or on. My gut reaction is that the calculation and keys are the most important things, and you can pull down for the date. But I think this needs design input.

76. By Giulio Collura

make buttonRatio proportional to scrollableView ratio

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
Bartosz Kosiorek (gang65) wrote :

Nice work!

I like copy feature, and animation are really pretty.

I have one remark regarding copy feature: It is possible to select many calculations to copy, but I could copy only one.
Why we added confirm button to copy?
I think "copy" is not so dangerous as "delete". We could just swipe to add to clipboard (without confirmation)
Maybe it will be better to instanly copy whole selected calculation?

review: Needs Information
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

I tested dynamic changing ratio of the buttons, and it is confusing for me.
I think we should keep fix ratio buttons, and find some different solution.

What do you think about adding one more column for horizontal mode?

Could you please split copy and keypad fix to two MR?

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

> Nice work!
>
> I like copy feature, and animation are really pretty.
>
> I have one remark regarding copy feature: It is possible to select many
> calculations to copy, but I could copy only one.
> Why we added confirm button to copy?
> I think "copy" is not so dangerous as "delete". We could just swipe to add to
> clipboard (without confirmation)
> Maybe it will be better to instanly copy whole selected calculation?

This is how the swype from right to left is supposed to work, because you can have plus than one option on the right. So the first swipe is to evidence all options, and the second one to select the option

Thanks for your branch Giulio, I approve it, but address Bartosz comment, he will topapprove this when he think is ready :-)

review: Approve
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

This looks great! I like the swipe copy feature!

77. By Giulio Collura

remove change of button sizes in this mp

Revision history for this message
Giulio Collura (gcollura) wrote :

I'm moving the code to fix button height to another MP, since changing the ratio isn't the solution.

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
Bartosz Kosiorek (gang65) wrote :

Thanks Giulio.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/ubuntu-calculator-app.qml'
--- app/ubuntu-calculator-app.qml 2015-01-22 17:37:01 +0000
+++ app/ubuntu-calculator-app.qml 2015-01-23 13:33:15 +0000
@@ -221,6 +221,7 @@
221 visible: true221 visible: true
222 useDeprecatedToolbar: false222 useDeprecatedToolbar: false
223 property color dividerColor: "#babbbc"223 property color dividerColor: "#babbbc"
224 property color panelColor: "white"
224 config: PageHeadConfiguration {225 config: PageHeadConfiguration {
225 backAction: Action {226 backAction: Action {
226 objectName: "cancelSelectionAction"227 objectName: "cancelSelectionAction"
@@ -230,13 +231,6 @@
230 }231 }
231 actions: [232 actions: [
232 Action {233 Action {
233 id: copySelectedAction
234 objectName: "copySelectedAction"
235 iconName: "edit-copy"
236 text: i18n.tr("Copy")
237 onTriggered: copySelectedCalculations()
238 },
239 Action {
240 id: selectAllAction234 id: selectAllAction
241 objectName: "selectAllAction"235 objectName: "selectAllAction"
242 iconName: "select"236 iconName: "select"
@@ -244,6 +238,13 @@
244 onTriggered: visualModel.selectAll()238 onTriggered: visualModel.selectAll()
245 },239 },
246 Action {240 Action {
241 id: copySelectedAction
242 objectName: "copySelectedAction"
243 iconName: "edit-copy"
244 text: i18n.tr("Copy")
245 onTriggered: copySelectedCalculations()
246 },
247 Action {
247 id: multiDeleteAction248 id: multiDeleteAction
248 objectName: "multiDeleteAction"249 objectName: "multiDeleteAction"
249 iconName: "delete"250 iconName: "delete"
@@ -300,9 +301,23 @@
300 visualModel.selectItem(visualDelegate);301 visualModel.selectItem(visualDelegate);
301 }302 }
302303
304 rightSideActions: [ screenDelegateCopyAction.item ]
303 leftSideAction: screenDelegateDeleteAction.item305 leftSideAction: screenDelegateDeleteAction.item
304306
305 Loader {307 Loader {
308 id: screenDelegateCopyAction
309 sourceComponent: Action {
310 iconName: "edit-copy"
311 text: i18n.tr("Copy")
312 onTriggered: {
313 var mimeData = Clipboard.newData();
314 mimeData.text = model.formula + "=" + model.result;
315 Clipboard.push(mimeData);
316 }
317 }
318 }
319
320 Loader {
306 id: screenDelegateDeleteAction321 id: screenDelegateDeleteAction
307 sourceComponent: Action {322 sourceComponent: Action {
308 iconName: "delete"323 iconName: "delete"
309324
=== modified file 'app/ui/KeyboardButton.qml'
--- app/ui/KeyboardButton.qml 2015-01-06 19:52:00 +0000
+++ app/ui/KeyboardButton.qml 2015-01-23 13:33:15 +0000
@@ -44,13 +44,19 @@
44 border.color: "#bdbec0"44 border.color: "#bdbec0"
45 border.width: units.dp(2)45 border.width: units.dp(2)
46 color: buttonMA.pressed || buttonRect.kbdPressed ? pressedColor : buttonColor46 color: buttonMA.pressed || buttonRect.kbdPressed ? pressedColor : buttonColor
47
48 Behavior on color {
49 ColorAnimation {
50 duration: UbuntuAnimation.SnapDuration
51 }
52 }
47 }53 }
4854
49 Text {55 Text {
50 id: buttonText56 id: buttonText
51 anchors.centerIn: parent57 anchors.centerIn: parent
52 color: "#5a5a5c"58 color: "#5a5a5c"
53 font.pixelSize: 0.5 * parent.height 59 font.pixelSize: 0.5 * parent.height
54 font.bold: true60 font.bold: true
55 }61 }
5662

Subscribers

People subscribed via source and target branches