Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?] Voting on comments causes them to jump around due to ranking. #51

Closed
mister-monster opened this issue Apr 20, 2019 · 15 comments
Closed

Comments

@mister-monster
Copy link

No description provided.

@dessalines
Copy link
Member

This is a tough one actually, and I might need someone with more expertise to chime in on this.

I made the commenting experience to be live updating, both for votes, and new comments. So its resorting the existing comments every time someone votes, or a new comment comes in. This means that there's no reason to refresh the page, everyone is seeing the same thing in real time, and the hot comments will stay at the top for as long as your connection is up.

Of course the down-side of this is that scrolling is difficult... what if you're actively writing a reply, and that comment gets downvoted and moved around the page? Or if someone posts a wall of text, what happens then?

I def don't want to make the user refresh the page, but I also do see the scrolling around as an issue. There's probably some way to "center" the page based on what you're reading, but I'm not sure how to do it.

@elegaanz
Copy link

I don't know how this is currently implemented, but maybe at least to make the jumps more pleasant and less confusing, having a smooth animation of the comments moving/appearing could help.

Otherwise I think it is quite hard to solve this issue on your side (I know it is a recurrent issue in Mastodon for instance, and that the code that tries to handle it is full of "magic" code). However browsers are making some efforts to avoid this kind of annoyance.

So you can either try to see what Mastodon does (I can try to find where it is handled if you want) for instance, or wait for browsers to behave better in these situations…

@pojntfx
Copy link

pojntfx commented Apr 20, 2019

Another option (although, to be honest I don't know how I'd implement that) could be to fix the view of the user on the comment they are currently watching; this way, the comments might update and they would notice the scrollbar changing, but the UI wouldn't "jump around".

@mister-monster
Copy link
Author

Would it be difficult to create an exception for live updates i.e. votes don't update live? That way ranking won't change but everything else updates real time.

@dessalines dessalines reopened this Jul 1, 2020
@dessalines
Copy link
Member

dessalines commented Jul 1, 2020

This also isn't just an issue with voting, but for new comments, comment edits, comment deletes too... all can push the content you're viewing up or down the page.

One potentially easy fix, is that when you have a comment box open, disable any updates. That way while you're making a comment at least, your page will be static. But this doesn't help if you're just reading a comment.

@pyjammas
Copy link

pyjammas commented Jul 1, 2020

I'm a programmer but I've worked with a number of awesome UX'ers. They unequivocally argue against in-place updates because these have lots of potential unintended consequences. Instead, if you're going to be real-time, do this in a less disruptive way.

The one rule they instilled in me is to never mess with the 'flow' of the document, the vertical one being primary.

So I'd say much as it is cool to update a comment's position based on upvotes, for one, avoid the desire to do so. Make it something indicated in the metadata at worst, but don't mess with a user's comment order without them desiring it.

@dessalines
Copy link
Member

This isn't just an issue with vote resorting, but with new comments too. If you're viewing a comment, and a new one comes in, it would potentially push yours down. I'm not sure how exactly to "center" the scroll around the current content you're viewing.

@physkets
Copy link

I def don't want to make the user refresh the page

Why not? I think that is the solution. A refresh by the user is an explicit instruction to load new content (comments, rankings etc.), and additions and re-ordering should only occur when refreshed.

Live updates are fine for a very conversation within a small group of people. It is not appropriate for a anonymous, link-aggregation-discussion platform.

@dessalines
Copy link
Member

dessalines commented Aug 22, 2020

Live updating comments are a solution to reddit's problem of having to constantly refresh the page to see new content. Its easily the most annoying thing about the site.

The problem here isn't live content, its that content is jumping around. This could be fixed in a variety of ways, such as refocusing your view on the content you were currently viewing on a resort / new comment. This is very fixable (masto and twitter have ways to center your view even with live content), and I'll probably devote some time to it after federation work.

eiknat referenced this issue in eiknat/lemmy Aug 23, 2020
added page and limit back to postquerybuilder

Closes #89

See merge request chapo-sandbox/lemmy!162
@pyjammas
Copy link

In my experience updating a page in a way that actively changes the layout of elements is to be avoided at all times. While there are various tricks to deal with stuff jumping around the page, there are almost always edge cases.

