handsontable / hot-table

Handsontable - Best Data Grid Web Component with Spreadsheet Look and Feel.
http://handsontable.github.io/hot-table/
MIT License
130 stars 36 forks source link

HTML imports deprecated: rewrite for Polymer 3 using ES modules and npm #54

Open pzingg opened 5 years ago

pzingg commented 5 years ago

The use of Bower and HTML Imports in this repository is already causing usability problems for me.

HTML Imports are deprecated in Chrome M70, and will be removed in M73, around April 2019. https://www.chromestatus.com/feature/5144752345317376

HTML Imports were never implemented in Firefox, and require polyfills.

The latest version of webcomponentsjs says, "The HTML Imports polyfill has been removed. Given that ES modules have shipped in most browsers, the expectation is that web components code will be loaded via ES modules."

And finally, Polymer version 3 is abandoning HTML imports, and using ES modules instead: https://www.linkedin.com/pulse/writing-web-components-from-future-polymer-3-rafa-bernad

I am really a novice at Web Components, but is this an easy migration?

pzingg commented 5 years ago

I guess the other thing to mention is that the current version seems to require the Custom Elements v0 polyfill (webcomponentsjs version 0.7.24 or earlier). I think at a minimum, the code here should work with the more stable and accepted Custom Elements v1 API and polyfill.

I also found that handsontable itself will not compile with the Polymer 3 CLI ("polymer serve") because of missing "default export" clauses and external dependencies that aren't ES-module conformant, like pikaday...

AMBudnik commented 5 years ago

Thank you for sharing the proposition and tracking down the changes that are needed to update the project to Polymer 3. That would surely benefit us all. We haven't had time to update it yet, but as our CTO says

web components are the future

so I believe that we will be able to get our hands on that subject in 2019.