Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-select results when opening #157

Open
cassidyjames opened this issue Dec 21, 2020 · 4 comments
Open

Pre-select results when opening #157

cassidyjames opened this issue Dec 21, 2020 · 4 comments

Comments

@cassidyjames
Copy link
Contributor

cassidyjames commented Dec 21, 2020

Problem

If you open Calculator and start typing an expression to solve, you can accidentally keep the previous results as part of your expression (see: #156).

Proposal

We could pre-select the previous results. This way the state is still saved, but if you start typing, you overwrite them with your new input.

Prior Art


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@mcclurgm
Copy link

I think a more general solution here would be to clear the input when you start typing, unless you type an operation.

This issue could extend beyond just opening the app. Say I type 3*4 and get 12. Then I want to find 3*5, so I type that in the input. This produces 123*5, which is not what I intended. Most calculators automatically clear when you type new numbers, and I think we should support that. But so you can continue a calculation, we should keep the result if you type something that we interpret as *, /, +, or -.

Typically, apps don't highlight the results, so I don't think we should either. If we generalize this fix, it would make it much harder to read the result of a calculation, too, if it was always selected with a blue highlight.

@cassidyjames
Copy link
Contributor Author

@mcclurgm yeah that makes sense. I do want to address one part of your comment though,

it would make it much harder to read the result of a calculation, too, if it was always selected with a blue highlight.

The selected text style is much higher contrast these days, and still relatively easy to read; we ensure contrast compliance at the stylesheet level for highighted text.

Screenshot from 2020-12-21 12-13-40

That said, I agree that maybe something more intelligent would work; this just seemed like a very fast and easy solution that would get us most of the way there without any complex logic.

@batunii
Copy link

batunii commented Jan 11, 2021

How about displaying history of the calculation above, but in the same display. The calculation (6x9+6+9) will go up (as in scroll) and the result : 69 will come up. Then as soon as you start typing the previous result will also go up, and you will start afresh, but the result is just scrolled up, which you can access either just by scrolling up and clicking on the last result or by pressing up key. And by this the history button, instead of opening a new windows will just scroll up the main display.

@pablojimpas
Copy link
Contributor

How about displaying history of the calculation above, but in the same display. The calculation (6x9+6+9) will go up (as in scroll) and the result : 69 will come up. Then as soon as you start typing the previous result will also go up, and you will start afresh, but the result is just scrolled up, which you can access either just by scrolling up and clicking on the last result or by pressing up key. And by this the history button, instead of opening a new windows will just scroll up the main display.

I would like to try to implement something similar to this idea if everyone agrees, it is similar to what the GNOME calculator does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants