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

Add a way to jump forwards and backwards to more activity in the room #114

Merged
merged 14 commits into from
Nov 2, 2022

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Oct 28, 2022

Add a way to jump forwards and backwards to more activity in the room (seamless navigation12).

Fix #46
Follow-up to #71

Summary:

  • Changes the "Jump to next activity in room" to actually continue you to the next 100 messages ahead. Previously, it only jumped you to the single next event in the room which meant a lot of backwards overlap each time.
    • Jumping this direction will also start your scroll position at the top of the timeline to continue reading seamlessly ?continue=top
  • Adds "Jump to previous activity in room" to the top of the timeline to continue reading the previous part of the conversation.

[1]: See #120

[2]: There is a caveat with seamless here which is also commented on in the code:

XXX: This is flawed in the fact that when we go /messages?dir=b it could backfill messages which will fill up the response before we perfectly connect and continue from the position they were jumping from before. When /messages?dir=f backfills, we won't have this problem anymore because any messages backfilled in the forwards direction would be picked up the same going backwards.

(need forwards fill MSC)

Todo

  • Add query parameter that causes the client to start the scroll at the top when jumping forwards so they can continue reading where they left off.
    • This requires Hydrogen changes to not stickToBottom on restoreScrollPosition
    • We might want to refactor to use TimelineView instead of RoomView to pass the options directly and would align with @bwindels suggestion -> Refactor to use TimelineView #117
    • ?scroll=top, ?continue=top
  • Stop 404'ing on /jump. Just move to the next day so we can display the no chat messages view
  • Add tests
    • 404 when viewing future day
    • Jump back to previous activity
    • Jump forward to next activity
  • Update Hydrogen with latest scratch changes

@MadLittleMods MadLittleMods added T-Enhancement New feature or request A-archive-room-view The view to look at a room day by day in the archive labels Oct 28, 2022
@MadLittleMods MadLittleMods mentioned this pull request Nov 1, 2022
6 tasks
MadLittleMods added a commit to element-hq/hydrogen-web that referenced this pull request Nov 2, 2022
…op as well and continue reading

See `?continue=top` in matrix-org/matrix-viewer#114 for how this is used
@MadLittleMods MadLittleMods marked this pull request as ready for review November 2, 2022 07:29
@MadLittleMods MadLittleMods changed the title Add a way to jump forwards and backwards to more activity in the room Add a way to jump forwards and backwards to more activity in the room (seamless navigation) Nov 2, 2022
MadLittleMods added a commit to element-hq/hydrogen-web that referenced this pull request Nov 2, 2022
…op as well and continue reading

See `?continue=top` in matrix-org/matrix-viewer#114 for how this is used
@MadLittleMods MadLittleMods merged commit 08254cb into main Nov 2, 2022
@MadLittleMods MadLittleMods changed the title Add a way to jump forwards and backwards to more activity in the room (seamless navigation) Add a way to jump forwards and backwards to more activity in the room Nov 2, 2022
MadLittleMods added a commit that referenced this pull request Nov 3, 2022
Fix #120
Follow-up to #114

 - Uses event permalinking (`?at=$xxx`) to continue the scroll where you should start reading again.
 - When we jump forwards, we make sure that we go a day back to ensure there isn't more than the page limit between where we jumped from and the day so we don't lose any messages in a gap.
@MadLittleMods MadLittleMods added the A-backend Related to the backend Node.js server pieces label Apr 11, 2023
@MadLittleMods MadLittleMods deleted the madlittlemods/46-jump-to-activity branch April 26, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-archive-room-view The view to look at a room day by day in the archive A-backend Related to the backend Node.js server pieces T-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add jump to next and previous activity in room
1 participant