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

Remove iron-icon import from vaadin-icons.html #72

Closed
web-padawan opened this issue Feb 27, 2019 · 4 comments
Closed

Remove iron-icon import from vaadin-icons.html #72

web-padawan opened this issue Feb 27, 2019 · 4 comments
Assignees

Comments

@web-padawan
Copy link
Member

Motivation based on the internal discussion:

When doing lazy asynchronous imports, if you try to use some iconset before it was loaded/defined, it won't update iron-icon after the iconset is ready. We have a special bundle for icons on the website, with the import of iron-icons as the last one. But I cannot add vaadin-icons there for the reason above

We can still keep iron-icon as a dependency for backwards compatibility, and even have a separate file importing it as well, in order to avoid breaking change.

@jouni
Copy link
Member

jouni commented Feb 28, 2019

The same should be done for https://github.com/vaadin/vaadin-lumo-styles/blob/master/icons.html#L3, right?

@web-padawan
Copy link
Member Author

Yes, I would prefer us having these aligned.

@tomivirkki tomivirkki added the needs triage Has to be triaged by the team label Mar 4, 2019
@Haprog Haprog self-assigned this Mar 13, 2019
@Haprog
Copy link
Contributor

Haprog commented Mar 13, 2019

I guess we could extract the actual iconset definition from e.g. vaadin-icons.html into a new file (e.g. vaadin-iconset.html or just iconset.html) which could be imported in vaadin-icons.html to keep vaadin-icons.html working as before without breaking changes, but this would make it possible to import just the new iconset file without getting the iron-icon dependency.

If we go with the name iconset.html, that file would contain:

<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
<iron-iconset-svg name="vaadin" size="16">
...
</iron-iconset-svg>

And then vaadin-icons.html would basically just contain:

<link rel="import" href="../iron-icon/iron-icon.html">
<link rel="import" href="iconset.html">

(plus some comments that the file now has)

Any comments @jouni @web-padawan?

And then similar change in vaadin-lumo-styles for the lumo icons.

@upstairlounge upstairlounge added in progress and removed needs triage Has to be triaged by the team labels Mar 14, 2019
Haprog added a commit that referenced this issue Mar 15, 2019
Split iconset definition from vaadin-icons.html into new iconset.html (which is then imported in vaadin-icons.html).
This makes it so importing vaadin-icons.html works as before (and includes import of iron-icon) to maintain backwards compatibility, but now the developer also has the option to import the iconset without the iron-icon dependency by importing iconset.html directly. This is useful in some cases like when doing lazy asynchronous imports.

Fixes #72
@samie
Copy link
Member

samie commented Mar 18, 2019

Screenshot 2019-03-18 at 15 58 00

web-padawan pushed a commit that referenced this issue Mar 18, 2019
Split iconset definition from vaadin-icons.html into new iconset.html (which is then imported in vaadin-icons.html).
This makes it so importing vaadin-icons.html works as before (and includes import of iron-icon) to maintain backwards compatibility, but now the developer also has the option to import the iconset without the iron-icon dependency by importing iconset.html directly. This is useful in some cases like when doing lazy asynchronous imports.

Fixes #72
web-padawan pushed a commit to vaadin/web-components that referenced this issue Mar 3, 2021
vaadin/vaadin-icons#76

Split iconset definition from vaadin-icons.html into new iconset.html (which is then imported in vaadin-icons.html).
This makes it so importing vaadin-icons.html works as before (and includes import of iron-icon) to maintain backwards compatibility, but now the developer also has the option to import the iconset without the iron-icon dependency by importing iconset.html directly. This is useful in some cases like when doing lazy asynchronous imports.

Fixes: vaadin/vaadin-icons#72
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

6 participants