Microsoft/calculator

Bring back insert-from-history

Open

#277 aperta il 12 mar 2019

Vedi su GitHub
 (5 commenti) (7 reazioni) (0 assegnatari)C++ (2422 fork)batch import
EnhancementPri: 2approvedhelp wanted

Metriche repository

Star
 (16.196 star)
Metriche merge PR
 (Merge medio 15h 43m) (7 PR mergiate in 30 g)

Descrizione

Problem Statement Easily insert result(s) from the history into an expression being composed, by simply clicking them.

Compared to typing out one single big expression using parenthesis, this proposal lets the user:

  • verify that results of sub-expressions look correct (in the history)
  • avoid duplication, for example in a ratio A / (A + B) , where A and B are the results of non-trivial expressions

Evidence or User Insights Currently it is awkward and error-prone to reuse a results from history, and impossible(?) to combine results. This is a regression from the Win32 calculator, and differs from other software calculators with history (e.g. Android).

To illustrate, people familiar with other apps are likely to first wipe what they've written by clicking the history item. Being familiar with physical calculators they might next try something like:

  1. Click history item
  2. M+
  3. Start retyping the wiped expression

Huh, step 3 partially modified the history expression, weird. So before step 3 we needed to press ESC, fine. Start over. Oh no! There was now a value in memory and M+ doubled it. Right I should have used MS (but then, I have never owned a physical calculator with a MS button.) OK then: click MC (did I need to do that?) Press ESC. Start over again...

Even once the confusion is resolved, the process still takes a minimum of 3 steps, using 3 UI elements (the history item, MS, MR) where a single click could suffice. And it only works for one value.

Note that some scenarios are possible via Ctrl+C, but:

  • to Ctrl+C something from history wipes what you've typed - you still cannot combine history items
  • the UWP look does not make it obvious that Copy & Paste is available

Proposal If an item is in the history (10*20 = 200) and a new expression is being typed...

  • ending in an operator (1 / ): clicking a history item should append the result (yielding: 1 / 200)
  • ending in an value (1 / 5): the final value should be replaced (1 / 200). This is for consistency with other buttons (like MR).

To overwrite the current expression, it should still be obvious and intuitive that you can click C or press ESC before clicking a history item - making both operations easily accessible.

Goals To make the history pane more useful, via easy reuse of prior results.

Non-Goals Inserting the entire expression from history into the current expression. (That would require a movable text cursor in the main expression editor, which is probably quite a UI departure.)

Low-Fidelity Concept Constructing a 3rd expression from 2 prior expressions (by clicking them) in the Windows 7 Calculator:

win7_calc

Related

  • Editing expressions in the history list: #163

Guida contributor