-
Notifications
You must be signed in to change notification settings - Fork 18
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
Updates DCS Exports with Product Specific Brand Names #81
Updates DCS Exports with Product Specific Brand Names #81
Conversation
src/pipeline/fluentui-dcs.ts
Outdated
const tokenOverrides = { | ||
"globalColorBrand10": "#001919", | ||
"globalColorBrand20": "#012826", | ||
"globalColorBrand30": "#01322e", | ||
"globalColorBrand40": "#033f38", | ||
"globalColorBrand50": "#054d43", | ||
"globalColorBrand60": "#0a5c50", | ||
"globalColorBrand70": "#0c695a", | ||
"globalColorBrand80": "#117865", | ||
"globalColorBrand90": "#1f937e", | ||
"globalColorBrand100": "#2aac94", | ||
"globalColorBrand110": "#3abb9f", | ||
"globalColorBrand120": "#52c7aa", | ||
"globalColorBrand130": "#78d3b9", | ||
"globalColorBrand140": "#9ee0cb", | ||
"globalColorBrand150": "#c0ecdd", | ||
"globalColorBrand160": "#e3f7ef", | ||
} |
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.
These should be in a separate token file that only gets included in the DCS builds. I can help set that up.
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 can add a file called global.brand.dcs.json
to the master tokens repo that looks like this (with all 16 colors):
{
"Global": {
"Color": {
"Brand": {
"10": {
"$type": "color",
"$value": "#001919"
},
"20": {
"$type": "color",
"$value": "#012826"
}
}
}
}
}
Then you can override the brand colors just by adding global.brand.dcs.json
to the list of files to include.
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.
Okay, you should be able to remove this and the corresponding reference around line 31. If you get the latest token files, you'll be able to add --in src/global.brand.dcs.json
to the command line (anywhere except before global.json
) to get your overrides.
src/pipeline/fluentui-dcs.ts
Outdated
{ | ||
let newName = path[0] !== "Global" && path[3] === "Color" ? `color${Utils.pascalCase(path)}` : _.camelCase(path.join(" ")) | ||
let newName = path[0] !== "Global" && prop.attributes.category === "color" ? `color${Utils.pascalCase(path)}` : _.camelCase(path.join("")) |
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.
_.camelCase(path.join(" "))
and _.camelCase(path.join(""))
are subtly different—if you haven't already gone through the output and made sure that there aren't any unintended changes, you might want to put the space back.
Modifies existing DCS exports to overwrite existing brand color values with product specific brand color values.
As well as adding a set of SCSS exports.