Skip to content

Conversation

@ciampo
Copy link
Contributor

@ciampo ciampo commented Apr 14, 2025

Requires #102611
Closes ARC-90

Proposed Changes

This PR tests color generation in the theme package:

  • The approach to color generation takes inspiration from Radix and this initial exploration in the Gutenberg repository;
  • At a high level:
    • The theme takes as an input a primary color, a fun coefficient (ie. how saturated should grays be), and a scheme (ie. light or dark mode)
    • The theme generates two 12-step color scales, one for the primary color and one for neutral (gray) colors;
    • The theme then generates a series of semantic tokens based on an internal configuration that maps each token to a step of the generated color scales;
    • Each generated token is mapped to a CSS custom property (similar to what done in Polaris)
  • At the moment, the prototype explores two different ways to produce the color scales:

Screenshot 2025-04-15 at 00 12 06

The Storybook example can be spinned up locally by running the following command: yarn workspace @automattic/theme run storybook:start

Why are these changes being made?

Testing Instructions

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@github-actions
Copy link

github-actions bot commented Apr 14, 2025

@ciampo ciampo changed the base branch from trunk to try/theme-package/add-package April 14, 2025 22:20
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Apr 14, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug try/theme-package/theme-prototype on your sandbox.

@github-actions
Copy link

This PR has been marked as stale. This happened because:

  • It has been inactive for the past 3 months.
  • It hasn't been labeled `[Pri] BLOCKER`, `[Pri] High`, `[Status] Keep Open`, etc.

If this PR is still useful, please do a trunk merge or rebase and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.

If the PR is not updated (or at least commented on) in another month, it will be automatically closed.

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