PolymerElements / iron-iconset-svg

Represents a source of icons expressed as a collection of inline SVGs
https://www.webcomponents.org/element/PolymerElements/iron-iconset-svg
37 stars 34 forks source link

Fix IronMeta 1.x not working with iron-iconset-svg #71

Open btelles opened 7 years ago

btelles commented 7 years ago

I think the following line breaks backward compatibility with IronMeta 1.x: https://github.com/PolymerElements/iron-iconset-svg/blob/master/iron-iconset-svg.html#L176

We should be forcing IronMeta 2.x and disallowing 1.x.

See bug #69 https://github.com/PolymerElements/iron-iconset-svg/issues/69

e111077 commented 7 years ago

@bicknellr thoughts? Also @notwaldorf here's another issue with versioning :(

notwaldorf commented 7 years ago

We can't pin this to only 2.0, because this would make this element not hybrid. I think the problem is that iron-meta is not hybrid, or that its breaking changes are not taken into consideration correctly (what i mean is: paper-input stamps different templates to avoid problems with iron-input. why isn't this element doing work to work with both iron-meta versions?)

bicknellr commented 7 years ago

It looks like iron-meta 1.x doesn't really work in Polymer 2 because of two main reasons:

The combination of these two differences result in a situation where the Polymer.IronMeta constructor is safe to use in the same way both when you're running iron-meta 2.x on Polymer 2 and iron-meta 1.x on Polymer 1 but is not the same when running iron-meta 1.x on Polymer 2:

This means that if you want to support both iron-meta 1.x and 2.x running in Polymer 2 you need to work around these differences with two particular changes:

So, the intersection of the compatible API is:

bicknellr commented 7 years ago

I've opened PRs for iron-icon, iron-iconset, and iron-iconset-svg. IronValidatableBehavior and IronValidatorBehavior also look like they need to be updated if they're intended to work with both iron-meta 1.x and 2.x.

bicknellr commented 7 years ago

Just added a PR for iron-icons.

bicknellr commented 7 years ago

After mulling this over a bit, I'm not sure that what I've done in these PRs makes sense. If it's true that iron-meta 2 doesn't work in Polymer 1 with the same API, maybe we should change iron-meta's 2.x branch to indicate that it doesn't support both Polymer 1 and 2 but only 2? @cdata does that sound reasonable?