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

Reevaluation of next-generation component rewrite #5231

Closed
ergo opened this issue May 13, 2018 · 8 comments
Closed

Reevaluation of next-generation component rewrite #5231

ergo opened this issue May 13, 2018 · 8 comments
Labels

Comments

@ergo
Copy link

ergo commented May 13, 2018

Hello,

I'm migrating my project to polymer 3.x and lit-html. While this went smoothly it quickly got apparent to me that providing next generation material design components is not the whole picture. Some things like iron-ajax can be painlessly replaced by fetch api and whatnot.

However some very handy elements like iron-form, *ally*, iron-resizable-behavior, iron-collapse, iron-list and many others are still very handy in application development.

@sorvell, @graynorton, @notwaldorf are there any chances we see some of those reworked to not depend on polymer base class? Or maybe we can have a discussion about what alternatives we have for iron-* element catalog (Community alternatives? Do we have solutions that work well with web components?). While I love the speed and ability to use expressions, the size advantage of lit-element is quickly mitigated by importing any of old elements and it gets hard to avoid using any of those at all right now.

@petecarapetyan
Copy link

For those of us who do not yet have intimate knowledge of every nit such as ^^ iron-ajax vs fetch API, the above discussion also lends itself to a tabular side by side comparison for the sum total of all such features, else we end up in an infinite loop of slack conversations about migrations from one to the other in piecemeal fashion.

@Buslowicz
Copy link

About alternatives, for iron-resizable-behavior I'd suggest playing with ResizeObserver (there are polyfills and ponyfills already available). This API is much more powerful than iron-resizable-behavior and will be much much more useful with web components. A demo I made is available here: https://codepen.io/Draccoz/pen/eVKooB/
For iron-list there is a repeat directive (https://github.com/Polymer/lit-html/blob/master/src/lib/repeat.ts), just I haven't played with it, not sure if it's up-to-date and I think it has less features (serves just as a virtual scroll).
As to iron-collapse it's very easy to do it. Just toggle a target class on handler click, all done with expressions, should be fairly easy to just toggle a class.
If I had a bit more time, I would make helpers for it, just time is a rarity for me atm :(.

@kevinpschaaf kevinpschaaf modified the milestone: Q1 May 17, 2018
@mercmobily
Copy link

I added an issue and then noticed this one... #5240

@davidmaxwaterman
Copy link

Some things like iron-ajax can be painlessly replaced by fetch api

NB, fetch doesn't replace all aspects of iron-ajax/xhr - iinm, there's still no way to get progress using fetch, for example - yet:
whatwg/fetch#607

@Buslowicz
Copy link

If you need more fine-grained control over the request/response, you can use XMLHttpRequest straight ;). This is way too easy to replace :P.
I do agree however about the importance of iron-form and iron-list (was mistaken about the repeat directive).

@sebs
Copy link

sebs commented May 22, 2018

State in my case:

  • iron ajax was already about to be replaced with a diy component swagger-api client. I am happy about this change, but Iron ajax is not that bad if used. I have tried it and it works in the current state
  • You 2.x component catalogue will get a big overhaul.
    • make sure you check a 3.0 rewrite based on mwc-* and lit-element
    • You want clean, and not transformed 3.0 components
  • 3rd party start to replace these elements. They are anyway CLA Blocked, so not everyone wanats to help google amass IP ;)
  • anything in the @Polymer range, considering element repositories and bugtrackers, is really not handled apart from important things. And as much as we like to use ready made things, I guess its time to get our sitting tools (asses) up and start doing what is mostly cleanup and grunt work
  • I guess its improtant to understand the poylmer developer team seems not to have unlimited size, so any inquiry here seems to have impact on other ressources

My decision: Use iron-* as needed, in the 3.0 repos (which install fine btw) and replace anything paper. bundle sizes and interop thank me. A lit-element seems to have a very small base of polyfills etc so this is another decision: if possible use lit elements

@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2020
@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants