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

Demo should have a code example on how to use vaadin-icons with iron-icon #46

Closed
Haprog opened this issue Sep 28, 2017 · 3 comments
Closed
Milestone

Comments

@Haprog
Copy link
Contributor

Haprog commented Sep 28, 2017

The demo should contain at least a small code example to show how to import the iconset and how to use it with <iron-icon>. Now it just lists the icons but there is no code shown. This is a bit weird at least when viewing via https://vaadin.com/elements/vaadin-icons/html-examples/icons-basic-demos unless you’re already familiar with iron-icon and iconsets.

@manolo
Copy link
Member

manolo commented Oct 11, 2017

we already discussed when migrating the elements, and ended deciding that code is useless.
If you take a look to the code that renders all the icons is not useful at all and confusing for the final user. The snippet element that we use does not allow to show other code (fake) than the code that renders the demo, probably you need to open an issue in the vaadin-demo-helpers so as the feature is added there.

@manolo manolo closed this as completed Oct 11, 2017
@jouni
Copy link
Member

jouni commented Oct 11, 2017

I still think the issue is valid, that we should offer the documentation/example somewhere.

The current single example is silly, as it only lists all the icons without really offering much else.

Yes, you can use the browser search to hunt for icons, but we should have a separate page where you can search the icons using the metadata provided in https://github.com/vaadin/vaadin-icons/blob/master/assets/vaadin-font-icons.json (the name of that file is a bit misleading as well, btw).

On top of that, the first example should be a single icon, with a clear code example what you need to do to use iron-icon. Then, we should have a few more examples showing how to use the raw SVG and PNG versions, and finally an example how to use the font icons.

I suppose we should open new issues for each of those.

@manolo
Copy link
Member

manolo commented Oct 11, 2017

I found a way to target basic demo and searchable list in the same page.
I think it would work in the site, @Haprog could you test that branch in the site ?

@manolo manolo added in review and removed ⭐️ labels Oct 12, 2017
@manolo manolo removed the in review label Oct 12, 2017
@manolo manolo added this to the v1.4.3 milestone Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants