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 toggle scrollToBottom so you can start scroll from the top as well and continue reading #915

Closed
wants to merge 1 commit into from

Conversation

MadLittleMods
Copy link
Contributor

Add a way to toggle scrollToBottom so you can start scroll from the top as well and continue reading.

Split out from #653

See ?continue=top in matrix-org/matrix-viewer#114 for how this is specifically used. When jumping to the next page of activity, you want to start from the top to continue reading where you left off.

Future notes

For Matrix Public Archive we want:

Potential alternatives

Add a way to disable all scroll controls from Hydrogen itself and have the downstream API consumer control everything.

I could see Hydrogen supporting most of those scroll behaviors though (except scrolled to top).

…op as well and continue reading

See `?continue=top` in matrix-org/matrix-viewer#114 for how this is used
Comment on lines +73 to +76
constructor(vm: TimelineViewModel, {
viewClassForTile,
stickToBottom = true
}: TimelineViewOpts) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made this an options object because I forsee more options here (see future notes in PR description)

@MadLittleMods MadLittleMods marked this pull request as ready for review November 2, 2022 09:20
@@ -57,16 +57,27 @@ function findFirstNodeIndexAtOrBelow(tiles: HTMLElement, top: number, startIndex
return 0;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing (alternative incoming)

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

Successfully merging this pull request may close these issues.

None yet

1 participant