GoogleChromeLabs / ui-element-samples

A collection of prototyped UI elements
https://googlechromelabs.github.io/ui-element-samples
Apache License 2.0
4.12k stars 744 forks source link

It is unclear what the compatibility is of these samples #24

Open 0xR opened 8 years ago

0xR commented 8 years ago

I am considering of using the techniques shown in these samples, but in order to do so in production I have certain compatibility requirements.

I just tried the samples in IE9 and nothing works.

It would help if the README would show in which browsers these examples would work and whether it is possible to use the techniques shown in older browsers with some tweaking.

0xR commented 8 years ago

Ps: I did run the babel transpilation, but that doesn't help much.

DanielVoogsgerd commented 8 years ago

IE11 does not support ES6 classes, so without transpiliing you might have to move to edge anyway if you want native support. The reason it doesn't work on IE9 with transpiling is (partially) because IE9 needs the ms prefix for transform.

I would be very cautious with moving these samples to production. The code is written with BEM in mind. BEM is awesome for prototyping, but might not be really what you might want in your production code.

I think that the motivation behind these elements is more to demonstrate techniques and features supported by the next generation web, than it is to craft production-ready "elements". If you want those you might want to take a look at the polymer elements.

DanielVoogsgerd commented 8 years ago

Also TouchEvents are not supported by edge.

paullewis commented 8 years ago

Right exactly what @DanielVoogsgerd said. The code is here for reference because they are live-coded, but I will definitely add a note to the README so that it's setting expectations more clearly.

github-polymer-user commented 7 years ago

@DanielVoogsgerd @0xR @paullewis @dglazkov @sethladd

For anyone willing to debug on their own lovly OS X and Safari, just add some browser polyfills:

  1. npm install bower && bower install webcompnentsjs (instuctions from http://webcomponents.org/)
  2. add <script src=""/browser/webcomponents-lite.min.js"> to the header section of the header.partial.html file
  3. add app use section app.use('/browser',express.static('./app/../bower_components/webcomponentsjs'));
  4. add extra -moz-, -webkit-, -o-webkit- CSS animation and/or html5shim.js as needed