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

feat(tags): use design tokens, add theming #641

Merged
merged 4 commits into from
Apr 5, 2019

Conversation

montezume
Copy link
Contributor

@montezume montezume commented Apr 4, 2019

Summary

Create new tokens to use for Tags. These tokens will also be used in the SelectInputs (for when isMulti is enabled).

Enable theming as for Tags.

@@ -171,6 +171,10 @@ states:
componentGroups:
input:
description: 'Input elements'
tag:
description: 'Tag elements'
tag-warning:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wasn't 100% sure on whether to allow multiple states or to put it as a separate component group;

@montezume
Copy link
Contributor Author

I think I made a mistake making the visual spec. I'll fix it tomorrow 😥

const overwrittenVars = {
...vars,
...theme,
};
Copy link
Member

Choose a reason for hiding this comment

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

Q: do we allow all custom properties to be overwritten or should we only allow design tokens?

Copy link
Contributor Author

@montezume montezume Apr 5, 2019

Choose a reason for hiding this comment

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

That's something I've thought about. The idea is that (for now), users can override choices. And since our designTokens use choices, that's kind of how it's working together for now.

However, there's some other variables that we could allow users to override as well, but I think it would make sense to rename them first.

UI Kit wide variables

example:

spacing8

These are often named in a way that would make overriding them weird. Spacing8 is set to 16? 😕 . We would probably want to rename these.

Component specific variables

These are sort of like "magic" numbers. If we allow users to override them, it should be documented in the individual components.

sizeHeightTag
standardInputHeight

I'll open up an issue for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#644 to track this

Copy link
Member

Choose a reason for hiding this comment

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

Right, the spacings tokens should probably be something like spacingsXs, spacingsS, etc

@@ -63,10 +64,10 @@ export const component = () => (
{longText}
</Tag>
</Spec>
<Spec label="Normal - onRemove (disabled)">
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to remove this? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, made a mistake 🙈

@montezume montezume force-pushed the ml-design-tokens-for-tags branch from 11a37bb to de5682b Compare April 5, 2019 08:23
@@ -180,7 +180,7 @@
"rollup-plugin-json": "4.0.0",
"rollup-plugin-node-resolve": "4.0.1",
"rollup-plugin-replace": "2.1.1",
"serve": "10.1.2",
"serve": "11.0.0",
Copy link
Contributor Author

@montezume montezume Apr 5, 2019

Choose a reason for hiding this comment

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

the outdated warning was annoying me

@montezume
Copy link
Contributor Author

I would like to merge this so I can get started on the select inputs. Can I get a review pretty please @emmenko @tdeekens

@montezume montezume force-pushed the ml-design-tokens-for-tags branch from de5682b to 9951368 Compare April 5, 2019 09:24
Copy link
Member

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

💯

@montezume montezume merged commit b3d5285 into master Apr 5, 2019
@montezume montezume deleted the ml-design-tokens-for-tags branch April 5, 2019 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants