Skip to content

Conversation

@LinKCoding
Copy link
Contributor

@LinKCoding LinKCoding commented Jan 13, 2026

Overview

  • Adds a new prop, useLogicalProperties which defaults to true, to GamutProvider
  • Updated margin and padding related props to include both physical and logical CSS properties
  • Adds a new function to transform to resolve the correct CSS property to use
  • Adds a new toolbar tool for switching between logical and physical CSS properties
  • Adds documentation for useLogicalProperties

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: GMT-1508
  • 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

Don't make me tap the sign.

  1. Go to Meta/Logical and physical CSS properties and review the info to be correct and organized well
  2. Go to System/Props/Space and check over the token table and inspect the examples (should be using logical props)
  3. Use the new toolbar button to switch to physical property and re-inspect the example
  4. ...
  5. Finish and do a celebratory dance 🎉

PR Links and Envs

Repository PR Link
Monolith Monolith PR
Mono Mono PR

@LinKCoding LinKCoding requested a review from a team as a code owner January 13, 2026 20:17
@LinKCoding LinKCoding changed the base branch from main to kl-gmt-1451-logical-props January 13, 2026 20:17
@nx-cloud
Copy link

nx-cloud bot commented Jan 13, 2026

View your CI Pipeline Execution ↗ for commit 1f6e194


☁️ Nx Cloud last updated this comment at 2026-01-29 19:33:52 UTC

@nx-cloud
Copy link

nx-cloud bot commented Jan 13, 2026

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 14d2a65

Command Status Duration Result
nx run-many --target=build --all ❌ Failed 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-13 20:18:04 UTC

@LinKCoding LinKCoding marked this pull request as draft January 13, 2026 20:19
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (kl-gmt-1451-logical-props@1abd01c). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             kl-gmt-1451-logical-props    #3234   +/-   ##
============================================================
  Coverage                             ?   89.09%           
============================================================
  Files                                ?      236           
  Lines                                ?     4309           
  Branches                             ?     1478           
============================================================
  Hits                                 ?     3839           
  Misses                               ?      462           
  Partials                             ?        8           
Flag Coverage Δ
pull-request 89.09% <ø> (?)

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.

@codecademydev
Copy link
Collaborator

📬 Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@github-actions
Copy link
Contributor

expect(rowEl).toHaveStyle({ columnGap: theme.spacing[40] });
});

// Note: Only testing one mode here since variant() caches styles after first render.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out that variant() was caching the CSS object created and thus not switching between logical and physical properties even after setting useLogicalProperties as false.

This was found downstream in createCss and also also for the MockGamutProvider

@LinKCoding LinKCoding marked this pull request as ready for review January 29, 2026 21:56
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