PolymerElements / iron-overlay-behavior

Makes an element an overlay with an optional backdrop
41 stars 71 forks source link

Fix modulizer #279

Closed e111077 closed 6 years ago

e111077 commented 6 years ago

Ignore the million commits, I had to commit to run modulizer; I'm going to have to squash them.

iron-scroll-manager.html

Added a declaration for _boundScrollHandler as modulizer does not play nice with namespaces and runs in strict mode.

Modulizer cannot work with getters in namespaces. It converts them to functions, so to keep backwards compatibility, I had to create a getCurrentLockingElement function.

I had to wrap the .bind(this) in a try catch because modulizer would get rid of the Polymer. IronScrollManager namespace, but would replace the this in the bind with Polymer. IronScrollManager which would always fail. I could not get around this; it looks like modulizer would read the closure.

test/iron-overlay-behavior.html

I added some vars for strict mode

everything else

I added commas to the end of each property definition in the properties block so it looks nicer formatted with clang-format

e111077 commented 6 years ago

I reverted the try catch. I was given the 👍 to fix this after modulization, but I still need the other fixes in there (delclaring variables)

e111077 commented 6 years ago

also we need to give fixing this element priority as it's blocking Kamino

e111077 commented 6 years ago

Looks like we're going to fix it in modulizer and when in namespace that uses this in a function to transform it to undefined instead. For now we're gonna have to do it manually

e111077 commented 6 years ago

Travis might be test thrashing still

e111077 commented 6 years ago

we will have to just manually remove the bind when we run modulizer pass so it's more of a modulizer issue than a iron-overlay-behavior.

relevant issue is Polymer/polymer-modulizer#345

e111077 commented 6 years ago

Tests pass locally