Skip to content

Restore missing control tokens in ESM mode - #1447

Merged
rezrah merged 3 commits into
mainfrom
rezrah/backfill-esm-tokens-control
Aug 19, 2026
Merged

Restore missing control tokens in ESM mode#1447
rezrah merged 3 commits into
mainfrom
rezrah/backfill-esm-tokens-control

Conversation

@rezrah

@rezrah rezrah commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolves #1424

Control tokens via functional/size.css weren't added to the global side-effect list, even though they are used across a number of components. This fixes that.

List of notable changes:

  • Adds functional control tokens to the global side effect list
  • Adds a test for CI

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before After
Screenshot 2026-08-17 at 15 08 47 Screenshot 2026-08-17 at 15 09 11

@rezrah
rezrah requested a review from a team as a code owner August 17, 2026 15:02
Copilot AI lite review requested due to automatic review settings August 17, 2026 15:02
@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bb31026

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

This PR includes changesets to release 9 packages
Name Type
@primer/react-brand Patch
@primer/brand-docs Patch
@primer/brand-css Patch
@primer/brand-primitives Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-mcp Patch
@primer/brand-config Patch
@primer/brand-storybook 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 No design token changes found

@github-actions

Copy link
Copy Markdown
Contributor

🟢 No unit test coverage changes found

All components and hooks with tests maintain the same coverage as the main branch.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread packages/e2e/integration-tests/tests/check-warnings.cy.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🟢 Bundle size report

CheckMainBranchChange
UMD — full bundle (JS)102.32 kB102.32 kB🟢 No change
UMD — full bundle (CSS)67.94 kB68.02 kB⬆️ +84 B (+0.1%)
ESM — full bundle (JS + CSS)1.59 MB1.59 MB⬆️ +431 B (+0.0%)
ESM — tree-shaken simple (Button)71.22 kB71.18 kB✅ -47 B (-0.1%)
ESM — tree-shaken complex (ActionMenu)80.13 kB80.02 kB✅ -116 B (-0.1%)

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

⚠️ Visual differences found

Our visual comparison tests found UI differences.

Please review the differences by using the test artifacts to ensure that the changes were intentional.

Artifacts can be downloaded and reviewed locally.

Download links are available at the bottom of the workflow summary screen.

Example:

artifacts section of workflow run

If the changes are expected, please run npm run test:visual:update to replace the previous fixtures.

Review visual differences

@rezrah
rezrah merged commit 5fbbd9d into main Aug 19, 2026
17 checks passed
@rezrah
rezrah deleted the rezrah/backfill-esm-tokens-control branch August 19, 2026 14:08
@primer primer Bot mentioned this pull request Aug 19, 2026
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.

[ESM] Button renders with broken sizing when Stack is not used on the same page

2 participants