Improve automatic scrolling in conversations
Reproduction of misbehaviour #1:
- Click the conversation tab
- Select a conversation that's longer than your page's height
- Scroll down as much as you want
- Select another conversation
- Expected result: the "another conversation" is shown from beginning
- Bugged result of now: "another conversation" is at the same height will scrolled "conversation" to
Reproduction of misbehaviour #2:
- Click the conversation tab
- Select a conversation that's longer than your page's height
- Scroll down as much as you want
- Go to any other page of D* or close the window (simply go away from the conversation page)
- Click the conversation tab again
- Open the same conversation from step 2
- Expected result: the conversation is auto-scrolled to where you left it
- Bugged result of now: it's shown from beginning again
You really want us to record and store on which page you scrolled to which point?
Yes, if reasonable enough.
No, I don't think that's reasonable.
About the first one, maybe we can fix that no?
It could work stored in browser local storage for a couple of days or something like that. Certainly the server has no business there.
On Thu, Feb 21, 2013 at 5:15 PM, Jonne Haß [email protected] wrote:
No, I don't think that's reasonable.
— Reply to this email directly or view it on GitHubhttps://github.com/diaspora/diaspora/issues/3998#issuecomment-13916402.
No, I don't think that's reasonable.
How about an alternative approach, less effective but easier to implement?
If the message has been opened before ↦ scroll to the end If the message has never been opened ↦ don't scroll
It could work stored in browser local storage
That's deleted by most people after closing the browser, is it not? Perhaps it added with the above suggestion would yield the best result.
@fhsdi2 We already scroll down to the first unread message if there is any. (well, we try but it is broken, see #4818)
When there is no unread message I like the idea to scroll to the end of the conversation. This might be done by simply focusing the new message form. (IMO it is quite likely that you already know the conversation and just want to write an answer.)
I fixed this issue by scrolling to the first unread message. If there is no unread message right now I scroll to the top of the conversation. I could also scroll to the bottom and focus the form. Any opinions which solution is the preferred one? I will open a PR once #5417 has been merged to get rid of the conflicts first. I will also have to write some tests but the fix itself is ready.