Skip to content

Comments

fix(file-uploader-button): avoid state updates during render#21534

Open
adamalston wants to merge 1 commit intocarbon-design-system:mainfrom
adamalston:n/a-press
Open

fix(file-uploader-button): avoid state updates during render#21534
adamalston wants to merge 1 commit intocarbon-design-system:mainfrom
adamalston:n/a-press

Conversation

@adamalston
Copy link
Contributor

No issue.

Avoided state updates during render in FileUploaderButton.

Changelog

Changed

  • Avoided state updates during render in FileUploaderButton.

Testing / Reviewing

FileUploaderButton was setting state during render which is an anti-pattern.

Existing tests should cover these changes.

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.94%. Comparing base (21a761e) to head (342cc80).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21534      +/-   ##
==========================================
+ Coverage   86.89%   86.94%   +0.04%     
==========================================
  Files         540      540              
  Lines       43438    43450      +12     
  Branches     6648     6713      +65     
==========================================
+ Hits        37745    37776      +31     
+ Misses       5527     5507      -20     
- Partials      166      167       +1     
Flag Coverage Δ
main-packages 86.04% <100.00%> (-0.01%) ⬇️
web-components 87.36% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 342cc80
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/698e4926e5094f00086137df
😎 Deploy Preview https://deploy-preview-21534--v11-carbon-react.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 project configuration.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 342cc80
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/698e4926bb19320008078150
😎 Deploy Preview https://deploy-preview-21534--v11-carbon-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 project configuration.

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.

1 participant