PolymerElements / paper-toolbar

A Material Design toolbar/appbar
https://www.webcomponents.org/element/PolymerElements/paper-toolbar
40 stars 41 forks source link

Information about the deprecation of the paper-toolbar. #107

Closed rene-lindner-isw closed 7 years ago

rene-lindner-isw commented 7 years ago

Description

Sorry for opening an issue for this, but i haven't received any feedback in the google group for the last two weeks, and i would really need some infos on this. https://groups.google.com/forum/#!topic/polymer-dev/_4BYY_MzHQc

As far as i understood the app-layout elements they were introduced as non-material-design alternatives for the paper-elements, so they are no MD elements.

Some information on that topic would be highly appreciated.

frankiefu commented 7 years ago

@rene-lindner-isw We tried to avoid using media queries inside layout elements because they can be used in many places and for different purposes. I'd recommend using media queries from outside the element. For example,

@media (max-width: 600px) {
  app-toolbar {
    height: 56px;
    padding: 0 8px;
  }
}

This should be all you need to get app-toolbar responsive follows MD spec. We are also working on adding MD Responsive Toolbar pattern and the source.

As with paper-toolbar, there is going to be paper-toolbar 2.0 release but I'd suggest to just start using app-layout since paper-toolbar is going to be deprecated. And if you have any issues using app layout elements please file them in github and we will try to address them.

HTH.

rene-lindner-isw commented 7 years ago

That makes sense, thanks for your feedback!

rene-lindner-isw commented 7 years ago

Just tried to build something like this https://storage.googleapis.com/material-design/publish/material_v_11/assets/0Bzhp5Z4wHba3NERlZTZ0MFRJekE/layout_structure_sidenav_structure4.png for our app, but it takes quite some styling, since multiple rows are not supported by the app-toolbar.

Ended up styling an own MD toolbar. https://www.webcomponents.org/element/IswPolymerElements/isw-toolbar Followed your advice that no media queries should be used inside an element, added a metrics property that can be "mobile" or "tablet" and can be controlled by the app.