Repository navigation
Conversation
8e6850d to
e087ce5
Compare
7982e5e to
c28b22c
Compare
There was a problem hiding this comment.
I think with the code, a throw is unlikely.
|
@gkalpak , I have pushed three commits for the three fix/feat in order to help you with your reviews. |
|
The CI throws an error that is not in relation to this PR. |
|
You can preview 8e6850d at https://pr28368-8e6850d.ngbuilds.io/. |
|
I've tested a throttle, even with a duration of 300ms, but the result isn't optimal. We lose, often, the exact last positon before the navigation. With a duration of 500ms, it's not usable. |
|
If we agree with this change, I can squash and add a description of this PR in the commit message |
b8cdde6 to
266b848
Compare
I can live with either. Theoretically, we only care about the final scroll position (after the user has stopped scrolling). The only concern would be if someone scrolled and then quickly navigated to a new doc within 400-500ms (which we could solve by other means, but throttling offers a simpler (even if not perfect) work-around for that). |
"even if not perfect" ; Yes. IMO, the user should stay in his previous position (before his scroll and then his navigation) in this case; Otherwise, he will go back in a position that he doesn't know. |
cb70cce to
6eb239a
Compare
|
Hi @petebacondarwin ,
|
WTF?? This throttling approach of Chrome is a serious problem for us, since we are staying on the same "page" the whole time. It seems that we will only be able to record 50 push states before it blocks for 10 secs! It is not even resetting if there is no push states for 10 secs before you hit the 50 push states! So 250ms sounds like a good compromise. But we should look for an alternative solution... Could we hook into the forward and back and refresh actions at the browser level and update the history state just before the navigation happens? Then we just need to track the current scroll position at that point, rather than writing to it all the time. E.g. |
Hmm, maybe into the forward and back actions, I'm not sure on refresh action, it's certainly more random. I intend to dig it up! In all cases, currently, there is a bug on angular.io due to this "surprise". Should we not merge a first version ? |
|
Yes, I agree that we should land this PR (perhaps with 250ms interval) and then worry about making it better next. |
e9327bb to
87e6570
Compare
|
You can preview 87e6570 at https://pr28368-87e6570.ngbuilds.io/. |
There is no debouncing when we store the scroll Position. Currently, we have a message in the console after a while: >Throttling history state changes to prevent the browser from hanging see: https://bugs.chromium.org/p/chromium/issues/detail?id=786211 for more informations
…and immediately reloading This can result in an inconsistent state
87e6570 to
69401ef
Compare
|
I have done a rebase of my codebase due to an error with the ChromeDrive (hope this commit help me). |
|
@wKoza please rebase |
There is no debouncing when we store the scroll Position. Currently, we have a message in the console after a while: >Throttling history state changes to prevent the browser from hanging see: https://bugs.chromium.org/p/chromium/issues/detail?id=786211 for more informations PR Close #28368
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #28332
There is no debouncing when we store the scroll Position;
Chrome seems not happy with that:
We have a message in the console after a while:
FYI : https://bugs.chromium.org/p/chromium/issues/detail?id=786211
https://codereview.chromium.org/2972073002/#ps1
What is the new behavior?
Does this PR introduce a breaking change?
Other information