Scroll to the bottom of a long thread and refresh the page.
Grab the scroll bar and scroll up to the top of the page. You’ll see a loading spinner while the previous posts load. (You can make this problem more obvious using a network conditioning tool, e.g. Chrome Dev Tools Network tab, Slow 3G.)
Actual: As the posts load, the scroll jumps around.
In the linked video, you can see that RBoy’s post #76 “Maybe codinghorror can confirm” is at the top of the screen; then, when the subsequent page finished loading, the scroll jumps up to lid’s post #9 “It will be interesting to see if…”
Expected: The previous page should appear without disturbing the scroll position; whatever I saw on the screen as the previous page loads should still be on the screen when it’s drawn in.
That just looks like posts are loading as you scroll up. It’s worse when you limit network speeds because the data takes longer to traverse a slower network.
Try scrolling using the handle on the timeline scroller. It won’t jump around because more posts aren’t being loaded ahead and causing the position of the scrollbar to be recalculated. It’s a big part of why it’s there to begin with.
I agree that this is happening because the posts are loading. With a slow network, I can reproduce this just scrolling with trackpad/mouse wheel. (Would it help to post a demo video of that?)
This problem is occurring only when scrolling up because when scrolling down, Discourse draws in a bunch of grey filler; when the posts become available, they pop in right where they’re supposed to be and the scroll doesn’t jank.
It happens because pages are rendered from top to bottom, Discourse doesn’t know the height of posts before they arrive. I can see the scrollbar hopping around as you drag up, using the scroller at least mitigates against the problem by scrolling to the absolute top of each reply.
For the record, this is a very difficult problem. And scrolling down is fundamentally different because you’re not stacking things on top of the viewport. A variable height post causes no problems when added to the bottom, but consider what it does when stacked on top.
Notre communauté rencontre récemment des problèmes d’écran saccadé et de bugs lors du défilement vers le haut :
S’agit-il uniquement d’un problème logiciel ? Y a-t-il d’autres actions que nous puissions entreprendre pour optimiser l’expérience utilisateur lors du défilement vers le haut ?
Oui, c’est le cas. En tant que modérateur, je ne vois pas de publicités et le défilement vers le haut reste problématique.
Est-il judicieux que le logiciel ne « revienne pas en arrière » si l’utilisateur défile trop rapidement vers le haut ? Je suppose que le problème est causé par un défilement trop rapide de l’utilisateur, ce qui empêche les publications de s’afficher correctement, comme expliqué ci-dessus. Je préférerais que l’écran se fige plutôt que de revenir en arrière une fois les publications précédentes chargées, ce qui confond les utilisateurs.
Je viens de tenter de reproduire le problème en mode normal et en mode sans échec, mais je n’ai pas réussi à le reproduire. J’ai mis à jour Discourse il y a deux jours ; je ne sais pas si cela a modifié le comportement. Je demanderai à ma communauté d’autres retours. Merci d’avoir fait un suivi !
Nous recevons également de nombreux rapports à ce sujet sur notre site. Je viens de tester et j’ai constaté que le problème persiste en mode sans échec. Voici quelques rapports récents :
Nous venons de corriger un bug où les sites avec des paramètres inhabituels (ne pas récupérer la taille des images) rencontraient des problèmes d’images provoquant un défilement brutal lors du redimensionnement de ces dernières. Nous avons supprimé ce paramètre car il s’agissait d’une option « tirer dans son propre pied ». Vérifiez peut-être si vous l’aviez activé.
L’autre coupable possible est la publicité.
En résumé, tout ce qui provoque un redimensionnement dynamique de la zone d’affichage entraînera d’énormes problèmes.