Skip to content

fix: Explicitly omit crossOrigin and placeholder props#812

Merged
pawelgrimm merged 3 commits intomainfrom
pawel/fix/cross-origin-and-placeholder-type-issue
Jan 16, 2024
Merged

fix: Explicitly omit crossOrigin and placeholder props#812
pawelgrimm merged 3 commits intomainfrom
pawel/fix/cross-origin-and-placeholder-type-issue

Conversation

@pawelgrimm
Copy link
Copy Markdown
Contributor

@pawelgrimm pawelgrimm commented Jan 12, 2024

Relates to:

Short description

Due to an update to @types/react, certain intrinsic HTML element type have been updated to remove unsupported props, namely:

  • Removing crossOrigin from <input> and <textarea>
  • Removing placeholder from <h1>, <h2>, etc.

This means that if a consumer of this package were to upgrade their @types/react, while this package retains the older types, usages of components such as <TextInput> and <Heading> would be met with type errors complaining about missing those props that have been removed.

The more correct solution here would be to update the @types/react package in THIS package, we cannot do so because it causes similar errors stemming from ariakit, which is not trivial to upgrade.

As an interim solution, we are explicitly excluding those removed props from affected Reactist component props.

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Executed npm run validate and made sure no errors / warnings were shown
  • Described changes in CHANGELOG.md
  • Bumped version in package.json and package-lock.json (npm --no-git-tag-version version <major|minor|patch>) ref
  • Reviewed and approved Chromatic visual regression tests in CI

Versioning

This is technically a breaking change, as the interface of many components has changed.

@pawelgrimm pawelgrimm self-assigned this Jan 12, 2024
@pawelgrimm pawelgrimm requested review from a team and craigcarlyle and removed request for a team January 12, 2024 22:10
Copy link
Copy Markdown
Contributor

@craigcarlyle craigcarlyle left a comment

Choose a reason for hiding this comment

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

🚀

@pawelgrimm pawelgrimm merged commit f269e67 into main Jan 16, 2024
@pawelgrimm pawelgrimm deleted the pawel/fix/cross-origin-and-placeholder-type-issue branch January 16, 2024 19:32
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