PolymerElements / app-layout

App layout elements
https://webcomponents.org/element/PolymerElements/app-layout
598 stars 311 forks source link

Is app-scrollpos-control deprecated in Polymer 2? #469

Open rchrdnsh opened 7 years ago

rchrdnsh commented 7 years ago

Hi! XD

Trying to find the app-scrollpos-control element to help remember scroll position in a PSK 2 app that I'm building, but I cannot find it in the bower folder. I even tried installing the app-layout elements again, but it still did not appear. So is that element being deprecated? And if so, what is taking it's place?

Thank you! XD

web-padawan commented 7 years ago

There is a PR which is described in readme.

rwestlund commented 7 years ago

I've read both of those links, but I'm not clear on exactly how I should be implementing multiple scrolling regions with the app-layout toolkit, or even whether any browsers support document.rootScroller yet. I'd like to see some documentation and examples of doing things the new way.

IMO, this should have been deprecated, not deleted. The thing we're supposed to replace it with doesn't seem to exist yet :(

frankiefu commented 7 years ago

@rwestlund We updated Pesto template in app-layout with replacement code here: https://github.com/PolymerElements/app-layout/blob/master/templates/pesto/src/recipe-app.html#L234-L250 Take a look as an example for now.

We'd also like to have more documentation around this and will be addressed here: https://github.com/Polymer/docs/issues/2189

MGRProgramming commented 7 years ago

I tried to implement the pesto function in my Polymer 2.0 app based on the polymer-2-starter-kit 1.) The pesto template is still 1.0 2.) window.pageYOffset does return 0 always for the old page - thus I cannot store the position and reuse the position

_pageDataChanged(pageData, oldPageData) {
    console.log('window.pageYOffset:', window.pageYOffset);
...

It all worked with app-scrollpos-control in 1.0 - now my 2.0 app does not work when switching from back from detail to list page (really annoying after hours of moving from 1.0 to 2.0). I do not understand the need to remove app-scrollpos-control or app-scroll-position without offering working 2.0 alternatives or documentation.