Commit Graph

133 Commits (dev)

Author SHA1 Message Date
Alessandro Staniscia d32d334a2e Review Docker management (#1113)
* Review Docker management ( linked with #934 )

*  fix comment by @balloob

* Explicit remove of  package-lock.json

* moved on feature branch, merge docker scripts, added documetation

* Used alphine as requested by @balloob on https://github.com/home-assistant/home-assistant-polymer/pull/947 and followed the @mcspr comment https://github.com/home-assistant/home-assistant-polymer/issues/934

* Remove package-lock from gitignore, we don't use npm

* Update for new build instructions
2018-09-10 11:58:18 +02:00
Paulus Schoutsen 09f238162e
Cleanup (#1575) 2018-08-21 08:59:54 +02:00
Paulus Schoutsen 6cbca6d88a
Use webpack plugin to generate HTML (#1521)
* Use webpack plugin to generate HTML

* Generate index.html

* Remove unused packages
2018-07-26 09:30:03 +02:00
Paulus Schoutsen 90328cfc33
Add an onboarding flow (#1452)
* Add an onboarding flow

* Address comments
2018-07-17 10:05:27 +02:00
Paulus Schoutsen 890dc0512b Update translations 2018-07-02 08:52:45 -04:00
Paulus Schoutsen 4d48a63141
Further simplify build (#1256)
* Remove manual copy

* Use Webpack to create gzip versions
2018-06-04 07:06:12 -04:00
Paulus Schoutsen 8133102bcb
Re-add service worker caching (#1247)
* Re-add service worker caching

* Lint
2018-06-03 07:38:22 -04:00
Paulus Schoutsen c3d67133c2
Improve custom panel support (#1236)
* Add custom panel

* Lint

* Add reference to docs

* Use panel.config
2018-06-01 10:06:28 -04:00
Andrey a79f98efbf Add webcomponents-bundle.js.map to dev version (#1216) 2018-05-27 11:56:22 -04:00
Paulus Schoutsen f51503af4f
Write old mdi.html exactly as hass.io expects (#1213)
* Write old mdi.html exactly as hass.io expects

* Create build dir if it doesn't exist
2018-05-26 19:55:08 -04:00
Paulus Schoutsen 9393bb2fba
Include ha-iconset-svg with mdi (#1212) 2018-05-26 14:28:14 -04:00
Paulus Schoutsen 71196b9704
Load icons via JS (#1211) 2018-05-26 11:50:03 -04:00
Paulus Schoutsen 29912d1b63 Update release script 2018-05-26 08:36:02 -04:00
cdce8p 34ec3e0ae5 Fix yarn dev script (#1186)
* Fix yarn dev script

* Removed yarn dev

* Update bootstrap
2018-05-18 15:17:50 -04:00
Paulus Schoutsen bc27f854f1
More cleanup (#1185)
* More cleanup

* Set up correct urls authorize.html

* Fix polymer lint

* Remove reference to bower

* Tweak uglify settings
2018-05-17 17:51:07 -04:00
Paulus Schoutsen cb0db95abe
Build hassio panel (#1184)
* Fix hass.io panel

* Add develop scripts

* Build hassio on Travis
2018-05-16 23:03:48 -04:00
Paulus Schoutsen 23a2a479a5
Remove rollup (#1179)
* Remove rollup

* Fix build

* Add copy webpack plugin

* Touch service worker

* Remove unused ha-config-js-.js
2018-05-16 07:54:29 -04:00
Paulus Schoutsen 47642957c8 Don't run bower anymore when doing release 2018-05-15 14:14:38 -04:00
Paulus Schoutsen 646f0bb718 Stub service worker 2018-05-15 14:06:08 -04:00
Paulus Schoutsen a4afc2e37a
Polymer 3 modulize (#1154)
* Version bump to 20180510.1

* Fix hass util

* Fix translations

* Bye paper-time-input

* Add webpack config

* Add webpack to package.json

* Fix translation import

* Disable web animations polyfill bad import

* Disable importHref import

* Update webpack config to build authorize.js

* Build translations json

* Build frontend correctly

* Run eslint --fix

* Load markdown JS on demand (#1155)

* Add HTML imports (#1160)

* Fix localize (#1161)

* Fix Roboto in build (#1162)

* Load web animations polyfill (#1163)

* P3: Fix chart js (#1164)

* P3: Fix Chart JS

* Update timeline package

* P3: panel resolver (#1165)

* WIP

* Initial importing of panels

* Fix panel resolver

* Fix automation and script editor (#1166)

* Expose Polymer and Polymer.Element on window (#1167)

* Remove unused import

* eslint --fix

* Es5 build (#1168)

* Build for ES5

* Fix build_frontend

* Remove stale comment

* Migrate to use paper-material-styles (#1170)

* Send parsed date to history/logbook (#1171)

* Fork app storage behavior (#1172)

* Add paper input with type time (#1173)

* Fix authorize

* Lint

* Sort imports

* Lint

* Remove eslint-html

* Do not lint authorize.html

* Fix polymer lint

* Try chrome 62 for wct

* P3: Add patched iconset (#1175)

* Add patched iconset

* Lint

* Test with latest Chrome again

* Use less window.hassUtil

* Teporarily use my fecha fork

* Import correct intl.messageFormat

* Update wct-browser-legacy to 1.0.0

* Include polyfill in right place

* Fix IntlMessageFormat

* Fix test not having a global scope

* Rollup <_<

* Fork app-localize-behavior

* Disable wct tests

* Lint
2018-05-15 13:31:47 -04:00
Paulus Schoutsen 3b7a206cec
Add an authorize page for authentication (#1147)
* Use authorize page if auth provider

* Add webcomponent polyfill

* More fixes

* ES5 fix

* Lint

* Use redirect_uri

* upgrade uglify to fix tests?

* Update browsers used for testing
2018-05-10 14:25:36 -04:00
Adam Mills 288478978f Always run translation upload on master (#1106)
This ensures that if the master build gets cancelled when translations
change, or if any other weird situation happens, we know the
translations will be uploaded after the next build.
2018-04-18 14:11:31 -04:00
Adam Mills e719f113d9 Fix for Lokalise backend misinterpretation of keys (#1107)
The Lokalise server has a bug that the internal portion of key
references was misinterpreted as a symfony key, and was getting auto
converted by the convert placeholders feature. Since we don't use this
we're turning it off to work around the bug.
2018-04-18 14:11:03 -04:00
Paulus Schoutsen 6d547aaf21 Update release script to use twine 2018-04-17 10:17:09 -04:00
Kory Prince 209a118833 Remove extra quoting to resolve issues on macOS (#1039) 2018-03-28 16:18:48 -07:00
Kory Prince 6c2126fb5f Use build script for markdown-js.html (#1038)
* add script to build and minify markdown-js.html from npm

* update markdown-js.html from build script
2018-03-27 23:52:27 -07:00
Andrey 46a2f4fd72 Make sure packages are up to date when releasing (#1004) 2018-03-17 17:26:45 -07:00
Adam Mills 1fbad393bf
Lokalise upload fix (#976)
* Pin lokalise sceript to working version

* Include cleanups from the home-assistant scripts
2018-03-07 09:46:33 -05:00
Adam Mills 7acab579b4 Use new lokalise builtin unzip for download (#900) 2018-02-17 19:49:14 -08:00
Boyi C c6030e6edc Replace Google Charts with Chart.js (#429)
* chartjs test

* [WIP] Modified for Chart.js

* Tweaking styles ( tooltips and lines )

* Almost done
TODO:
Change tooltips to HTML tag
Improve color function

* More work on Tooltips

* Improve update logic
Fix linting

* resolve conflict

* [WIP]
Create new tooltip mode hack.
Add axis padding to top and botton to prevent axis cutoff

* TODO: cleanup

* FIXME: tooltip in history graph not working correctly
reorganize some code

* fix build problem

* Fix color and tooltip issue
Fix label max width for timeline chart

* update dep

* Fix strange color after build due to `uglify` bug with reference the minified version.
Make line chart behavior more similar to Google Charts.
Make the chart honor to `unknown` and other state by manually calculate point value.

* fix bugs

* Remove label for only one data in timeline chart.
Fix bug for infinite loop in some cases

* Add HTML legend to chart.

* Fix isSingleDevice bug due to calculation.
Add isSingleDevice property support.

* fix for lint

* Replace innerHTML code with polymer node.

* Replace tooltip with HTML code

* fix tooltip style

* move default tooltip mode to plugin

* LINTING

* fix
Move localize history data to Timeline Chart.
Fix timeline static color.
Rework on chart resize.

* Bug fix:
Chart may disappear on some case.
Timeline chart calculation issue.
Change timeline chart hidden logic.

* fix tooltip
rework for resize event

* lint

* element

* Replace `var` to `let`.
Move import and ChartJs injection code to `ha-chart-scripts.html`.

* lint: convert more let to const

* fix font
fix undef

* update bower.json

* move

* Load chart code on demand
2018-02-09 22:39:15 -08:00
Andrey b16bc88eb5 Switch to Zopfli compression (#744)
* Switch to Zopfli compression

* Lint
2017-12-22 21:12:54 -08:00
Adam Mills e0a63a2ee3
Panel translation fragments (#691)
* Move flatten to separate gulp task

* Split translation fragments into separate files

* Load translation fragments when switching panels

* Fix gulpfile lint

* Move app-location to home-assistant.html

* Compute panel navigation in home-assistant.html

* Only pass down panelUrl from home-assistant.html

* Store panelUrl on hass

* Store computed panel on hass object

* Revert "Store computed panel on hass object"

This reverts commit 0f150b1faa2b91588a432ab346821b633b349d1a.

IMO this didn't really make the code cleaner. Just wanted to see how it
would look. Keeping it here as a reverted commit in case we do want to
use it.
2017-12-05 09:12:42 -05:00
Adam Mills 8cf0c0e94d Fix build attempting to include translationMaster (#628)
* Fix build attempting to include translationMaster

* Use full gulp path to run with no extra setup
2017-11-14 20:36:46 -08:00
Paulus Schoutsen 3701683d4b
Pre-construct frontend index.html (#609)
* Pre-construct frontend index.html

* Only preload things that matter

* Fix entry point in dev mode

* Template Service worker url

* Update referenced service worker
2017-11-11 13:30:14 -08:00
Adam Mills 508b5d6d77
Minify translations downloaded from Lokalise (#611) 2017-11-11 15:33:47 -05:00
Andrey 583abedd34 Support serving ES6 JS to clients (#596)
* Support serving ES6 JS to clients

* Make es6 default dir and es5 a special dir

* Fix package building

* Fix build_frontend script
2017-11-10 09:05:37 -08:00
Adam Mills 86128d54b4 Auto deploy base translations with Travis (#599) 2017-11-09 19:15:55 -08:00
Adam Mills f81429702c
Replace existing translations on upload (#597) 2017-11-09 13:42:45 -05:00
Adam Mills 5722b6bbdb
Accept Lokalise token from environment (#598) 2017-11-08 23:59:10 -05:00
Adam Mills aa389bf206 Safety check for translations upload script (#573) 2017-11-05 20:11:12 -08:00
Adam Mills 90b80880ed Store current translations in git (#563)
* Store current translations in git

* Handle empty strings in translation downloads

* Use more consice filtering

* Skip empty keys on translation download
2017-11-04 16:44:07 -07:00
Adam Mills 6959b1849f Store language native names in git (#556)
* Don't delete the gitignore file

* Store translation native names in git
2017-11-03 21:31:22 -07:00
Adam Mills fdf2fa3d3f Migrate to Lokalise for managing translations (#555) 2017-11-03 20:34:47 -07:00
Paulus Schoutsen 7e3d3b757c Update release script 2017-10-26 22:22:42 -07:00
Paulus Schoutsen 6e90b70b0c Make script/release executable 2017-10-26 22:17:14 -07:00
Andrey 7bd7f14913 Call build from bootstrap. Allow nonfingerprinted mdi. (#476) 2017-10-26 20:26:38 -07:00
Adam Mills 29fad98754 Core POC support for polymer i18n (#227)
* Core POC support for polymer i18n

* Move translation from core.js to html

* Replace fetch with XHR

* Convert translation pipeline to gulp

* Convert from polyglot to Polymer localize

* Pass through missing keys for custom panels

* Store promise to be reused

* Use cacheFirst sw handler for translations

* Write full filenames to translationFingerprints

* Precache en translation

* Convert home-assistant-main to ES6 class

* Create a localization mixin

* Cleanup

* Add polymer tags to annotate for linter

* Rename fingerprints to translationMetadata

* Build translation native names into metadata

* Add language selection UI to sidebar

* Provide separate message namespace argument

* Store language/resources on hass object

* Store translationMetadata on hass

* Move language selector to config panel

* Temporarily hide language selector

* Small cleanups

* Use dynamic-align for more flexible layout

* Migrate to fetch API

* Only send change events for user selection events

* Update for new linting rules

* Migrate build_frontend changes
2017-10-25 18:12:23 -07:00
Paulus Schoutsen 417d8e7ed8 Consolidate frontend (#468)
* Consolidate frontend

* Remove no longer needed cd

* Get Roboto from bower_components

* Remove external dependency from update_mdi.py

* Copy leaflet assets on build time

* Tweak Dockerfile

* Create Python package

* Set zip_safe to False

* Update build scripts

* Version bump to 20171021.0

* Fix service worker

* Version bump to 20171021.2

* Update docker ignore

* Tweak Dockerfile thanks to Adam
2017-10-24 19:36:30 -07:00
Paulus Schoutsen 512b07963b Add build using polymer-build (#344)
* Add build using polymer-build

* Use bundle strategies to tweak stripExcludes

* Only vulcanize hass.io panel

* Rename hassio panel generate script

* Remove hydrolysis

* Get it all somewhat working

* Fixes

* Allow ES2015 + fix minify JS

* Clarify we need to fix service worker minify

* Move service worker template out of tasks folder

* Fix broken CSS

* Wrap it up

* Fix maps
2017-08-02 21:31:04 -07:00
Paulus Schoutsen 35c4e1d5ae ES5 cleanup 2017-07-16 22:19:02 -07:00
Paulus Schoutsen 31af2968da Log error in vulcanize.js when one is raised 2017-07-01 15:01:45 -07:00
Paulus Schoutsen c5a5f41d3c Fix hassio panel build 2017-05-19 14:54:26 -07:00
Paulus Schoutsen 44e925a9ff Load Hass.io panel from supervisor in prod 2017-05-11 23:43:19 -07:00
Paulus Schoutsen ca82a411aa Add automation editor (#275)
* Add automation editor

* Build JS before running tests

* Add browser warning

* Re-order from/to in state
2017-05-09 09:37:10 -07:00
Adam Mills 5207629e87 Add Object.assign polyfill support (#210)
* Add Object.assign polyfill support

* Remove redundant polyfill check

* Use ES6 in compatibility.js
2017-02-14 12:01:32 -08:00
Paulus Schoutsen 95cbc85b7f Revert: Always cache all panels in service worker. 2016-10-02 15:27:58 -07:00
Paulus Schoutsen 0a4454c68f Always cache all panels in service worker. 2016-09-19 23:52:44 -07:00
Paulus Schoutsen 7d32ee0912 Add optimize-js to build toolchain 2016-09-19 21:09:29 -07:00
Robbie Trencheny 8439fafb7f Clean up event types to make them more human friendly 2016-08-17 14:39:53 -07:00
Robbie Trencheny 5bb5d6800c Improve readability, add data support to callbacks, remove notification from the type 2016-08-17 14:37:08 -07:00
Robbie Trencheny b90b8f87bc Add callback support to push notifications (#90)
* Add callback support to push notifications

* Syntax fix

* Fix callbacks for initial push event

* Add JWT.

* Whoops, jwt was grabbed from the wrong spot
2016-08-16 23:57:42 -07:00
Paulus Schoutsen af4af1e933 Restructure service worker stuff 2016-08-14 00:58:40 -07:00
Paulus Schoutsen 5efe930d6c Add HTML 5 push notifcations support (#89)
* Add push notification handling to service worker

* Add push registration to sidebar

* Whitelist manifest.json

* Remove unused property

* Catch if no url specified

* Fix eslint

* Fix bug

* Fix some bugs

* More Firefox proof

* Moar fixes

* Fix semi
2016-08-14 00:31:52 -07:00
Paulus Schoutsen d7f79ff8fa Disable service worker in dev mode 2016-08-08 00:08:01 -07:00
Paulus Schoutsen 0255537ea6 Remove loading box component 2016-07-31 14:43:07 -07:00
Paulus Schoutsen 697f9397de Make local dir work again 2016-07-30 11:21:07 -07:00
Paulus Schoutsen fe6fa5cab6 Tweak vulcanize script 2016-07-23 10:02:08 -07:00
Paulus Schoutsen 22a3ecca85 Whitelist service worker url 2016-07-20 23:38:48 -07:00
Paulus Schoutsen 9239a56958 Use hydrolysis for optimal panel built size 2016-07-19 02:27:46 -07:00
Paulus Schoutsen 4029f16e97 Reorg into panels (#75) 2016-07-16 23:19:49 -07:00
Paulus Schoutsen f7ecdd9ce2 Migrate to Rollup + Buble 2016-07-13 23:04:26 -07:00
Paulus Schoutsen 7be7cf463c Update service worker script 2016-07-13 19:10:45 -07:00
Paulus Schoutsen b1b776543a Tweak dependency tree 2016-07-12 09:13:19 -07:00
Paulus Schoutsen e7ee8c54bd Defer loading of dev tools 2016-07-12 08:59:07 -07:00
Paulus Schoutsen 78c8e680b2 Extract partial map as standalone file 2016-07-12 00:09:06 -07:00
Paulus Schoutsen ec7dfb28e8 Move HA-JS to git submodule 2016-06-14 01:26:02 -07:00
Paulus Schoutsen 16e3ac15bb Experimental rollup support 2016-05-28 23:22:24 -07:00
Paulus Schoutsen 439545b4f8 Optimize loading core 2016-05-28 18:32:42 -07:00
Paulus Schoutsen 0be98873d7 Use sw-precache to generate service worker 2016-05-27 21:44:37 -07:00
Paulus Schoutsen 25a7759be0 Minify CSS 2016-05-07 08:06:21 -07:00
Paulus Schoutsen 097f85cab2 Update dependencies 2016-05-06 23:34:52 -07:00
Paulus Schoutsen d9232df18b Add local roboto 2016-04-08 00:09:52 -07:00
Paulus Schoutsen ac34b5fc26 Move minify script 2015-10-25 19:01:27 -07:00