Skip to content

Conversation

@didoesdigital
Copy link
Owner

@didoesdigital didoesdigital commented Aug 25, 2025

This PR primarily replaces the react-numeric-input package because it uses outdated lifecycles that's no good for upgrading to React 18 and the package is unmaintained: Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

The approach taken in this PR is to remove the package and build the needed features directly into Typey Type.

There are some slight differences:

  • replaces <b> with <button> elements
  • adds ARIA labels like aria-label="Increment"
  • the numeric input now clamps values on blur
  • the numeric input no longer snaps to nearest step value
  • the numeric input no longer displays 1 as 1.0 in the Diagram size field (it now shows 1, 1.1, etc)
  • the numeric steppers no longer support click and hold to zip through numbers quickly
  • the stepper button icons are slightly bigger

This PR also bundles in some other changes:

  • extracting prompt-related functions for tests and renaming prompts.tests.ts
  • fixing up some scss
  • fixing some types

@didoesdigital didoesdigital merged commit 5757895 into master Aug 26, 2025
1 check passed
@didoesdigital didoesdigital deleted the replace-react-numeric-input branch August 26, 2025 04:56
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.

2 participants