Skip to content

chore: revert hiding of number field stepper buttons#9568

Merged
eliotlim merged 1 commit into
developfrom
chore/revert-number-field-buttons-removal
Jun 9, 2026
Merged

chore: revert hiding of number field stepper buttons#9568
eliotlim merged 1 commit into
developfrom
chore/revert-number-field-buttons-removal

Conversation

@scottheng96

Copy link
Copy Markdown
Contributor

Problem

A previous change removed the stepper (increment/decrement) buttons from the Number field by setting showSteppers={false}. This change should be reverted — the stepper buttons provide useful UX for number inputs and should remain visible.

Solution

Reverts the showSteppers={false} prop on the NumberInput component in NumberField.tsx, restoring the default stepper button behaviour. The corresponding test that asserted the buttons were hidden has also been removed.

Breaking Changes

  • No — this PR is backwards compatible. It restores prior behaviour and has no impact on form data or submissions.

Before & After Screenshots

Item BEFORE AFTER
Number field stepper buttons

Tests

TC1: Stepper buttons visible on Number field

  • Open a form with a Number field in the form filler view
  • Verify that the increment and decrement stepper buttons are rendered on the Number input
  • Verify that clicking the stepper buttons increments/decrements the value correctly

@scottheng96 scottheng96 marked this pull request as ready for review June 9, 2026 02:48
@scottheng96 scottheng96 requested a review from a team as a code owner June 9, 2026 02:48
Copilot AI review requested due to automatic review settings June 9, 2026 02:48

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

Reverts a prior frontend UX change that hid the increment/decrement steppers on the public Number field input, restoring the default stepper controls on NumberInput for number fields.

Changes:

  • Removes showSteppers={false} from the Number field template so steppers are shown again.
  • Deletes the unit test that asserted the steppers were not rendered.

Reviewed changes

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

File Description
apps/frontend/src/templates/Field/Number/NumberField.tsx Restores default NumberInput stepper rendering by removing showSteppers={false}.
apps/frontend/src/templates/Field/Number/NumberField.test.tsx Removes the stepper-hidden assertion test.

Comment on lines 36 to 38
<NumberInput
showSteppers={false}
min={0}
inputMode="numeric"
Comment on lines 15 to 16
describe('validation required', () => {
it('does not render stepper buttons', () => {
render(<ValidationRequired />)
expect(
screen.queryByRole('button', { name: /increment/i, hidden: true }),
).toBeNull()
expect(
screen.queryByRole('button', { name: /decrement/i, hidden: true }),
).toBeNull()
})

it('renders error when field is not filled before submitting', async () => {
@eliotlim eliotlim merged commit d169844 into develop Jun 9, 2026
44 checks passed
@eliotlim eliotlim deleted the chore/revert-number-field-buttons-removal branch June 9, 2026 03:21
@eliotlim eliotlim mentioned this pull request Jun 9, 2026
10 tasks
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.

3 participants