paper-tree icon indicating copy to clipboard operation
paper-tree copied to clipboard

Polymer 2.0

Open nicolasr75 opened this issue 8 years ago • 13 comments

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

nicolasr75 avatar Mar 22 '17 13:03 nicolasr75

@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 avatar Mar 27 '17 14:03 vpusher

@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 avatar Mar 29 '17 15:03 nicolasr75

@nicolasr75 so let's wait for Polymer 2 first release.

vpusher avatar Mar 29 '17 16:03 vpusher

@vpusher paper-menu is declared deprecated https://github.com/PolymerElements/paper-menu/pull/112#issuecomment-294560068

nicolasr75 avatar Apr 17 '17 19:04 nicolasr75

Then we should move to paper-listbox

vpusher avatar Apr 18 '17 13:04 vpusher

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 avatar Apr 18 '17 16:04 guss77

@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>

vpusher avatar Apr 18 '17 16:04 vpusher

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.

chisholmd avatar Jul 23 '17 21:07 chisholmd

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.

nicolasr75 avatar Jul 23 '17 22:07 nicolasr75

Thanks and I will do that :)

chisholmd avatar Jul 23 '17 22:07 chisholmd

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.

chisholmd avatar Jul 23 '17 22:07 chisholmd

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).

nicolasr75 avatar Jul 23 '17 22:07 nicolasr75

Ugh I downloaded wrong branch...

chisholmd avatar Jul 24 '17 04:07 chisholmd