Skip to content

Conversation

@joshblack
Copy link
Member

@joshblack joshblack commented Dec 6, 2022

Closes #2620
Closes #2146

Changelog

New

Changed

  • Update type of ref from useDetails to HTMLDetailsElement

Removed

Testing & Reviewing

I couldn't figure out a good test strategy locally for this, let me know if you have any tips! I ended up having to create a distinct folder and use the published package (or link locally). Something like:

npx create-react-app details-example --template typescript
cd details-example
npm i @primer/react styled-components
npm run build

Initially, this will fail with the error from the parent issues. When updating @primer/react in package.json, this error will no longer show up when building.

@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2022

🦋 Changeset detected

Latest commit: 8a297ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 84.04 KB (0%)
dist/browser.umd.js 84.66 KB (0%)

@joshblack joshblack marked this pull request as ready for review December 6, 2022 15:57
@joshblack joshblack requested review from a team and siddharthkp December 6, 2022 15:57
@joshblack
Copy link
Member Author

@siddharthkp hope the changes make sense, let me know if I'm missing anything!

@joshblack joshblack enabled auto-merge (squash) December 16, 2022 17:20
@joshblack joshblack temporarily deployed to github-pages December 16, 2022 17:26 — with GitHub Actions Inactive
@joshblack joshblack merged commit db0db6e into main Dec 16, 2022
@joshblack joshblack deleted the 2620-update-ref-type-details branch December 16, 2022 17:27
@primer-css primer-css mentioned this pull request Dec 16, 2022
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.

[React 18] Ref type from useDetails is not compatible with Details useDetails + Details typings issue introduced in v27 and still present today

3 participants