-
Notifications
You must be signed in to change notification settings - Fork 0
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
8690 task: Added colours to storybook #7
Conversation
src/stories/colour-tokens.js
Outdated
@@ -0,0 +1,82 @@ | |||
export default { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is taken from the token build process from this work in progress PR
#2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would an aim be to eventually remove this file and rely on design tokens from an external source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this file is a stop-gap. The idea is to remove this and any similar build files from the codebase in favour of an npm process which uses tokens in JSON format to generate all outputs needed.
For more context, this file was generated by Style Dictionary using config and colour/base.json from the afore mentioned PR.
Are you specifically talking about an external source from a product theming standpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Was concerned that we're defining tokens within the npm package itself (design-system), which seems like duplication (was imagining a single source of truth somewhere, probably a JSON file, which could be edited by designers to update values, which then permeate through the many apps which consume the design tokens).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the end result will be the single source of truth you speak of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit I struggle to see the argument for using "colour" over "color"... I find when I'm writing code that "color" is the first spelling I opt for, before realising that the variables don't use that spelling.
I would prefer if we used "color" for consistency (with CSS property), unless there is a reason for using the UK spelling?
It's a fair point. This has been carried across from CC and I think the reason we used "colour" was because that was what the original designs used. I'll add a comment to the ticket for discussion. |
All instances of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it a conscious decision not to change filenames to US spelling (colors
)?
No suggestion from me either way, just checking whether it was an oversight! |
Initial commit for adding colour documentation to Storybook based on existing Sketch designs https://app.zeplin.io/project/5b4e06b48ae4580d4871178a/screen/5ea86a03c8963abb60b549cd
To test
npm run install
npm run storybook