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

Usability improvements to the NumberInput component #1588

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Nikita-str
Copy link
Contributor

@Nikita-str Nikita-str commented Jan 27, 2024

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

Copy link

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

Nikita-str added a commit to Nikita-str/Graphite that referenced this pull request Jan 27, 2024
@Keavon Keavon changed the title NumberInput widget some improves Usability improvements to the NumberInput component Feb 5, 2024
@Keavon
Copy link
Member

Keavon commented Feb 19, 2024

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 pushed a commit to Nikita-str/Graphite that referenced this pull request Feb 19, 2024
Nikita-str and others added 9 commits February 19, 2024 00:31
REVIEW Q:
* if in `.svelte` `export let` then MUST I add in `.rs` `NumberInput` this field?
specifically: `export let defaultValue: number = 0;`
* also can there be any order of non-export fields in `.svelte` or it MUST stay after `export` fields?
TODO:
* `ctrl` / `shift` to diff paces
* undo on `Esc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants