LeaVerou / LeaVerou/incrementable
Don’t use a fixed increment, use current precision
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 85
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Currently, incrementing a number like 0.123456 will produce 1.123456 which is rarely useful. There are modifiers for getting 1/10th of the increment, but that is little help with these cases.
Ideally, you'd want to use the actual precision of the number, meaning 0.5678 would be incremented like (assuming we just keep hitting the up arrow):
0.5678, 0.5679,
0.568, 0.569,
0.57, 0.58, 0.59,
0.6, 0.7, 0.8, 0.9,
1
2
3
...
The step would still be capped to 1, i.e. incrementing 100000000 would still produce 100000001.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the increment logic for textfield values and reproduce the reported sequence from 0.5678. Done means the step follows the current number's precision, continues through the shown values, and remains capped at 1 for large numbers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100