Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ§ͺ [Spike] Theming β€œsupport” in HDS and Showcase - Designers' playground #2608

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Dec 16, 2024

🚨 DO NOT MERGE 🚨

πŸ“Œ Summary

Branch used as playground for the HDS designers so they can play with the design tokens for the HDS Components and the themed variables for the Showcase app.

πŸ§‘β€πŸ’» What can be tested/experimented

  • You can change the values of the package/tokens/src/ JSON files, to match the values in Figma, and see them applied to the HDS components in the showcase
    • in particular, have a look at the packages/tokens/src/global/themed/[light|dark]/color/*.json files, which contain the low-level tokens, then aliased to semantic and component-level tokens
  • You can change the values of the themed colors used in the showcase, to see how they should work in conjunction with the themed HDS components
    • in particular, have a look at the showcase/app/styles/showcase-theming/[light|dark].scss files, where you can find the few color tokens used in the showcase (they're declared in a Sass mixin)

🚧 How to run the code locally

To make the changes to the HDS source tokens and see them reflected in the showcase pages, you need three active CLI tabs:

Initial setup

In a CLI:

cd [path/to/local/repo]
yarn install

First tab β†’ compilation of the source tokens

In a CLI:

cd packages/tokens
yarn build:watch

this will automatically compile the design tokens from the src folder to the dist folder, whenever a JSON file in src is changed.

Second tab β†’ compilation of the HDS components CSS file

In a CLI:

cd packages/components
yarn build:watch

this will automatically re-generate the CSS for the components, consumed in the showcase app

Third tab β†’ compilation of the showcase

In a CLI:

cd showcase
yarn start

this will automatically re-compile the showcase app, with the new design tokens, and automatically refresh the open window (at http://localhost:4200 if you're using the standard port, otherwise you can use the --port argument in the command, and this will use the specified port).

πŸ”— External links

Jira tickets:

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase ❌ Failed (Inspect) Dec 20, 2024 4:23pm
hds-website ❌ Failed (Inspect) Dec 20, 2024 4:23pm

added section with β€œthemed” HDS components in theming showcase page

HACK workardound to support nested theming

refactored HDS theme switcher to be more similar to the one in use on developer website
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants