Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(EmptyState): added useId handling for older react version #6607

Conversation

sean-anderson-ibm
Copy link
Contributor

@sean-anderson-ibm sean-anderson-ibm commented Dec 18, 2024

Closes #6606

Fixes useId use in react 17 and below, due to useId only being in react 18 and above. Falls back to previous method of id generation for react versions <18.

What did you change?

I added a util function to change how useId works based on react version support and updated references to it

How did you test and verify your work?

I linked the build package to a repo using react 16, and verified the issue was no longer present.

I have read the DCO document and I hereby sign the DCO.

@sean-anderson-ibm sean-anderson-ibm requested a review from a team as a code owner December 18, 2024 15:10
@sean-anderson-ibm sean-anderson-ibm requested review from davidmenendez and sangeethababu9223 and removed request for a team December 18, 2024 15:10
Copy link
Contributor

github-actions bot commented Dec 18, 2024

DCO Assistant Lite bot All contributors have signed the DCO.

Copy link

netlify bot commented Dec 18, 2024

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit 8030fa7
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/676306c81eacd10008dfdf82
😎 Deploy Preview https://deploy-preview-6607--ibm-products-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 18, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 8030fa7
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/676306c80d1aec000807a0e0
😎 Deploy Preview https://deploy-preview-6607--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sean-anderson-ibm
Copy link
Contributor Author

recheck

I have read the DCO document and I hereby sign the DCO.

@sean-anderson-ibm
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

davidmenendez
davidmenendez previously approved these changes Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.75%. Comparing base (09f917a) to head (8030fa7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6607      +/-   ##
==========================================
- Coverage   80.76%   80.75%   -0.02%     
==========================================
  Files         395      396       +1     
  Lines       12884    12886       +2     
  Branches     4266     4267       +1     
==========================================
  Hits        10406    10406              
- Misses       2478     2480       +2     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components ∅ <ø> (∅)

@elycheea elycheea changed the base branch from main to release/v2.56.1 December 18, 2024 19:31
@elycheea elycheea requested review from elycheea, kennylam and a team as code owners December 18, 2024 19:31
@elycheea elycheea changed the base branch from release/v2.56.1 to main December 18, 2024 19:31
@matthewgallo
Copy link
Member

Thanks for contributing this fix @sean-anderson-ibm! 🎉 These commits were merged yesterday into our release branch, see here. And then auto-merged back into main, so we should be able to close this PR.

@sean-anderson-ibm sean-anderson-ibm deleted the carbonUseId branch December 19, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty state component is broken when using react 16
4 participants