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

docs: split t3 colors stories and remove t3 stories aggregator #1720

Merged
merged 7 commits into from
Aug 8, 2023

Conversation

jinlee93
Copy link
Contributor

@jinlee93 jinlee93 commented Aug 7, 2023

Summary:

  • removes aggregating story file Tier3Tokens.stories.jsx and just converts the individual components to story files
  • splits T3 colors as requested by design and I also agree as part of survey feedback to not have to scroll that much on ZH
  • adds suggested TW class and design token string to the relevant color
  • follow up pr will attempt to differentiate these (is follow up since it'll also affect the other tokens pages)
  • converts some jsx to tsx
  • recurses the T3 and T2 tokens to raw value
    • this is fine since the Figma style references the respective T1/T2 css property and not the raw value

Test Plan:

  • Manually tested my changes, and here are the details:
    • T3 color tokens docs pages are affected and they show the suggested TW class and the Figma style
    • T2 color tokens that reference T1 colors recurse to the raw value
      image

@jinlee93 jinlee93 requested a review from a team August 7, 2023 22:56
}
return value;
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this util function recurses to the raw value

@@ -1,10 +1,19 @@
import tokens from '../data/tokens.json';

const recurseToPrimaryValue: (value: string) => string = (value) => {
Copy link
Contributor Author

@jinlee93 jinlee93 Aug 7, 2023

Choose a reason for hiding this comment

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

not sure why typing like this is necessary and not inferred 🤔
image

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #1720 (6747ded) into next (d200312) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             next    #1720   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         146      146           
  Lines        2579     2579           
  Branches      664      664           
=======================================
  Hits         2380     2380           
  Misses        198      198           
  Partials        1        1           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

size-limit report 📦

Path Size
components 95.49 KB (0%)
styles 32.76 KB (0%)

@booc0mtaco
Copy link
Contributor

Now that we have quite a few different values in here, I think labeling them in the UI would be helpful. We could widen the text area for these, and put them in a table or something.

  • CSS Variable name
  • Figma Token name
  • Tailwind Class name
  • Hexadecimal value

@jinlee93
Copy link
Contributor Author

jinlee93 commented Aug 8, 2023

Now that we have quite a few different values in here, I think labeling them in the UI would be helpful. We could widen the text area for these, and put them in a table or something.

  • CSS Variable name
  • Figma Token name
  • Tailwind Class name
  • Hexadecimal value

Updated to have a Table which also affected the T1 and T2 colors appropriately
Think that sticky header could be useful here haha
@booc0mtaco

Copy link
Contributor

@booc0mtaco booc0mtaco left a comment

Choose a reason for hiding this comment

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

@jinlee93 Looks great to me, and good call on sticky header :P

@jinlee93 jinlee93 merged commit 6988b14 into next Aug 8, 2023
@jinlee93 jinlee93 deleted the jlee/cleanT3docs branch August 8, 2023 22:44
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.

2 participants