googlearchive / paper-menu

A Material Design menu
https://www.webcomponents.org/element/PolymerElements/paper-menu
27 stars 48 forks source link

Paper-menu compatibility with Polymer 2 #110

Closed dhrytsenko closed 7 years ago

dhrytsenko commented 7 years ago

Hi. I want to test my custom element with Polymer 2 and I use paper-menu. But now paper-menu does not have hybrid mode for it. Do you have a plan to add this functionality in a few days or I can do it for you?

mattes commented 7 years ago

There is branch _auto_generated_v2_preview, but that doesn't work for me, yet.

myfrom commented 7 years ago

We can use paper-listbox for now, it has got 2.0-preview and similar functionality

dhrytsenko commented 7 years ago

@Witus13 thanks!

govis commented 7 years ago

would like to see it ported to Polymer 2.0 as well, using paper-submenu, so paper-listbox is not enough. Thanks.

goldenbearkin commented 7 years ago

The Polymer web, App Toolbox -> Responsive app layout, under version 2.0 even use paper-menu for its drawer example, but v2 turn out to be not supported.

NicolasRannou commented 7 years ago

+1

hwakkaf commented 7 years ago

paper-menu.zip Hi, This is a modified version of paper-menu compatible with polymer 2.0, please take a look to the demo for usage change where solts mus be used instead of classes.

hwakkaf commented 7 years ago

paper-menu.zip Hi, Sorry, but i forgot to change shared styles. this is the latest modified version.

NicolasRannou commented 7 years ago

@hwakkaf do you have a fork or a pull request? Nobody is gonna check the zip file.

hwakkaf commented 7 years ago

I forked to hwakkaf/paper-menu and sent a pull request

guss77 commented 7 years ago

@hwakkaf - I saw your pull request, but it was derailed because you need to sign the CLA before your pull request can continue.

I'd appreciate it if you can compete that, as I'd really like to use your fixed version :-)

YvanDaSilva commented 7 years ago

Hello everyone, I pushed a pull request with the entire changes required for Polymer 2.0 (Hybrid mode). You can try the tests for yourself (polymer test && polymer lint) it will work perfectly fine.

chrome 57 [1.x]          Tests passed
chrome 57                Tests passed
firefox 52 [1.x]         Tests passed
firefox 52               Tests passed
Test run ended with great success

chrome 57 (14/0/0)                      chrome 57 [1.x] (14/0/0)
firefox 52 (14/0/0)                     firefox 52 [1.x] (14/0/0)
myfrom commented 7 years ago

@YvanDaSilva try installing polymer-cli@next instead of stable version

YvanDaSilva commented 7 years ago

@Witus13 That is what I did. However there still seems to be issues with travis cli. I guess the rendering happens differently on their tests because it clearly doesn't wait for action to finish to test the elements styles. I haven't find any documentation on this. "iron-menu-behavior" only raises a few events which I have already tried and use whenever possible to be sure that the element is ready to be queried.

Let me know if you have another input

myfrom commented 7 years ago

@YvanDaSilva I don't have my computer nearby now so I can't check it. Have you tried Polymer.RenderStatus.afterNextRender?

clark-stevenson commented 7 years ago

Hey guys! Sorry to be annoying I am new 👍

I need some kind of sub menu, my first thoughts were this paper-menu because I had seen paper-submenu and all seemed OK.

Bare with me, from what I gather, this paper-menu is deprecated.

  1. Is it possible to put this in the Readme for 2?

So that means paper-submenu is gone with it.

I looked at paper-listbox but it doesn't appear to be the same as what was offered here, in particular, I don't see any type of "Sub Menu" support. Someone also mentioned iron-collapse but this is going off the trail into the wilderness for me.

So is there actually an alternative that exists which mimics this element in V2? If not, how come the depreciation? As a newbie, I would rather see @YvanDaSilva work Committed under a depreciation notice until someone far more intelligent than me creates an alternative solution.

YvanDaSilva commented 7 years ago

@clark-stevenson Have a look at : https://github.com/YvanDaSilva/sublistbox-gist @dhrytsenko @guss77 Sorry I couldn't answer sooner, I have been very busy. Hope this will help you, or at least will show you how to do it on your own.

clark-stevenson commented 7 years ago

@YvanDaSilva you are the man! I will take a look at this tonight. I had already decided to give up on the Drawer but hope I can salvage it with your sample, at least to get onto the right path. Thanks for this, especially since I appreciate you don't have much time at the moment. 👍

jukbot commented 7 years ago

Is this element deprecated ?

esd100 commented 7 years ago

Fudge! Why is paper-menu being neglected! Have to redesign the whole page now!

BorntraegerMarc commented 7 years ago

FYI: to sum up from @notwaldorf : This element is deprecated in favor of paper-listbox, which has been ported already to Polymer 2.0. This issue can be closed...

notwaldorf commented 7 years ago

@esd100 the paper-listbox api is almost identical to paper-menu, you shouldn't have a problem upgrading

NicolasRannou commented 7 years ago

@notwaldorf I think the only reason people still want to use paper-menu is for the convenience of already having the submenu built in - do you think paper-listbox would consider pull requests for this feature?

aaroncadillac commented 6 years ago

Can use https://www.webcomponents.org/element/oyeharry/app-menu