But more importantly, I don't think the desire is actually there for most people to see new comments without refreshing the page. When you're reading, why would you want stuff to just pop into view? When you're commenting, you're responding to what you just read. You're interacting with a 'snapshot', and that's IMO how it should be.

Perhaps the frustration is not so much the inability to see new comments, but the inability to refresh and quickly see what's new? I can't check right now so correct me if I'm wrong, but Lemmy currently doesn't mark new comments, right? That might be a better solution.

Of course this is just how I prefer to browse sites like Lemmy, but I'd be truly surprised if I'm in the minority. Perhaps it would be good to have a poll on the site itself to see what preference people have?

Alternatively offering the option to turn live updates on or off might be the ideal solution. Because I do at times like my page to live update even if just for the more chat- or livestream-like threads.

@dessalines
Copy link
Member

But more importantly, I don't think the desire is actually there for most people to see new comments without refreshing the page. When you're reading, why would you want stuff to just pop into view?

A lot of the reason people are moving to discord, twitter, masto, etc from reddit, is because they're auto-updating, and feel more alive, like chat applications, and communication platforms in general should feel. A tree view will always feel different from a chat box, as it encourages more long-form discussion, but there's still no reason it can't be live-updating.

Even chat boxes have this problem... you go away for 10 minutes in an active room, and the content you see is entirely different. AFAIK lemmy is the first to actually attempt having a live-updating tree view, so this still needs to get worked out in a user-friendly way.

I can't check right now so correct me if I'm wrong, but Lemmy currently doesn't mark new comments, right?

It does, new comments come in with a different highlight (css class mark) for the first few minutes.

Alternatively offering the option to turn live updates on or off might be the ideal solution. Because I do at times like my page to live update even if just for the more chat- or livestream-like threads.

This is a possibility, I might add this as an option if I get some time, but I'd much rather have the UI center the content based on what you're looking at. Even voting currently can potentially push things out of view.

@physkets
Copy link

Live updating comments are a solution to reddit's problem of having to constantly refresh the page to see new content. Its easily the most annoying thing about the site.

I don't think that is a problem at all. You could make a poll, and I'm guessing people will agree.

A lot of the reason people are moving to discord, twitter, masto, etc from reddit, is because they're auto-updating

They are completely different applications. People go to each of those things for different things.

dessalines referenced this issue in LemmyNet/lemmy Aug 31, 2020
Merge pull request 'Adding unique ap_ids. Fixes #1100' (#90) from unique_ap_ids into activity-sender

Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/90

Adding back in on_conflict.

Trying to add back in the on_conflict_do_nothing.

Trying to reduce delay time.

Removing createFakes.

Removing some unit tests.

Adding comment jest timeout.

Fixing tests again.

Fixing tests again.

Merge branch 'activity-sender' into unique_ap_ids_2

Replace actix client with reqwest to speed up federation tests

Trying to fix tests again.

Fixing unit tests.

Fixing some broken unit tests, not done yet.

Adding uniques.

Adding unique ap_ids. Fixes #1100

use proper sql functionality for upsert

added logging

in fetcher, replace post/comment::create with upsert

no need to do an actual update in post/comment::upsert

Merge branch 'main' into activity-sender

implement upsert for user/community

reuse http client

got it working

attempt to use background-jobs crate

rewrite with proper error handling and less boilerplate

remove do_send, dont return errors from activity_sender

WIP: implement ActivitySender actor

Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/89
@dessalines dessalines transferred this issue from LemmyNet/lemmy Oct 4, 2020
@0rvar
Copy link
Contributor

0rvar commented Oct 25, 2020

I think a good compromise is to show buttons when there are new comments, and to update the comment tree when it's clicked. You could also have a "live-mode" checkbox to toggle auto-updating of the comment tree.

@lboklin
Copy link

lboklin commented Feb 4, 2021

Perhaps (if a "slow mode" is enabled) new comments could be collapsed so as not to displace the page contents, requiring a click to expand them.

Under no circumstances do I think shuffling comments around based on votes should be done without user intervention. Maybe a button to update the ranking which gets highlighted when they change.

@dessalines
Copy link
Member

dessalines commented Feb 4, 2021

As a short-term fix I can alter the sort logic to only sort on initial load. It won't fix new comments or posts being pushed to the top tho.

dessalines added a commit that referenced this issue Feb 8, 2021
Comments and posts no longer live-sorted. Fixes #51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants