googlearchive / polyup

A helpful assistant for migrating from Polymer v0.5 to 1.0. Does many of the boring mechanical parts for you.
http://polymerlabs.github.io/polyup/
BSD 3-Clause "New" or "Revised" License
38 stars 9 forks source link

PolyUp should recognize core-drawer-toggle and convert to paper-drawer-toggle #70

Closed barakhub closed 9 years ago

barakhub commented 9 years ago

The core-drawer-toggle is handy in a core-drawer-panel, and should be converted accordingly to paper-drawer-toggle in Polymer 1.0.

rictic commented 9 years ago

Thanks for the bug report! I'll look into it.

rictic commented 9 years ago

Hm, I'm unable to reproduce this. The core layout elements seem to upgrade just fine as far as I can tell. For example, polyup transforms this file into this.

Is it possible that you're using an older version? If there's something about the element in particular that wasn't upgraded that you expected it to, let me know.

barakhub commented 9 years ago

Apparently, I wasn't clear in my bug report. What's missing in the PolyUp conversion is not covered by the example you provided. Assume the following in your example: <paper-icon-button id="navicon" icon="menu" core-drawer-toggle></paper-icon-button> (I only added the core-drawer-toggle attribute)

This should be converted to: <paper-icon-button id="navicon" icon="menu" paper-drawer-toggle></paper-icon-button>

If that's the case, the addEventListener code is not needed, as the drawer panel handles that automatically. This is what's missing from PolyUp.