smogon / damage-calc

Pokemon games damage calculator
https://calc.pokemonshowdown.com
MIT License
369 stars 345 forks source link

"inputmode=decimal" for the numeric input text boxes #599

Closed shrianshChari closed 4 months ago

shrianshChari commented 5 months ago

This is a change made mostly for mobile users - it will have the decimal keyboard active when inputting the level, base stats, IVs, DVs, EVs (I'm pretty sure this was already the case), and the base power of moves.

It's not a true fix for how annoying it can be to calc on mobile (I'm convinced a redesign or rework would be necessary for that to work), but it's a small accessibility fix that I think would be very useful.

monsanto commented 5 months ago

my first thought is why you aren't using numeric instead of decimal, your commit message says it works better on ios but there is no elaboration or comment in the file itself

shrianshChari commented 5 months ago

I had a link that would display how the virtual keyboard would look in my initial message, but essentially, on iOS, decimal will only pull up numbers on the virtual keyboard, whereas numeric would make it so that it makes the number keys very small and less useful.

From CSS-Tricks, this is what the numeric keyboard looks like on Android/iOS:

image

And this is what the decimal keyboard looks like:

image

When I get the chance, I'll add a comment in the file about decimal vs numeric.

thejetou commented 4 months ago

Thanks!