Retain scroll position on refresh |
|||||||
Issue descriptionUse case 1: 1. Have lots of failures 2. Scroll down to work on one of them 3. Click on a link to the failed test (opens in a new tab), figure out what's the problem, file a bug, copy it's number 4. Switch back to sheriff-o-matic tab, discover that your page has been refreshed and now everything in a different place, search for issue to attach your bug to Use case 2: 1. Have lots of failures 2. Scroll down, reading issues 3. Auto refresh occurs and the thing you were reading disappears in from in front of you Perhaps if things were sorted by time the refreshes wouldn't be quite so disruptive since then new things would just show up at the bottom (and you could keep the same scroll position). Alternatively, keep track of what's in the person's viewport and reposition them there after the update (I am guessing this will be hard to get right since there are lots of things in the viewport that may no longer be adjacent). Or some other solution I may not be thinking of.
,
Jun 15 2016
We switched to a regular div and it did not get fixed. This is a bit tricky to fix because we regenerate the data behind the scenes, so we'd have to manually keep track of the scroll position, which doesn't sound fun. I think the real solution is to just not have that many errors. Right now clank is in a bad state, where there are way too many errors for a sheriff to handle. Ideally, a sheriff would only see a small handful, and anything more than that should be exceptional.
,
Jun 15 2016
I think having only a couple of issues would be wonderful, but in reality there's no way to ensure that'll happen. Assuming you do AJAX updates to alerts, you could do something like var before = window.scrollTop(); ... do update to div with new alerts ... window.scrollTop(before); Of course for this to work well, you'd want to ensure that the alerts are ordered.
,
Jun 16 2016
Ah, fancy! Didn't know about that, thanks. I made https://chromium-review.googlesource.com/c/352817/ to add that. Not a great fix, but it roughly works for now.
,
Jun 16 2016
If you want to make it *really* fancy, you could use the brand-spanking-new IntersectionObserver* API to determine which alerts are actually in the viewport at the start of the ajax request, then try to find them in the new list after rendering and scroll them into view. *https://developers.google.com/web/updates/2016/04/intersectionobserver?hl=en
,
Jun 16 2016
https://chromium-review.googlesource.com/c/352817/ has landed. Not sure why bugdroid hasn't commented on here :/ I'll leave this open but make it Pri-3.
,
Jun 29 2016
,
Jun 29 2016
,
Jul 26 2016
,
Aug 3 2016
,
Sep 26 2016
This issue is being archived because it refers to the old version of Sheriff-o-Matic and is no longer applicable. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by martiniss@chromium.org
, Jun 13 2016Labels: -SheriffOmatic
Status: Available (was: Untriaged)