Skip to content

Fiddle: update to latest ui-react#14

Merged
krishan711 merged 2 commits into
mainfrom
ups
Dec 4, 2025
Merged

Fiddle: update to latest ui-react#14
krishan711 merged 2 commits into
mainfrom
ups

Conversation

@krishan711
Copy link
Copy Markdown
Contributor

Description

Screenshots:

Checklist:

  • I have updated the CHANGELOG with a summary of my changes
  • I have updated the documentation accordingly

Copilot AI review requested due to automatic review settings December 4, 2025 13:51
Copy link
Copy Markdown

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 PR updates the @kibalabs/ui-react devDependency from version 0.11.3-next.18 to 0.11.3-next.22, requiring a code change to explicitly handle the ref property on the input element. This update aligns with the changelog's note about updating to work with ui-react v0.11.3 and above for CSS-based theming.

Key changes:

  • Updated @kibalabs/ui-react devDependency to version 0.11.3-next.22 with caret versioning
  • Added explicit ref handling to the input element in the Dropzone component

Reviewed changes

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

File Description
package.json Updates @kibalabs/ui-react devDependency to ^0.11.3-next.22, changing from pinned to caret versioning
package-lock.json Reflects the updated package version with new integrity hash
src/component.tsx Adds explicit ref property to input element with type assertion to support the updated ui-react version

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

Comment thread package.json
"devDependencies": {
"@kibalabs/build": "0.13.3-next.13",
"@kibalabs/ui-react": "0.11.3-next.18",
"@kibalabs/ui-react": "^0.11.3-next.22",
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The version specifier has been changed from a pinned version 0.11.3-next.18 to a caret range ^0.11.3-next.22. This changes the versioning strategy for this devDependency.

For pre-release versions (versions with -next), npm's caret behavior might not work as expected. The caret (^) allows updates that do not modify the left-most non-zero element, but with pre-release identifiers, the behavior can be unpredictable. Consider whether you want to:

  1. Keep it pinned (remove the ^) for consistent builds
  2. Use a tilde (~) to allow only patch-level changes
  3. Keep the caret if flexible pre-release updates are intentional

This change should also be reflected in the peerDependencies constraint on line 49, which currently specifies >=0.11.3-next.18.

Copilot uses AI. Check for mistakes.
Comment thread src/component.tsx
style={style}
>
<input
ref={(inputProps as React.InputHTMLAttributes<HTMLInputElement> & { ref?: React.Ref<HTMLInputElement> }).ref}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The type assertion on line 53 is overly complex and could be simplified. Since getInputProps() from react-dropzone returns props that include a ref property, you can simply use inputProps.ref directly without the type assertion. The current casting to React.InputHTMLAttributes<HTMLInputElement> & { ref?: React.Ref<HTMLInputElement> } is unnecessarily verbose and may cause type safety issues.

Consider simplifying to:

ref={inputProps.ref}

This is the standard pattern for react-dropzone and will work correctly with TypeScript.

Suggested change
ref={(inputProps as React.InputHTMLAttributes<HTMLInputElement> & { ref?: React.Ref<HTMLInputElement> }).ref}
ref={inputProps.ref}

Copilot uses AI. Check for mistakes.
@krishan711 krishan711 merged commit 008f85d into main Dec 4, 2025
4 checks passed
@krishan711 krishan711 deleted the ups branch December 4, 2025 14:00
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.

2 participants