Open nicolasr75 opened 7 years ago
@nicolasr75 Polymer 2.0 has this hybrid element feature that would ease the transition and make possible the use of 1.x elements in the 2.0 runtime. It would be interesting to give a try with the code asis. Nevertheless, please feel free to PR the 2.0 implementation.
See https://www.polymer-project.org/2.0/docs/devguide/hybrid-elements
@vpusher Ok, I gave it a try but only locally, no PR yet (actually I'm not yet that experienced with GitHub and would have to learn how to do PRs etc.).
I think I have converted everything successfully except for the actions menu. The problem is that there currently is no hybrid mode version of paper-menu. Have a look here:
https://github.com/PolymerElements/paper-menu/issues/110
What do you think?
Btw, I have not yet tested paper-tree in hybrid mode.
@nicolasr75 so let's wait for Polymer 2 first release.
@vpusher paper-menu is declared deprecated https://github.com/PolymerElements/paper-menu/pull/112#issuecomment-294560068
Then we should move to paper-listbox
I would really like to understand how (hopefully with examples) to use paper-listbox
in place of paper-menu
, because it looks like the paper-listbox
repository didn't get the memo about it being a replacement for paper-menu
- see, for example, https://github.com/PolymerElements/paper-listbox/issues/7
@guss77 From the <paper-menu-button>
README:
<paper-menu-button>
<paper-icon-button icon="menu" slot="dropdown-trigger"></paper-icon-button>
<paper-listbox slot="dropdown-content">
<paper-item>Share</paper-item>
<paper-item>Settings</paper-item>
<paper-item>Help</paper-item>
</paper-listbox>
</paper-menu-button>
I tried to use this in my 2.0 project and ran into all sorts of issues. But I don't think they are too much to sort out. To my untrained eye it looked like it mostly had to do with moving to app-layout.
You may want to try my fork for 2.0 (the preview 2.0 branch!) https://github.com/nicolasr75/paper-tree This is incomplete though! It does not yet support the actions menu and I have not tested it thoroughly.
Thanks and I will do that :)
The problem I am having with both versions is that when I install paper-menu it asks me to select versions of about 3 or 4 other dependencies and I never know which to choose so I just choose the latest. Then when it finishes installing my app is all messed up. I have to reinstall all my bower components except paper-menu.
Where does the dependency on paper-menu come from in your project? Since the Polymer team is not going to port paper-menu to 2.0 I did not include it in my 2.0 preview in the first place (that's why the actions menu is currently missing).
Ugh I downloaded wrong branch...
Hello, great work! Are there any plans to port this to 2.0? I am not an expert but from looking at the code and Polymers upgrade guide there seems not to be too much to change.
Or is it usable in Polymer 2.0 as it is? I think I can not simply get it via bower because of the 1.* dependencies which conflict with my 2.0 project.
Nicolas