Closed Bug 1053034 Opened 10 years ago Closed 10 years ago

Convert components to use multi-line strings

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S3 (29aug)

People

(Reporter: kgrandon, Assigned: kgrandon)

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

46 bytes, text/x-github-pull-request
wilsonpage
: review+
Details | Review
Multi-line strings just landed and this should clean up our javascript quite a bit. Let's try using them in components as a PoC.
Attached file Github pull request
We need JSHint to allow both single quotes and TemplateLiterals, or we get an error: Strings must use singlequote. (ERROR)

I've filed an issue here: https://github.com/jshint/jshint/issues/1797
Whiteboard: [systemsfe]
Comment on attachment 8472092 [details] [review]
Github pull request

This is exciting, we get to use mutli-line template literals now, woot.

Wilson or Doug - could either of you spend some time to review this? I'd like to start introducing TemplateLiterals to gaia, and web components make sense as a good first start.
Attachment #8472092 - Flags: review?(wilsonpage)
Comment on attachment 8472092 [details] [review]
Github pull request

Looks sweet! Would it now make sense just to bundle our CSS into the template too, like an html-import? Would avoid all the issues we have with the current `@import()` hackiness.

My only concern here is that our components will only work in ES6 engines. I guess if need, be we could transpile an ES5 version is there was demand.
Attachment #8472092 - Flags: review?(wilsonpage) → review+
(In reply to Wilson Page [:wilsonpage] from comment #4)
> Looks sweet! Would it now make sense just to bundle our CSS into the
> template too, like an html-import? Would avoid all the issues we have with
> the current `@import()` hackiness.

Thanks for the review. I would prefer to keep the CSS inside of css files for syntax goodness personally, but we can explore it as an option.
Master: https://github.com/mozilla-b2g/gaia/commit/216dc181604f3e7ad2d103e130c814836ebe0d0c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S3 (29aug)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: