this simply should be everywhere - I see that simplicity and a lot of work behind - thx Google
@SoulMasterX7 жыл бұрын
Tagged template literal should be a killer feature that provide unimaginable potential.
@the_real_vdegenne6 жыл бұрын
One half year after this presentation and still no mixin for Polymer. Any head's up ?
@KevinSheppard7 жыл бұрын
+ve: I can finally do simple expressions in the template instead of writing a function for every little thing. -ve: DX inside an IDE could take a sharp hit... unless IDE makers like Jetbrains see this as a trend and start tweaking their code assistance and syntax highlighting to suit. After seeing it in action I'm a little more optimistic about HTML inside my JavaScript, although I've been running away from it since JSX hit the scene. Please, Polymer Team, make it great!
@g1m0kolis7 жыл бұрын
Looks very promising! I'm definitely considering using polymer now.
@skewty4 жыл бұрын
Is lit-extended another Google casualty? original seems abandoned and @acce/lit-extended version does not seem to belong to Polymer and hasn't been updated in a while.
@JustinFagnani3 жыл бұрын
The syntax in lit-extended was just folded into the main lit-html syntax. No casualty.
@ShawnBiddle7 жыл бұрын
This was exactly my fear. Now instead of just having built-in functionality of syntax highlighting/completion from my editor I need to use or write an editor plugin to do something that I should get by default because we have to shove a template inside of a string. It's not "just javascript" it's an html template inside a javascript string. You don't get html syntax highlighting inside of a javascript string "for free." I _understand_ the reasoning for these changes but that doesn't change that it's just worse usability.
@jonsmithers50337 жыл бұрын
I'm hoping that an acceptable working around is to manually change the editor's syntax highlighting to html (even though it's editing a js file).
@jonsmithers50337 жыл бұрын
there's an experimental plugin for vs code github.com/mjbvz/vscode-js-template-string-grammar-injection-example
@ShawnBiddle7 жыл бұрын
I know that there will be plugins that do this, my point was that there shouldn't be. We shouldn't be writing HTML templates inside a string. It's ridiculous. It's going back to the days of early 2000s PHP. It's like I'm taking crazy pills or devs just aren't old enough to remember that horrorshow. It's begging for files with templates build programatically with tons of concatenation and completely unreadable interpolation. If I'm writing HTML it should be in HTML. If I'm writing CSS it should be in CSS. What a novel concept.
@jonsmithers50337 жыл бұрын
Hm. I can see how a smorgasbord of languages mixed together in a single file can be disastrous. And this templating system does enable that. But there has to be some kind of interplay when your platform combines 3 separate languages (html, css, js). Maybe there will be best practices, e.g. keeping embedded js code to a minimum by referencing js functions defined elsewhere.
@socceroos1236 жыл бұрын
@Dark Magician - VIM already handles JS HTML Templates: github.com/Quramy/vim-js-pretty-template - get gud. ;)
@neoskribe89867 жыл бұрын
Has polymer 3.0 been abandoned? The github looks dead.
@mariancaikovski86385 жыл бұрын
Assigning template strings directly to innerHTML is faster than via lit-html. So what improvements does lit-html offer?
@GregorBoxall7 жыл бұрын
HTML is the common ground between developers (Javascript) and designers (CSS). Putting HTML inside Javascript brings many benefits to the developer but robs the designer of any ability to understand the structure of the resulting document.
@cat-.-3 жыл бұрын
Nonsense. Do you also rob the designers ability to understand the ui structure when your building something with swift or Java? Designers don’t design syntactic details of your ui object trees.
@cywalker20477 жыл бұрын
felt like I was watching an old Ruby On Rails run down on Views
@agentpx6 жыл бұрын
This is ReactJs + VueJs in one
@kyuwoochoi28877 жыл бұрын
Holy! Brilliant!
@GertCuykens7 жыл бұрын
Everytime Justin has a idea the whole polymer team knows their previous work on elements is going down the drain again haha :P I can imagine their faces looking at him as if he was a facebook employee. Trust met that polymer sugar extension thing was added because he was forced too :P
@hzamudio7 жыл бұрын
Press 9 key up there
@wanghailei6 жыл бұрын
:-( What a pity. This made me finally decided to leave Polymer.
@HermanWillems6 жыл бұрын
Can i ask why? Polymer 3 with Lit-html is a golden combination. Because HTML-Imports will not be there anymore you need some great templating solution inside Javascript. ES6 Template String Literals are perfect solution. Maybe, even better than html-imports and just regular tags.
@NikosKatsikanis5 жыл бұрын
@@HermanWillems why
@koredeaderele16667 жыл бұрын
Smells like React
@jhlagado16 жыл бұрын
Such a blatant copy of Andrea Giammarchi's hyperHtml library. He did it first and Google pretend that they invented it.
@HashimWarren6 жыл бұрын
he mentions hyperHTML
@cat-.-3 жыл бұрын
Lol everyone knows it’s the same as hyper html because they openly mention it and no one is pretending google invented it