Page MenuHomePhabricator

Scroll back to top when users click buttons at bottom of the main filter panel to switch to an Advanced panel
Closed, ResolvedPublic

Description

The main filter panel has buttons at its bottom that switch the user to the Advanced filter panels--currently Tags and Namespaces. Currently, when you click these buttons, it switches the panel, but the view remains at the bottom of the panel. We should scroll up so the user can start back at the top of the panel.

Event Timeline

Change 365195 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/core@master] RCFilters: Scroll to top on view switch

https://gerrit.wikimedia.org/r/365195

Change 365195 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Scroll to top on view switch

https://gerrit.wikimedia.org/r/365195

Checked the fix in betalabs

QA Recommendation: Resolve

@Mooeypoo, switching filter panels now causes the PANEL to scroll back up to the top, which is good. But here's the thing. Whenever I, for example, scroll to the bottom of the main filter panel—in the process revealing the buttons for the advanced filter panels—I seem always to scroll a little too hard, so that the panel hits its bottom and then the page itself scrolls down a little. Which means that, in general, whenever I've scrolled to the bottom of the panel, I've also scrolled the top of the panel out of the viewing port.

That means that your scrolling the panel to its top is all very well, but I won't see that top. Because it's out of the main viewing port. Which brings me to my question: when you scroll the panel to the top, can you at the same time scroll the page itself to its top?

Putting this back in In Dev, so @Mooeypoo can have a look at my request, above. Since I wrote that, I've seen this happening in testing. Can we make it nicer?

It seems to be a different issue - when the vertical scrolling slider hits the bottom of the filter panel, then the scrolling action instead of being applied only to the filter panel suddenly switches to a page scrolling action, so the page itself moves up.

! In T170651#3482945, @Etonkovidova wrote:

...when the vertical scrolling slider hits the bottom of the filter panel, then the scrolling action instead of being applied only to the filter panel suddenly switches to a page scrolling action, so the page itself moves up.

Yes, that is a related and annoying issue! Why does the focus suddenly jump out of the menu and onto the main page? @Pginer-WMF, is that the pattern that is expected for scrolling drop-downs? It's how our Notifications panel works too, and I do not like it. When I'm scrolling, I don't want to scroll "out" of my menu and onto the page behind. I should have to click to get out of a menu, IMHO. Is there a way to keep the focus in the menus? I.e., to just have the scrollbar indicator hit bottom and stay there?

! In T170651#3482945, @Etonkovidova wrote:

...when the vertical scrolling slider hits the bottom of the filter panel, then the scrolling action instead of being applied only to the filter panel suddenly switches to a page scrolling action, so the page itself moves up.

Yes, that is a related and annoying issue! Why does the focus suddenly jump out of the menu and onto the main page? @Pginer-WMF, is that the pattern that is expected for scrolling drop-downs? It's how our Notifications panel works too, and I do not like it. When I'm scrolling, I don't want to scroll "out" of my menu and onto the page behind. I should have to click to get out of a menu, IMHO. Is there a way to keep the focus in the menus? I.e., to just have the scrollbar indicator hit bottom and stay there?

Unfortunately, this is how scrolling works in browsers. I haven't (yet) found a way to stop it from doing this. It's bothered me for years and I've periodically looked for solutions, but never found any workable ones.

So I am confused a bit about how to proceed here; the matter of scrolling down (and then the page scrolls) is a non-fixable issue with all browsers. Is there any other scroll requests to fix?

In T170651#3484135, @Mooeypoo wrote:

So I am confused...Is there any other scroll requests to fix?

Yes, this one:

@Mooeypoo, switching filter panels now causes the PANEL to scroll back up to the top, which is good. But here's the thing. Whenever I, for example, scroll to the bottom of the main filter panel—in the process revealing the buttons for the advanced filter panels—I seem always to scroll a little too hard, so that the panel hits its bottom and then the page itself scrolls down a little. Which means that, in general, whenever I've scrolled to the bottom of the panel, I've also scrolled the top of the panel out of the viewing port.

That means that your scrolling the panel to its top is all very well, but I won't see that top. Because it's out of the main viewing port. Which brings me to my question: when you scroll the panel to the top [which you are now doing], can you at the same time scroll the page itself to its top?

Change 369556 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/core@master] RCFilters: Scroll widget to top when switching view

https://gerrit.wikimedia.org/r/369556

It should be doing that for most cases because switching views also focuses the input -- but I made sure it does it on all cases as well.

Change 369556 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Scroll widget to top when switching view

https://gerrit.wikimedia.org/r/369556

Based on the comments above and on the fact that the issue described in the ticket has been resolved, I think that this task can be closed as Resolved.

QA Recommendation: Resolve

jmatazzoni closed this task as Resolved.Aug 4 2017, 2:05 AM