Skip to content

Add NumberField component to @backstage/ui#34264

Merged
Naycon merged 5 commits into
masterfrom
number
May 27, 2026
Merged

Add NumberField component to @backstage/ui#34264
Naycon merged 5 commits into
masterfrom
number

Conversation

@jabrks

@jabrks jabrks commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Hey, I just made a Pull Request!

Introduces a designated NumberField to sit alongside the existing TextField component in Backstage UI

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Signed-off-by: James Brooks <jamesbrooks@spotify.com>
Copilot AI review requested due to automatic review settings May 15, 2026 12:03
@jabrks jabrks requested a review from a team as a code owner May 15, 2026 12:03
@backstage-goalie

backstage-goalie Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/ui packages/ui patch v0.15.0

@backstage-goalie backstage-goalie Bot added size:large Large pull requests receive a slightly lower priority for reviews. waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels May 15, 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 a new NumberField component to @backstage/ui, mirroring the existing TextField pattern but built on react-aria-components' NumberField for numeric input with min/max/step support, label, optional icon, and inline validation. The component is also wired into the docs site and the public API surface.

Changes:

  • New NumberField component (component, definition, types, CSS module, stories, barrel export) under packages/ui/src/components/NumberField.
  • Registers the component in packages/ui/src/index.ts, definitions.ts, and report.api.md.
  • Adds documentation page, prop definitions, and code snippets to docs-ui plus a changeset entry.

Reviewed changes

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

Show a summary per file
File Description
packages/ui/src/index.ts Exports the new NumberField module from the package barrel.
packages/ui/src/definitions.ts Re-exports NumberFieldDefinition for theming consumers.
packages/ui/src/components/NumberField/types.ts Defines NumberFieldOwnProps and NumberFieldProps.
packages/ui/src/components/NumberField/NumberField.tsx Implements the component using react-aria's NumberField.
packages/ui/src/components/NumberField/NumberField.stories.tsx Storybook stories covering sizes, validation, icons, etc.
packages/ui/src/components/NumberField/NumberField.module.css CSS module styling for sizes, icon, focus, invalid, disabled states.
packages/ui/src/components/NumberField/index.ts Barrel re-exports for the component.
packages/ui/src/components/NumberField/definition.ts Component definition wiring CSS classes, propDefs, and bg consumer.
packages/ui/report.api.md Updates the public API report with new exports.
docs-ui/src/utils/data.ts Adds NumberField to the docs navigation list.
docs-ui/src/app/components/number-field/snippets.ts Code snippets for docs examples.
docs-ui/src/app/components/number-field/props-definition.tsx Prop table definitions for the docs.
docs-ui/src/app/components/number-field/page.mdx MDX docs page for NumberField.
docs-ui/src/app/components/number-field/components.tsx React example components used by the docs page.
.changeset/tall-spies-invite.md Changeset describing the new component (patch bump).

Comment thread packages/ui/src/components/NumberField/types.ts Outdated
Comment thread packages/ui/src/components/NumberField/NumberField.tsx Outdated
Comment thread packages/ui/src/index.ts Outdated
Comment thread packages/ui/src/components/NumberField/NumberField.stories.tsx Outdated
@github-actions

github-actions Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

🎨 Visual Testing with Chromatic

jabrks added 2 commits May 15, 2026 13:27
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
Copilot AI review requested due to automatic review settings May 15, 2026 12:30

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

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

Signed-off-by: James Brooks <jamesbrooks@spotify.com>

@cdedreuille cdedreuille left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot @jabrks for pushing for this. On my side this this first version is ready to go.

Signed-off-by: James Brooks <jamesbrooks@spotify.com>
Copilot AI review requested due to automatic review settings May 26, 2026 18:21
@backstage-goalie backstage-goalie Bot added waiting-for:merge The PR has been approved and is awaiting merge. and removed waiting-for:review The PR needs a review and will be visible in the review queue unless already assigned an owner. labels May 26, 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Naycon Naycon merged commit b33bb24 into master May 27, 2026
31 of 32 checks passed
@Naycon Naycon deleted the number branch May 27, 2026 15:20
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.52.0 release, scheduled for Tue, 16 Jun 2026.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:large Large pull requests receive a slightly lower priority for reviews. waiting-for:merge The PR has been approved and is awaiting merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants