PolymerElements / app-pouchdb

Custom Elements for working with PouchDB.
49 stars 27 forks source link

Remove platinum sw #50

Closed e111077 closed 7 years ago

e111077 commented 7 years ago

Removed platinum-sw so that this element can actually run Polymer 2.0.0. Also fixes some bower resolutions errors. Needs PolymerLabs/note-app-elements#13

FluorescentHallucinogen commented 7 years ago

@e111077 No plans to update platinum-sw to Polymer 2.0?

e111077 commented 7 years ago

@FluorescentHallucinogen platinum-sw is deprecated. Regardless, we do have a 2.0-preview hybrid branch open for it, but it introduces a large breaking change. A lot of the issues stem from the fact that it should just not have been an element in the first place.

FluorescentHallucinogen commented 7 years ago

@e111077 I believe that removing platinum-sw is a temporary solution, bacause it breaks the whole “There's an element for that” idea.

e111077 commented 7 years ago

I don't believe that this is a temporary solution; this element does not need Dom declaration or data binding. Also, there is a performance hit for registering an element as an HTML element has extra properties and features that are not necessary for registering a service worker. If anything, this can simply be a class Oro a simple set of functions as in the sw-toolbox repo (which is replacing platinum-sw)

FluorescentHallucinogen commented 7 years ago

@e111077 Shouldn't <link rel="import" href="../../platinum-sw/platinum-sw-elements.html"> be removed from line 41 of demo/index.html file too?

FluorescentHallucinogen commented 7 years ago

@e111077 What about install the service worker declaratively?

<link rel="serviceworker" href="../sw-import.js" scope="../">
e111077 commented 7 years ago

I don't believe that it will add too much value since it's only ~10 lines.