📜 ⬆️ ⬇️

Usability Hint: The scroll bar on the comment page should display the actual position in the text.

You have uploaded a page with comments. The browser rendered the page and determined its height, and then calculated the height of the slider on the scroll bar and displayed it. The problem is that if the recording takes up more than one screen and there are a lot of comments on the page, you will be misled about the amount of content: the scroll bar does not reflect the actual amount of haboscript. You see how the scrollbar displays a fraction of the entire page with comments, and not the proportion of targeted content. This is not good.

JavaScript solution: collapse the block with comments when rendering and expand if the comment block is close enough to the bottom edge of the page. In this case, immediately after opening the scroll bar will display the actual amount of habzapisi, and when we scroll the page to the comments - rebuilds the image and shows the position on the expanded.

If the transition to the page is carried out by anchor to some comment (# commnet-34295878634), the code should catch it and not collapse the comment block.
')
The problem is irrelevant to decisions where comments are displayed on another page.

The solution is bad if the user expects the scrollbar to show the volume of the page with comments. True, I can not understand who cares. In the case of Habr, the number of comments is easy to estimate according to the meta information under the announcement of a habzapisi in the tape.

There must be some other problems before I figure it out.

Source: https://habr.com/ru/post/166439/


All Articles