-
Notifications
You must be signed in to change notification settings - Fork 795
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
[icon library] - add react icon names and download functionality to icon cards #766
Comments
I'll take this, the hold up on this previously was how we want to display it: tooltip vs button that copies to clipboard etc. |
Ideally we'd have an overflow menu that would present:
We could also have the icons themselves be clickable to copy the React code (our preferred implementation) |
@joshblack which size would it make sense to have copied here do you think? Maybe this would be a good time to implement the |
@vpicone my hunch would be 16 or 20, icons in a broader sense should be revisited so that we could do things like what you're suggesting. If we want to, we could expose the module base name (like For icon packages, most likely we'll want to only expose React as Angular/Vue do not have active attention dedicated to them (in fact Angular hasn't been published in the previous minors due to build issues) |
@joshblack that makes sense, I think the only other thing we'd want is a |
We do not want to provide a way to easily download SVGs from the icon page. This leads to orphaned icons in product endpoints that never catch iterations or updates. |
How did we want to handle SVG downloads for presentations? I think that's one case that did come up recently for wanting to download them. |
We could provide code snippets to call them from our packages, and maybe their menu path in the Sketch kit, but not do things that make it super easy for teams to do things we actively should be discouraging (SVG downloads).
This is more of a pictograms use case, so maybe we do something different there. but the net is for a preso you can get them all from the repo as part of the package or you can dl the illustrator master file. |
if you need just one from the repo, the raw button gets you https://raw.githubusercontent.com/carbon-design-system/carbon/master/packages/icons/svg/32/badge.svg |
to summarize - no raw or download svg from the icon cards or pages please |
I think this is a must for pictograms. It’s a weekly request and even from my boss Terry and some other executives. They do not want to poke around in GitHub. I’s also extend this functionality to UI icons as the same request comes up there as well but less frequent. Not all people use Sketch or even understand GitHub for that matter but want to use and have access to individual icons. Holding them sacred also pushes people to do worse shit that I’ve seen equally or more distasteful. Let’s please proceed with this. I understand the downsides but the entire team and a very large number of users will appreciate this. |
So if i wasn’t clear. Please execute this issue. |
If we do this for icons we will encourage people to do the easy thing (grab the SVG/DL the icon) rather than the right thing (access our icons via the packages, or the design kits) and the FIRST PERSON to notice and complain about teams using an icon we've iterated on in their applications (think: copy icon) will be you, @mjabbink. And you're going to be complaining a lot more then because they will never, ever, track down that SVG code and fix it. We've already (and always) said "make direct DL possible for pictograms, because orphaning them doesn't matter", so please by all means add direct dl to these cards: https://www.carbondesignsystem.com/guidelines/pictograms/library …but that should probably be a separate issue. Up to you all. I suspect @designertyler has a spec for these types of functionality. |
We should add a link somewhere to the .ai master file in the repo: https://github.com/carbon-design-system/carbon/blob/master/packages/icons/master/ui-icon-master.ai |
I’m more inclined to this for Pictograms. I’m not so sure holding back on icons is a real preventative measure against poor behavior. I also do not foresee adjustments to icons. I see new ones being added as we do plenty of that but date we have not modified many icons over the past year. Unless you consider the 16px ones you and Conrad did. I would be fine with first releasing this functionality with pictograms then icons later to test the waters. |
While encouraging people to use icons through the Sketch library works if you're a Sketch user its starting to not scale as we introduce other tools, like Axure and Adobe XD. Right now the icons aren't available in those tools and accessing them from the website is easier than having to have a second tool (Sketch) or getting them from GitHub which many designers are uncomfortable with outside of issue creation. Sketch licenses are also hard to come by outside of design. Not using the icon symbol in Sketch is the same as detaching a symbol, it only really hurts the person that does it. I think accommodating for these other usages by adding the download to the website will be more helpful than worrying about people not using the Sketch library. |
I tried to summarize the requirements mentioned here so we can generate design specs. Let me know if we're missing any or if some should be a phase 1 or phase 2, 3, 4, etc. Requirement 1: Add react icon names to icon card Requirement 1.2: Add angular icon names to icon card (?) Requirement 2: Enable direct download for pictograms Requirement 2.2: Enable bulk download for pictograms Requirement 3: Inform the preferred method to get icon assets Requirement 4: Enable direct download for icons Requirement 4.2: Enable bulk download for icons Requirement 5: Icon assets for non-Sketch users |
Please proceed with issue defined above. Meaning direct download and copy for both icons and Pictograms |
Just a heads up @vpicone I'm updating our icon metadata structure to make it easier to parse for different meta fields, let me know if you want to sync up on this work 👍 |
@joshblack sounds good, a list of changes would suffice! we do the flattening of the metadata ourselves at run time at the moment. Downloading svg icons and pictograms is a real use case, linking to the master file isn't a solution for things like keynote/powerpoint/non-sketch design tools. Not sure why pictograms and icons would be treated different. |
@designertyler Requirement 4 and 5 seem the same. Icons and Pictograms are treated very similarly by the website so realistically things would be added in tandem. |
@joshblack the biggest complaint for me is the sizes in the icon names at this point. I feel like a bit of a broken record for saying this, but these are scaleable vector graphics, they shouldn’t be bespoke sprites at individual sizes. It’s not a blocker since we can always change what’s copied. However, having the copied code read I get that we had weird bespoke size constraints, but out of the dozen or so icon libraries in react I don’t see others taking this approach. It just really feels like what should be a prop encoded in the component name. It causes issues with bundle size to boot. We should be accommodating the least common denominator of treeshaking. By exporting 4X the number of icons we need to be, ineffective treeshaking results in bombing bundle size. Opened: carbon-design-system/carbon#5170 |
@vpicone I'm pretty sure we would need to constrain icon size no matter what, e.g. some assets will need to be used in a 16px context or some in a 20px context. This was the basis for the icon size tokens we explored end of last year. I believe the knowledge of when to use which is communicated between dev and design.
The library is setup to be tree-shaken and one can confirm this in a fresh install of CRA. Times when this deopts are due to bundler config/settings/versions. If you have steps to show how this deopts let me know 👍
I think one goal of the project would be to only maintain one asset per icon. What was observed was that certain assets rendered poorly on a wide breadth of devices/screens when drawn on 16px artboards. I believe this is what caused the situation that we have today. Could you share how this problem could be addressed? |
blocked by carbon-design-system/carbon#5170 |
@designertyler it looked like you were about to drop a 🔥 spec for this. @laurenmrice did you have something for it? |
Can’t we assume </> will work in Carbon site? |
@mjabbink - I am referring to the search and filter controls. |
I think in a meeting I wasn't part of @vpicone @jeanservaas maybe others thought if we use the react icon people won't be surprised that what they got was react code. I was ok with |
I’m ok with </> and prefer it over react atom unless that is really more clear. |
Also we went UI icons to be clear since we have several types of iconography. UI icons, app icons and Pictograms |
this behavior not present @ preview
|
I think now that it has been deployed any outstanding issues or bugs need to be opened in a new issue. |
This is meant for IDL as well and Pictograms |
[the issue that will never be closed] FYI this is the carbon-website repo, it may need to be moved or a new issue opened for IDL. |
@mjabbink the PR you just closed in IDL is adding them there (carbon-design-system/design-language-website#439) Pictograms were included in the initial PR and are currently live: https://www.carbondesignsystem.com/guidelines/pictograms/library |
I thought Pictograms (IDL and CDS) and Icon cards (IDL) were only supposed to get the DL button: |
@chrisconnors-ibm Yes, download button for those only |
@mjabbink @chrisconnors-ibm It seems like pictograms would be more requested for use in keynote/outside of our libraries. Is there a reason we wouldn't want folks to download it? |
@vpicone yes, pictograms and icons are to have download functionality |
The question is whether either IDL Pictogram cards or IDL Icon Cards get the code @aagonzales suggested leaving the code |
go for it. |
I thought that saying DL only for icons and pictograms was clear. But if you all think </> is useful in Idl for pictograms then do it. I was thinking it was not but I based that on my own opinion only. |
Could have both really even if the </> is hardly ever used. |
@chrisconnors-ibm we have the @mjabbink Right now CDS has both buttons for both libraries, IDL has just download for both libraries. Is that not the intent? |
We can have the libraries be identical I guess. Not harm to have copy code in IDL and I’m all for making them be exactly the same. So strike what I said earlier to be just DL function only. I’m with the other old man. |
Summary
Icon library page currently only shows the regular name for icons, but we don't have anywhere that lists icons according to their
icons-react
name. i.e.Misuse24
CheckmarkFilled24
, etc.Desired outcome
overflow menu allowing "export of icons"
cc: @joshblack
The text was updated successfully, but these errors were encountered: