Nodebb: Don't scroll to bottom after posting

Created on 14 Mar 2016  路  14Comments  路  Source: NodeBB/NodeBB

After posting a reply the browser scrolls to the bottom of the topic. The browser should stay where it was so the user can keep reading from where he left off (even if it's only a user option to do so).

We have a lot of long topics and losing one's place in there causes a lot of grief, and since there's nothing obvious in the UI to point out which posts have or haven't been read, this will be especially painful for our users.

enhancement

Most helpful comment

If I may weigh in, it seems to me there are three reasonable alternatives for users with the potential setting set:

  1. Don't scroll to the new post
  2. Don't scroll to the new post, but put up a notification saying 'go to new post'
  3. Scroll to the new post, and put up a notification saying 'return to where you were'

Personally, I prefer option 1, as I can always use [End] to see my new post if I want to, though to be honest option 2 is just as good. Option 3 though seems a little too 'active', if you know what I mean; scrolling all the way to the end seems pointless if you're just going to scroll right back again.

All 14 comments

On less advanced usecases such as yours (let's assume normal topics on most forums are a few posts in length) I would argue that the user would expect to be shown the post that they've just created.

Happy to accept PR for a user setting though. That would be a nice thing to have.

and since there's nothing obvious in the UI to point out which posts have or haven't been read

As an aside, this would be something neat to consider

The logic that defines where to go is handled by the server, I believe... so it might actually be fairly trivial to alter it so it doesn't take you to the post if you don't have a bookmark set to the last post?

Notif that says "Click here to return to your original position"?

There's a few ways of going about this

If I may weigh in, it seems to me there are three reasonable alternatives for users with the potential setting set:

  1. Don't scroll to the new post
  2. Don't scroll to the new post, but put up a notification saying 'go to new post'
  3. Scroll to the new post, and put up a notification saying 'return to where you were'

Personally, I prefer option 1, as I can always use [End] to see my new post if I want to, though to be honest option 2 is just as good. Option 3 though seems a little too 'active', if you know what I mean; scrolling all the way to the end seems pointless if you're just going to scroll right back again.

May I join the party too? I've just written the post, I've seen the preview, why should I want to see how it looks when posted as well (unless there is a difference between preview and the posted). Eventually I'll get to my post when I continue reading the topic.

So that's a vote for @RaceProUK's options 1 and 2.

Option 3 is less favourable for me because then I have to reach for the mouse.

Personally i think option 2 is the best option for most users. so i'll lend my vote to that option.

I've seen the preview, why should I want to see how it looks when posted as well

I think there's a case for that when you're on mobile though

While not directly related, this is tangentially related to #4371

So: I have something working locally. I now believe that it will require 3 pull requests in order to include a new checkbox on the user settings page, but I'm a github and NodeBB n00b, so I want to make sure to do this correctly:

  • NodeBB: updates to the settings load / save, client behavior after submitting a post, English translations for the setting (I only speak English, so...)
  • nodebb-theme-vanilla: update to the account settings template
  • nodebb-theme-persona: update to the account settings template

Is that the correct procedure?

Basically, I have a setting called "After posting a reply, show the new post" in the "Browsing" section (seemed the best fit). That defaults to true (awful, current behavior :-P , but won't surprise long time users when this becomes available). Inside scrollToPostIfOwn, that setting is checked before the navigation is done.

@boomzillawtf We use nodebb-theme-persona on WTDWTF

Oops...copy pasta strikes. Updated the post to include the persona theme, which I meant to do.

For the English translations make sure it's in en_GB, that's our default language for transifex. After we pull it will propagate to all other languages

Was this page helpful?
0 / 5 - 0 ratings