]> git.wincent.com - hextrapolate.git/commit
feat: special-case base 16 size calculations
authorGreg Hurrell <greg@hurrell.net>
Sun, 10 Jul 2022 20:35:10 +0000 (22:35 +0200)
committerGreg Hurrell <greg@hurrell.net>
Sun, 10 Jul 2022 20:35:10 +0000 (22:35 +0200)
commit933b344ba1012a9378a27335eb71420bbf71e457
tree3c7faec928deaaa4cadf0e36d28de34079b5529e
parentb26ecfc23ec18f94de0f45a16fd15784e912ef3a
feat: special-case base 16 size calculations

Slight refinement to what I did back in e4f88cd.

When typing in any input field, `value.base` will reflect the base of
that field. For almost all bases, the behavior implemented in e4f88cd is
what you want.

But when you're typing in the hex field people are much more accustomed
to thinking in "nibbes" (ie. half-bytes). You don't want to type "1" and
see it be a 1-bit number; you want it to jump straight to 4 bits.

Or maybe not. I'm 50:50 on this and will probably revert it back, while
keeping the component functional.

Bonus: converted to functional component.
src/Size.react.js