Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Usability improvements to the NumberInput component

Open Nikita-str opened this issue 2 years ago • 2 comments

Part of #313 TODO: File an issue for these completed features

done (features from 7th to 14th inclusively from the issue):

  • Up/Down arrows inc/dec by 1, with Shift by 10, with Ctrl(if value isn't Integer) by 0.1
  • Holding mouse down on the arrow buttons change value multiple times
  • Ctrl+scroll on hover to inc/dec value
  • Hover mouse over then Ctrl+{C \ V \ /(value = 1/value) \ Backspace(revert to default) \ Enter \ - (change sign of value)}. MAYBE not all of them should use Ctrl

Unit conversion(6th feature) and cleaning up floating point imprecision(15th feature) need to be discussed before doing them

Nikita-str avatar Jan 27 '24 12:01 Nikita-str

📦 Build Complete for 5194b3fd76999bd67f728e099bb2e993f3e16c87
https://88d5a6d7.graphite.pages.dev

github-actions[bot] avatar Jan 27 '24 12:01 github-actions[bot]

Here's an incomplete set of notes from my QA testing and code review. I'm not done. But I'm leaving them here. If you'd to take any of these on, feel free, or you can wait till I'm done (and I might fix some of them myself).

  • Up/down while editing text: only do that if the text cursor is already at the left/right side
  • Swap Ctrl/Shift modifiers for 0.1x and 10x to match with dragging NumberInputs fields.
  • Ctrl+scroll over input, when text isn't being edited: update without entering and remaining in text editing mode
  • Paste on hover over box: missing history state (and does this use Accel so it's Cmd on Mac?)
  • We don't want Ctrl key modifier for Backspace, -, /, etc.

Keavon avatar Feb 19 '24 08:02 Keavon

Thanks for contributing the effort that went into this. Ultimately it required more rework to be compatible with the subsequent alterations and avoidance of regressions which I didn't quite have time for, and it's gotten out of sync with the current state of things. But I appreciate your eagerness to help!

Keavon avatar Jul 22 '24 10:07 Keavon