rtv icon indicating copy to clipboard operation
rtv copied to clipboard

Centering on new comment

Open fabikw opened this issue 6 years ago • 4 comments

After replying to a post, when exiting the editor (I use nano, if it makes any difference) it would be great if the previous view was maintained. This would include which posts were collapsed and where the comment was made.

Right now, after replying to a post, the view resets and the cursor goes back to the top of the post.

fabikw avatar Oct 03 '17 13:10 fabikw

I think this is a good feature request, but it might be difficult to implement. The cursor jumps to the top because we need to do a full page refresh in order for the new comment to be loaded. It might be possible to reposition the cursor if:

a. The reddit api returns the new comment id after you make a post. b. We can find the comment id in the comment tree after refreshing the page (i.e. it's not hidden behind a more comments link)

michael-lazar avatar Oct 04 '17 14:10 michael-lazar

One partial solution would be to find the lowest parent that can be seen and center there. As the parent tree can always be stored before the comment is started, that should work.

fabikw avatar Oct 05 '17 13:10 fabikw

Any updates on this, @michael-lazar? I suggest simply not refreshing the page, since most of the time you still need a few refreshes before the new comment is loaded, and seeing your own comment after you just posted it isn't that important of a feature anyway.

ghost avatar Sep 06 '18 21:09 ghost

@m3tax no this hasn't been worked on. I still think the refresh is necessary from a UX perspective in order to provide feedback that the comment was successfully posted. Otherwise users might think that there was an error when posting and not realize that they need to refresh the page. I've gotten bug reports like this in the past.

michael-lazar avatar Sep 07 '18 15:09 michael-lazar