Skip to content

fix(GamutProvider): add nonce to react-aria-components#3272

Open
dreamwasp wants to merge 5 commits intomainfrom
cass-gmt-1570
Open

fix(GamutProvider): add nonce to react-aria-components#3272
dreamwasp wants to merge 5 commits intomainfrom
cass-gmt-1570

Conversation

@dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented Feb 23, 2026

Overview

Forwards nonce to react-aria-components and framer-motion via the GamutProvider. This also pins the "@react-aria/interactions" version to 3.25.0 until this CSP violation is fixed

This PR has test code I will remove before shipping (adding the static nonce to storybook)

PR Checklist

  • [NOPE] Related to designs:
  • Related to JIRA ticket: [gmt-1570]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  1. Go to the Modal stories
  2. Open one of stories in a new tab (button in the top right corner)
  3. Inspect the page and see both the emotion and react-singleton style sheets have the test nonce (emotions have the emotion tag, the react-singleton's are just <style type="text/css" nonce="storybook-csp-nonce">

PR Links and Envs

Repository PR Link
Monolith Monolith PR
Mono Mono PR

@nx-cloud
Copy link

nx-cloud bot commented Feb 23, 2026

View your CI Pipeline Execution ↗ for commit 506b233


☁️ Nx Cloud last updated this comment at 2026-02-24 16:37:22 UTC

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.11%. Comparing base (ea99df2) to head (506b233).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3272      +/-   ##
==========================================
- Coverage   89.74%   88.11%   -1.63%     
==========================================
  Files         361       29     -332     
  Lines        5137      286    -4851     
  Branches     1609       61    -1548     
==========================================
- Hits         4610      252    -4358     
+ Misses        519       34     -485     
+ Partials        8        0       -8     
Flag Coverage Δ
main ?
pull-request 88.11% <100.00%> (?)

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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dreamwasp dreamwasp changed the title fix(GamutProcider): add nonce to react-aria-components fix(GamutProvider): add nonce to react-aria-components Feb 23, 2026
@codecademydev
Copy link
Collaborator

📬 Published Alpha Packages:

@codecademy/gamut@68.0.4-alpha.ef9197.0
@codecademy/gamut-icons@9.56.1-alpha.ef9197.0
@codecademy/gamut-illustrations@0.58.4-alpha.ef9197.0
@codecademy/gamut-kit@0.6.583-alpha.ef9197.0
@codecademy/gamut-patterns@0.10.23-alpha.ef9197.0
@codecademy/gamut-styles@17.11.4-alpha.ef9197.0
@codecademy/gamut-tests@5.2.21-alpha.ef9197.0
@codecademy/styleguide@79.1.3-alpha.ef9197.0

@github-actions
Copy link
Contributor

@dreamwasp dreamwasp marked this pull request as ready for review February 24, 2026 17:08
@dreamwasp dreamwasp requested a review from a team as a code owner February 24, 2026 17:08
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

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

LGTM, was able to find the nonce attributes in the SB pages
and the Mono/Lith pages load just fine!

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.

3 participants