These are chat archives for skatejs/skatejs

2nd
Feb 2017
Henrik Vendelbo
@thepian
Feb 02 2017 10:53
@mattdsteele I see relying on Shadow DOM as a mistake. While it will have its uses, the regular DOM and regular CSS works quite well. There are cases where you need isolations, but the proponents are exaggerating the need. Having to render inline stylesheets in all components is madness. It's just not ready for prime time.
Trey Shugart
@treshugart
Feb 02 2017 12:32

@thepian re

There are cases where you need isolations, but the proponents are exaggerating the need.

It’d be great if you could provide references to that.

also this
Having to render inline stylesheets in all components is madness. It's just not ready for prime time.
They don’t feel like substantiated arguments. For example, if you have an element that renders any content to itself, then to ensure that content doesn’t get manipulated by an external entity (i.e. framework) then you need to hide that.
A perfect example is virtual DOM frameworks. Some, upon re-rendering, will empty an element’s contents if it’s not aware of it.
Shadow DOM is absolutely imperative if you need to project content.
Inline stylesheets shouldn’t have negative performance impacts (Blink caches) and shadow DOM, due to encapsulation, can have positive impacts to performance as it’s isoloated to a subset of the DOM.
So please, if you’re going to make such arguments here, provide references.
Trey Shugart
@treshugart
Feb 02 2017 12:45
@aendrew the easiest way might be a bin? If you have specific questions happy to help. If PM if you feel more comfortable. Here’s a hello world http://jsbin.com/kawino/3. JSBin is having some unrelated errors, it seems, but that should work.
Ændrew Rininsland
@aendrew
Feb 02 2017 12:54
@treshugart Apologies, I should have been a bit more specific with my questioning. The JSBin makes sense, but it’s the whole “using ES6 classes” aspect that’s throwing me — how do I setup Babel/Webpack/etc. so it works, especially given all this? https://skatejs.gitbooks.io/skatejs/content/#transpilation-and-native-custom-element-gotchas
Trey Shugart
@treshugart
Feb 02 2017 12:55
and an example with jsx http://jsbin.com/kawino/6
Ændrew Rininsland
@aendrew
Feb 02 2017 12:55
Put another way, what exactly do I need to do in terms of polyfilling and whathaveyou if I’m wanting to use ES6 transpiled to ES5?
Trey Shugart
@treshugart
Feb 02 2017 12:55
Yeah, the whole es2015 class debacle is unfortunate.
basically, if you’re transpiling you need just skatejs-web-components
right now, there’s no es2015 skate, so you need to transpile to es5
you can consume the src, but that couples you to the specific features we’re using
skatejs/skatejs#992 is an issue for ironing that out
does that help?
Ændrew Rininsland
@aendrew
Feb 02 2017 12:58
Ahhhh… Okay, that makes a lot more sense. You need to worry about that section I linked if you’re wanting to do something like ship your components as untranspiled ES2015?
Trey Shugart
@treshugart
Feb 02 2017 12:58
yeah, which is unlikely for most use cases
but soon it won’t be
Ændrew Rininsland
@aendrew
Feb 02 2017 12:58
That makes a lot of sense — thanks!
I’d humbly suggest editing that section a bit, maybe even add a line like “If you’re using Babel or some other tool to transpile your ES2015 code to ES5, you don’t need to worry about this.” I’ve done a lot of work in the web components space but still found that section confusing enough to abandon the small bit of work I was doing with Skate and switch to Riot.
Trey Shugart
@treshugart
Feb 02 2017 13:02
Noted! I’ll update.
Any other feedback is welcome. Thx for not abandoning.
riot doesn’t actually do “web components”, though, right?
Ændrew Rininsland
@aendrew
Feb 02 2017 13:04
No worries! I’m pretty excited about Skate, it seems to solve a lot of the issues I ran into with Polymer when I was still using it at The Times. Now that I’m at the FT, components are something we’re seriously looking into (though are a bit challenging given our much more comprehensive browser support matrix). Yeah, Riot’s more of a virtual DOM-y thing.
Trey Shugart
@treshugart
Feb 02 2017 13:04
(skate is virtual DOM :))
cool, though
I’ll ping you on the PR so you can give it a review :)
Ændrew Rininsland
@aendrew
Feb 02 2017 13:06
Ah! Yeah, remember now, the Incremental DOM thing — but AFAICT it’s ultimately more forward-looking with regards to web-components than Riot or React, right?
Cheers, thanks! :D
Trey Shugart
@treshugart
Feb 02 2017 13:07
Yep. #usetheplatform :)
Polymer, but small and like React in terms of FRP.
do you think that we should highlight that issue a bit more, or did you encounter once you found that section?
Ændrew Rininsland
@aendrew
Feb 02 2017 13:10
Nah, I was just scanning through the docs trying to get started and it threw me. Felt like “Oh no, I’m about to enter the Dungeon Of Babel + Webpack Configuration once more…”, thinking I needed to do something weird with transforms or whathaveyou.
Or alternately, my other way of parsing that section was “Wait, you can’t use Babel with this?"
Trey Shugart
@treshugart
Feb 02 2017 13:12
ahh right
PR here skatejs/skatejs#1068
happy to consider rewording that
best to come from someone like yourself, though as I’m too close to the code perhaps
Ændrew Rininsland
@aendrew
Feb 02 2017 13:14
The word “native” I think is the biggest culprit. Within the webcomponents space, the idea of “native” webcomponents is a very nebulous idea (I blame Polymer; initially it was seen as just a bunch of polyfills, then it turned into practically a framework unto itself, then it split off the polyfill bits, and now it’s not entirely clear which parts are “stuff that’s either supported or about to be supported by evergreen browsers” and which parts are “crazy new-fangled Googler ideas that Apple is rather unlikely to ever implement”).
Will take a look!
Trey Shugart
@treshugart
Feb 02 2017 13:15
heh, very, very true
Ændrew Rininsland
@aendrew
Feb 02 2017 13:17
Trey Shugart
@treshugart
Feb 02 2017 13:18
thank you! Will update. It’s midnight here in Sydney, so signing off. Feel free to chime in more etc ;)
Ændrew Rininsland
@aendrew
Feb 02 2017 13:18
:+1: