Skip to content

impr: native support for number/boolean in InputField (@fehmer)#8197

Open
fehmer wants to merge 8 commits into
masterfrom
feature/inputField-numbers
Open

impr: native support for number/boolean in InputField (@fehmer)#8197
fehmer wants to merge 8 commits into
masterfrom
feature/inputField-numbers

Conversation

@fehmer

@fehmer fehmer commented Jul 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Jul 5, 2026
@fehmer fehmer added the force-ci Force CI to run on draft PRs label Jul 5, 2026
@Miodec Miodec requested a review from Copilot July 5, 2026 12:46
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jul 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds typed/natively-parsed numeric/boolean handling to the shared InputField, then simplifies several settings/modals to stop manually parseFloat/parseInt and to rely on schema validation + numeric field values.

Changes:

  • Tighten InputField type prop + add value conversion to support non-string field values.
  • Update settings/custom-settings to submit numeric values directly and reuse fromSchema(...) number validators.
  • Update modals (custom word amount, custom generator) to store numeric form values; extend InputField unit tests for numbers.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/ts/components/ui/form/InputField.tsx Typed type union; converts field values to/from string; updates input binding
frontend/src/ts/components/pages/settings/SettingsPage.tsx AutoSetting number submit/validation now uses numeric values + fromSchema
frontend/src/ts/components/pages/settings/custom-setting/PaceCaret.tsx Removes float parsing; schema validator directly on numeric value
frontend/src/ts/components/pages/settings/custom-setting/MinSpeed.tsx Removes float parsing; schema validator directly on numeric value
frontend/src/ts/components/pages/settings/custom-setting/MinBurst.tsx Removes float parsing; schema validator directly on numeric value
frontend/src/ts/components/pages/settings/custom-setting/MinAcc.tsx Removes float parsing; schema validator directly on numeric value
frontend/src/ts/components/pages/settings/custom-setting/MaxLineWidth.tsx Removes float parsing; schema validator directly on numeric value
frontend/src/ts/components/modals/CustomWordAmountModal.tsx Form value is now numeric; validator uses zod schema via fromSchema
frontend/src/ts/components/modals/CustomGeneratorModal.tsx DefaultValues + submit handling now treats lengths/count as numbers
frontend/tests/components/ui/form/InputField.spec.tsx Field helper updated for non-string defaults; adds number input test

Comment thread frontend/src/ts/components/ui/form/InputField.tsx Outdated
Comment thread frontend/src/ts/components/ui/form/InputField.tsx
Comment thread frontend/src/ts/components/ui/form/InputField.tsx
Comment thread frontend/__tests__/components/ui/form/InputField.spec.tsx
@fehmer fehmer marked this pull request as ready for review July 7, 2026 10:35
@fehmer fehmer marked this pull request as draft July 7, 2026 10:45
@fehmer fehmer removed the force-ci Force CI to run on draft PRs label Jul 7, 2026
@fehmer fehmer marked this pull request as ready for review July 7, 2026 10:45
@github-actions github-actions Bot added waiting for review Pull requests that require a review before continuing and removed waiting for review Pull requests that require a review before continuing labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants