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

Convert Tokens to Style Dictionary 4 and Token Studio 1 #11391

Open
68 of 86 tasks
alisonailea opened this issue Jan 27, 2025 · 1 comment
Open
68 of 86 tasks

Convert Tokens to Style Dictionary 4 and Token Studio 1 #11391

alisonailea opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels
2 - in development Issues that are actively being worked on. enhancement Issues tied to a new feature or request. p - high Issue should be addressed in the current milestone, impacts component or core functionality resolution: refine For issues we support, but additional details are needed prior to dev work.
Milestone

Comments

@alisonailea
Copy link
Contributor

alisonailea commented Jan 27, 2025

Check existing issues

Description

Requires a major refactor of calcite-design-tokens

This will remove several (now unnecessary) custom token transformer functions. Align with the latest Token Studio and Style Dictionary versions.

Blocked issues: #10051

Requirements checkoff

  • Reorganize files to align with the new StyleDictionary config format
  • Create new config files
  • Refactor or (re)write StyleDictionary functions
    • Transformers to match SD format
      • Calcite Transformation Group
      • Transform name to replace "-" with "minus" and "+" with "plus"
      • Transform name to remove the Tier
      • Transform name to remove the word "default"
      • Transform value of boxshadow for CSS platforms
      • Transform any number value to calculate sum
      • Transform px value to rem for space, size, font-size, etc.
      • Transform breakpoint value to px
    • Headers to match SD format
      • Default Calcite header for generated files
      • Calcite header for deprecated generated files
    • Formats to match SD format & normalize file names (aka "global --> semantic")
      • /css
        • breakpoints.css
        • classes.css (typography classes)
        • core.css
        • dark.css
        • light.css
        • semantic.css
        • global.css (deprecate)
        • index.css
          • import semantic.css and classes.css
          • Set light vars at :root
          • @media (prefers-color-scheme: light) { .calcite-mode-auto { …light vars } }
          • @media (prefers-color-scheme: dark) { .calcite-mode-auto { …dark vars } }
          • .calcite-mode-light { …light vars }
          • .calcite-mode-dark { …dark vars }
      • /scss
        • breakpoints.scss
        • classes.scss (typography mixins)
        • core.scss
        • dark.scss
        • light.scss
        • semantic.scss
        • global.css
          • Deprecate
          • merge semantic, light, & dark
        • index.scss
          • Import breakpoints.scss, global.scss, & mixins.scss
          • @mixin calcite-mode-light { …light vars }
          • @mixin calcite-mode-dark { …dark vars }
      • /es6
        • breakpoints.js
        • core.js
        • dark.js
        • light.js
        • semantic.js
        • global.js
          • merge semantic, light, & dark
          • deprecate
      • /js
        • core.js
        • global.js
          • merge semantic, light, & dark
          • deprecate
        • dark.js
        • light.js
        • semantic.js
      • /docs
        • core.json
        • global.json
          • merge semantic, light, & dark
          • deprecate
        • light.json
        • dark.json
        • semantic.json
    • Filters to match SD format
      • Source
      • Core
      • Breakpoints
      • Global
      • Light
      • Dark
      • Typography
  • Setup calcite color themes in Token Studio in Figma
  • Design to ensure typography styles are correctly setup before importing into Token Studio

Acceptance Criteria

@tokens-studio/sd-transforms is at or above v1.2.9
style-dictionary is at or above v4.3.2

Run npm run build

packages/calcite-design-tokens/dist includes the following assets

/css
  breakpoints.css
  core.css
  dark.css
  light.css
  semantic.css
  index.css
/scss
  breakpoints.scss
  core.scss
  dark.scss
  light.scss
  semantic.scss
  index.scss
/es6
  breakpoints.js
  core.js
  dark.js
  light.js
  semantic.js
  global.js
/js
  core.js
  global.js
  dark.js
  light.js
  semantic.js
/docs
  core.json
  global.json
  light.json
  dark.json
  semantic.json

Relevant Info

Required to resolve:

#10618
#10993
#8856

Which Component

tokens

Example Use Case

No response

Priority impact

impact - p2 - want for an upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components

Esri team

N/A

@alisonailea alisonailea added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Jan 27, 2025
@github-actions github-actions bot added the impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone label Jan 27, 2025
@alisonailea alisonailea added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Jan 27, 2025
@alisonailea alisonailea self-assigned this Jan 27, 2025
@geospatialem
Copy link
Member

@alisonailea Can you provide an estimate, priority, and timeline for the above?

@brittneytewks brittneytewks added p - high Issue should be addressed in the current milestone, impacts component or core functionality and removed needs triage Planning workflow - pending design/dev review. labels Feb 10, 2025
@geospatialem geospatialem assigned jcfranco and unassigned alisonailea Feb 24, 2025
@geospatialem geospatialem added the resolution: refine For issues we support, but additional details are needed prior to dev work. label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - in development Issues that are actively being worked on. enhancement Issues tied to a new feature or request. p - high Issue should be addressed in the current milestone, impacts component or core functionality resolution: refine For issues we support, but additional details are needed prior to dev work.
Projects
None yet
Development

No branches or pull requests

4 participants