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

Topics in index should link to most recently read topic (anchor), rather than just the page of that topic #362

Open
timdiggins opened this issue Aug 7, 2016 · 7 comments

Comments

@timdiggins
Copy link
Collaborator

Given that we store the page of the most recently read page, shouldn't we be linking to this page in the topics#index ?

@glebm
Copy link
Collaborator

glebm commented Aug 7, 2016

I think we are. It also works for me on https://thredded.org/thredded/main-board.

@timdiggins
Copy link
Collaborator Author

timdiggins commented Aug 8, 2016

@glebm agreed, have understood where it happens in the view model now.

I was thinking (in addition to linking to the page as we are doing) we should link to the anchor of the last read post if possible. This anchor should be calculated and stored in UserTopicReadState.

@timdiggins timdiggins changed the title Topics in index should link to most recently read page, rather than first page Topics in index should link to most recently read topic (anchor), rather than just the page of that topic Aug 17, 2016
@timdiggins
Copy link
Collaborator Author

from #533:

And I think it would be good to highlight the unread posts when you first view them (when they are transitioning from read-> unread as it were), like we highlight unread topics

@jayroh I know you've had some thoughts about this -- maybe about doing it in Javascript w/scrollspy for example ( I'm less keen on this, even though it is less accurate, seems like it could be nightmarish to support)

@jayroh
Copy link
Member

jayroh commented Feb 21, 2017

@timdiggins Yeah your estimation is right on. This is the "best" way to track all of this but it's no easy task as there's a lot to juggle. On topics#show - the topic, page, and post

Then of course there's topics#index - marking read or un-read on all of those.

JS is the best way to do this and in terms of support, as long as it's well tested it should be relatively manageable.

@timdiggins
Copy link
Collaborator Author

I'm in favour of a simple approach as the next step:

  • when viewer views (requests the html of) the last page of posts , then mark all these as read (via controller) the last page of posts (as roughly as present -- though we ignore what page is being read)

  • add a marker saying "unread posts below here" in the gap between read and unread posts

  • when linking to a topic page, link to: the last post (specific #post-2312 anchor) if all read, or to the top of the page (no anchor) if none read, or to the "unread posts marker" (#unread-posts anchor) if some but not all are read.

@timdiggins
Copy link
Collaborator Author

decision on #535 is relevant to putting a "unread posts below here" in the UI.

@glebm
Copy link
Collaborator

glebm commented Mar 7, 2017

I'm in favour of a simple approach as the next step:

+1

add a marker saying "unread posts below here" in the gap between read and unread posts

#536 is a pre-requisite for adding the marker, so I'll merge it tomorrow if there are no objections.

when linking to a topic page, link to: the last post (specific #post-2312 anchor) if all read, or to the top of the page (no anchor) if none read, or to the "unread posts marker" (#unread-posts anchor) if some but not all are read.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants