Skip to content

feat(vue): OmegaForm number fields on Vuetify 4 v-number-input - #870

Merged
MakhBeth merged 4 commits into
mainfrom
omegaform-vnumber-input
Aug 21, 2026
Merged

feat(vue): OmegaForm number fields on Vuetify 4 v-number-input#870
MakhBeth merged 4 commits into
mainfrom
omegaform-vnumber-input

Conversation

@MakhBeth

@MakhBeth MakhBeth commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • OmegaForm number fields render Vuetify 4's first-class v-number-input (range keeps its own v-slider branch, behavior unchanged)
  • Precision is schema-driven: S.Int → precision 0 (no decimal separator), plain S.Number → free decimals; explicit :precision via attrs wins
  • Controls default to the stacked variant, overridable per field via attrs (as any other VNumberInput prop: step, control-variant, decimal-separator, ...)
  • Schema min/max are deliberately NOT passed as component props (the component silently withholds out-of-range values from the model and clamps on blur, so schema errors would never show); bounds are exposed to assistive tech via spinbutton ARIA attrs on the native input
  • S.isBetween failures are now localized via validation.number.min/max picking the violated side, and the pre-existing inverted isExclusive flags on the min/max messages are fixed
  • New NumberInput story covering all of the above
  • Includes the .nvmrc bump to v22.23

Test plan

  • Full vitest suite green (196 tests in vue-components, full workspace via ship-gate)
  • vue-tsc, eslint, dprint clean on touched files
  • Manually exercised in Storybook (min/max errors, decimals, comma separator, attrs overrides)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Vuetify 4 promotes VNumberInput to a first-class component; the OmegaForm
"number" type now renders it instead of v-text-field type="number"
("range" keeps its own v-slider branch, behavior unchanged).

Precision is schema-driven: S.Int fields get precision 0 (no decimal
separator), plain S.Number gets free decimals (precision null), and an
explicit :precision via attrs still wins. The int refinement already
detected in the field meta is now forwarded through inputProps.

Adds a NumberInput story covering min/max clamping, decimals, attrs
passthrough (step/control-variant) and a per-field decimal-separator.
Passing min/max as VNumberInput props makes the component withhold
out-of-range values from the model (schema errors never fire) and clamp
on blur. Drop the props and expose the bounds via spinbutton ARIA attrs
on the native input instead, matching what input type=number offered.

Also default number controls to the stacked variant (overridable per
field via attrs) and update the story accordingly.
S.isBetween checks fell through to Effect's default English formatter;
map them to validation.number.min/max based on which bound the value
violated. The existing min/max cases passed isExclusive inverted
(inclusive checks rendered as strict and vice versa); swap them and
document the catalog semantics.
@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/effect-app/libs/@effect-app/cli@870

effect-app

npm i https://pkg.pr.new/effect-app/libs/effect-app@870

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-codegen-model@870

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/effect-app/libs/@effect-app/eslint-shared-config@870

@effect-app/infra

npm i https://pkg.pr.new/effect-app/libs/@effect-app/infra@870

@effect-app/vue

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue@870

@effect-app/vue-components

npm i https://pkg.pr.new/effect-app/libs/@effect-app/vue-components@870

commit: bcb29fd

@MakhBeth
MakhBeth merged commit 07b9661 into main Aug 21, 2026
6 checks passed
@MakhBeth
MakhBeth deleted the omegaform-vnumber-input branch August 21, 2026 14:08
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.

1 participant