[Calculator][ux] Add paste support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Calculator App |
Fix Released
|
Medium
|
Unassigned | ||
Ubuntu UX |
In Progress
|
Medium
|
James Mulholland |
Bug Description
We should add paste support on both the phone and on the desktop.
The primary question is how invalid input should be handled. The first suggestion would be not to insert anything if there is any issue in the pasted text, while the second one seems more reasonable to me. In my opinion we should paste as much as possible and leave out the invalid parts (the user might not even know about spaces or other invalid characters in their string).
Either way, we might want some visual feedback when the clipboard content had some invalid parts.
--- --- --- ---
UX Comment:
I'm inclined to agree with Niklas' recommendation:
If we don't support entry of characters through the App itself (because, as in the previously described examples, they aren't supported by our engine or cause it problems) we should not create a situation where the user may input those character via copy & paste either intentionally or by mistake.
As such, filtering the user's input seems the optimal course (and allows us to avoid a raft of edge cases that do not result in anything other than error states).
Related branches
- Jenkins Bot: Approve (continuous-integration)
- Bartosz Kosiorek: Approve
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
-
Diff: 57 lines (+47/-0)1 file modifiedapp/ubuntu-calculator-app.qml (+47/-0)
- Bartosz Kosiorek: Approve
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Jenkins Bot: Approve (continuous-integration)
- Ubuntu Calculator Developers: Pending requested
-
Diff: 16 lines (+2/-2)1 file modifiedapp/ubuntu-calculator-app.qml (+2/-2)
Changed in ubuntu-calculator-app: | |
importance: | Undecided → Medium |
summary: |
- Add paste support + [Calculator][ux] Add paste support |
Changed in ubuntu-calculator-app: | |
status: | New → Incomplete |
Changed in ubuntu-ux: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → James Mulholland (jamesjosephmulholland) |
description: | updated |
Changed in ubuntu-ux: | |
status: | Triaged → Fix Committed |
summary: |
- [Calculator][ux] Add paste support + [Calculator] Add paste support |
Changed in ubuntu-calculator-app: | |
status: | Incomplete → Triaged |
status: | Triaged → In Progress |
Changed in ubuntu-calculator-app: | |
status: | Triaged → Incomplete |
Changed in ubuntu-calculator-app: | |
status: | Fix Committed → Fix Released |
Spaces is not invalid characters, and our Calculator's engine could handle it.
Our engine is very powerful, and we don't use half od its possibilities, eg matrix, units etc.
In my opinion changing pasted formula will be very frustrating for user, because user never will know what was removed from his formula.
My proposal is to paste everything, without modification, and then user could correct that.
I would like to avoid situation, when user receive wrong result, because we modified formula.