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

Design Layout of resources for automatic elements library Generation #2436

Closed
chrisconnors-ibm opened this issue Apr 22, 2019 · 11 comments
Closed
Labels
package: elements @carbon/elements

Comments

@chrisconnors-ibm
Copy link
Contributor

Design the layout of the library elements as we want them to be generated via #484

@aagonzales
Copy link
Member

aagonzales commented Apr 26, 2019

Template

Sketch file example: https://ibm.box.com/s/pdoa77z48q51z8rp7mb7up8bj2xlnii0

Icons

All icons should be symbols

File structure

  • Each icon gets a row with all 4 sizes.

image

Naming

  • category/icon--name/size
  • category/icon--name/16, category/icon--name/20* ect. The / is important for symbol nesting structure.
  • Scaled icons should have an * after the size to denote that it has been scaled.

image

Categories

We are going to keep the IDL category in the Sketch kit so icons are easier to find.
image

Colors

  • Grid of IDL colors and hover color. Colors should be saved as a layer style
    image

Themes

  • Columns for different theme token values. Tokens should be saved as a layer style
    image

Type

  • Type should be saved as a type style.
    image

Questions

  • For icons, should we keep the categories of icons that currently exist in the IDL kit and if so does that have any technical ramification with autogenerating the file.
    • Yes, we're keeping
  • Should/can we auto-generate type styles? And is there a way to define the color. Color is defined by theme and the element code does not include color. Would it be confusing to have type tokens in the element library and in each theme library as well?
  • Same question for color tokens. Currently color tokens are imbedded in each individual theme library. Should they stay there or be in both places, or only in the IDL library?

@joshblack
Copy link
Contributor

Should/can we auto-generate type styles?

I believe we can!

And is there a way to define the color.

Good question, I think we can do shared styles (not sure if that helps)

@aagonzales
Copy link
Member

@joshblack I've updated the comment above just fyi

@joshblack
Copy link
Contributor

Thanks @aagonzales! Do we have access to categories yet for the icons btw?

@chrisconnors-ibm
Copy link
Contributor Author

@joshblack "Do we have access to categories yet for the icons btw?" do you mean in the metadata yml?

@joshblack
Copy link
Contributor

@chrisconnors-ibm I don't think it's in the metadata yet, unfortunately. Just saw that the icons above are in categories but I'm not sure where that information lives. We only have example ones in metadata: https://github.com/carbon-design-system/carbon-elements/blob/master/packages/icons/metadata.yml#L6

@chrisconnors-ibm
Copy link
Contributor Author

you can see their classification here: https://www.ibm.com/design/language/elements/icon-library

That's what's reflected in the existing IDL library too.

So how would we encode each icon to be in one (1) category? should that be a prop in the yml file?

@joshblack
Copy link
Contributor

Yeah, there is a categories list in the YML we can use, we can also convert it to only one field if we believe icons can only be in one category.

@joshblack
Copy link
Contributor

@carbon-bot carbon-bot transferred this issue from carbon-design-system/carbon-elements May 9, 2019
@joshblack joshblack added the package: elements @carbon/elements label May 9, 2019
@chrisconnors-ibm
Copy link
Contributor Author

here's an issue to add the categories for each icon. #2672

@joshblack
Copy link
Contributor

Closing this as this work item is done 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: elements @carbon/elements
Projects
None yet
Development

No branches or pull requests

3 participants