-
Notifications
You must be signed in to change notification settings - Fork 11
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
Show surrounding messages for a full screen of content #71
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MadLittleMods
commented
Sep 17, 2022
This was referenced Sep 20, 2022
… comments still good
MadLittleMods
changed the title
Experiment with always having a full screen of content
Show surrounding messages for a full screen of content
Sep 20, 2022
This was referenced Oct 31, 2022
MadLittleMods
added a commit
that referenced
this pull request
Nov 2, 2022
… (seamless navigation) (#114) 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]: 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)
MadLittleMods
added a commit
that referenced
this pull request
Nov 2, 2022
MadLittleMods
added
the
A-archive-room-view
The view to look at a room day by day in the archive
label
Apr 11, 2023
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
T-Enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR changes
1. Full screen of content
Add surrounding messages to the given messages so we have a full screen of content to make it feel lively even in quiet rooms
As you scroll around the timeline across different days, the date changes in the URL, calendar, etc
2. Day summary item and jump to next activity
Add summary item to the bottom of the timeline that explains if we couldn't find any messages in the specific day requested
Also allows you to the jump to the next activity in the room. Adds
/:roomId/jump?ts=xxx&dir=[f|b]
to facilitate this.Part of #46
3. Add developer options modal
Add developer options modal which is linked from the bottom of the right-panel
- Adds an option so you can debug the
IntersectionObserver
and how it's selecting the active day from the top-edge of the scroll viewport.UX problems
One person's link will not look like the other once they start scrolling
Because we change the URL as you scroll around. Someone may link a page expecting all the same messages to be there but it will actually only be the current day they're scrolled to plus whatever is above it.
This would be mediated if we could also show messages after the selected day, but we can't (see the next point).
Update: This behavior was reverted in #115
We can't show messages after the selected day
With
/messages
, we can only pick an event and paginate backwards because paginating forwards does not work properly with/backfill
. And/context
doesn't/backfill
at all.Because we can't get messages after the selected day, if the day doesn't have enough messages to fill up the screen, the URL will immediately change to a day before and there is no way to scroll low enough to select the day again except for the calendar.
This is now tracked separately as #72
Scroll to the start of the day
Currently, the timeline always scrolls to the bottom on page-load but it would be nice to be scrolled to the beginning of the day. This is tracked by #73
Dev notes
IntersectionObserver
notesOnly showing intersections on the top edge:
The gif shows off how scrolling around changes the calendar day. Also shows off how we're using an
IntersectionObserver
to select the active day at the top edge of the scroll root:Scroll to event
A little change to avoid extra resizes messing with the scroll position,
Hydrogen
src/platform/web/ui/session/room/TimelineView.ts#L94-L99
nconf
config resetSeems to work as expected but I am not sure how it works. How does
nconf
know when to "snapshot" some state and reset back to it? There isn't any documentation onreset
and the code isn't illuminating.Related issues:
Todo
Start the scroll at the beginning of a dayOptional for this PR: Add date headers to HydrogenIntersectionObserver
highlight debugging styleshydrogen-view-sdk
again with latest scratch changes