Conversation
Align NumberField with TextField by supporting startContent/endContent props for rendering additional elements inside the input field (e.g., unit labels like "dollars / credits"). This eliminates the need for absolute-positioning hacks like SpendThresholdInput in control-plane1 (BIL-4944). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
|
🦋 Changeset detectedLatest commit: 69d685a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @minodudd's task in 1m 19s —— View job PR ReviewGood work! The implementation cleanly mirrors the 🚨 Must Fix
🧪 Testing
💡 Suggestions (non-blocking)
Everything else looks great — the implementation is a faithful port of the |
There was a problem hiding this comment.
Pull request overview
Adds startContent and endContent support to NumberField to align its API with TextField, enabling prefix/suffix content (like currency/unit labels) and keeping the loading spinner within a consistent end-content container.
Changes:
- Added
startContent/endContentprops toNumberFieldand updated rendering to useInputStartContent/InputEndContent. - Updated
NumberInputElementusage to account for start/end content spacing and to merge forwarded refs. - Added Storybook stories demonstrating start and end content usage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/NumberField/NumberField.tsx | Implements startContent/endContent rendering and updates input layout/ref handling accordingly. |
| src/components/NumberField/NumberField.stories.tsx | Adds WithEndContent / WithStartContent stories for the new props. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix Text import to use barrel export (@/components/Text) - Add NumberField tests for startContent, endContent, click-to-focus, and loading spinner rendering Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Claude finished @minodudd's task in 52s —— View job PR ReviewGood implementation — cleanly mirrors the 🚨 Must Fix
💡 Suggestions (non-blocking)
Everything else looks great: |
|
Claude finished @minodudd's task in 51s —— View job PR ReviewGood work — this is a clean, faithful port of the 💡 Suggestions (non-blocking)
Everything else looks great: types are correct, |
|
Claude finished @minodudd's task in 49s —— View job PR ReviewGood work — clean, faithful port of the
What's in great shape:
💡 Suggestion (non-blocking)
Everything looks good to merge. 🙌 |
|
Claude finished @punkbit's task in 1m 30s —— View job PR Review
Good work — this is a solid implementation and the single-line fix for What's in great shape:
💡 Suggestion (non-blocking)
Everything else looks ready to merge. 🙌 |
📚 Storybook Preview Deployed✅ Preview URL: https://click-6he5l92bo-clickhouse.vercel.app Built from commit: |
|
Thank you! |

Summary
startContentandendContentprops toNumberField, matching the existingTextFieldAPIWithEndContentandWithStartContentstoriesResolves BIL-4944
Test plan
Playgroundstory still works as beforeWithEndContentstory renders "dollars / credits" label inside the fieldWithStartContentstory renders "$" prefix inside the fieldloadingspinner still renders correctly (now insideInputEndContent)startContentfocuses the input🤖 Generated with Claude Code