Skip to content

Conversation

@gdostie
Copy link
Collaborator

@gdostie gdostie commented Dec 23, 2025

Proposed Changes

This pull request refactors the NumberInput component integration and adds a new Storybook demo. The main changes focus on simplifying prop handling in the Figma connector, ensuring correct exports, and enhancing documentation and testing through Storybook.

Figma connector prop handling improvements:

  • Refactored packages/figma/src/NumberInput.figma.tsx to move labelProps out of wrapperProps, simplifying how label, description, and error props are managed and mapped. Also, renamed several boolean controls for clarity (e.g., Show LabelAsterisk, Show DescriptionDescription, etc.).
  • Updated usage in the Figma connector to directly reference labelProps for label and required props, reflecting the new structure.

Component export and Storybook integration:

  • Added explicit displayName to NumberInput and ensured correct export from packages/mantine/src/components/NumberInput/NumberInput.ts.
  • Introduced a comprehensive Storybook story for NumberInput in packages/storybook/src/form/NumberInput.stories.tsx, including controls for all major props, documentation, and a demo with an optional icon.

Potential Breaking Changes

Acceptance Criteria

  • The proposed changes are covered by unit tests
  • The potential breaking changes are clearly identified
  • README.md is adjusted to reflect the proposed changes (if relevant)

@github-actions
Copy link

@github-actions
Copy link

@gdostie gdostie marked this pull request as ready for review December 23, 2025 21:09
@gdostie gdostie requested a review from a team as a code owner December 23, 2025 21:09
@gdostie gdostie requested review from FelixBlaisThon and GermainBergeron and removed request for a team December 23, 2025 21:09
@gdostie gdostie force-pushed the DS-41-connect-TextInput branch 2 times, most recently from d62b4e9 to c5a3ce9 Compare December 30, 2025 15:57
@gdostie gdostie force-pushed the DS-41-connect-NumberInput branch from f740ebc to fb54cdd Compare December 30, 2025 16:02
Base automatically changed from DS-41-connect-TextInput to master January 5, 2026 20:14
@gdostie gdostie force-pushed the DS-41-connect-NumberInput branch from fb54cdd to b2681de Compare January 5, 2026 20:45
Copilot AI review requested due to automatic review settings January 5, 2026 20:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds comprehensive Storybook documentation for the NumberInput component and refactors the Figma connector to align with the prop handling patterns used by similar input components. The changes improve maintainability and provide better developer documentation.

Key Changes

  • Added a new Storybook story file with comprehensive controls for the NumberInput component, including numeric validation props (min/max, allowNegative, allowDecimal) and formatting options (prefix, suffix, separators)
  • Refactored the Figma connector to extract labelProps from wrapperProps, making it consistent with other input components like TextInput, Checkbox, Radio, and Switch

Reviewed changes

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

File Description
packages/storybook/src/form/NumberInput.stories.tsx New Storybook story with argTypes definitions and a demo showcasing NumberInput with optional icon support
packages/figma/src/NumberInput.figma.tsx Refactored prop structure to align with other input components, moving labelProps to top level for cleaner prop mapping

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gdostie gdostie merged commit 248daaf into master Jan 5, 2026
9 checks passed
@gdostie gdostie deleted the DS-41-connect-NumberInput branch January 5, 2026 20:53
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