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

Make it possible to load a specific page of messages in the context of navigating to a message #10911

Open
jrainville opened this issue Jun 2, 2023 · 0 comments
Labels
core-team E:Desktop Scalability For Mass Market Issues related to make the app scalable for thousands of user at the same time feature

Comments

@jrainville
Copy link
Member

Description

Right now, when navigating to a message either from search, from a pinned or reply message or later from a link, we get messages from the DB in order from newest to oldest until we reach the right message.

However, this can be pretty slow and also not great for memory, as we have to load a lot of useless messages.

The solution would be to instead have a new status-go function that loads a page of messages with the specific message we want in the middle.

Then we can update the chat view with those messages and we wouldn't have to get all those in between messages.

There are a couple of important details however:

  • we'd need to show the loading screen when doing that get, since it might take time
  • once we show the retrieved messages, we need to highlight the clicked message (might already be the case)
  • we need to still support scrolling up to load more old messages, but this is not the same cursor as the one from the "normal" chat list, since we are way higher. That means status-go, when returning the page of messages, also needs to tell us what was that cursor
  • we would now need a new scroll behavior where scrolling down loads newer messages. This also requires a new cursor
  • we need to show the "go down button" to go back to recent messages, but without triggering the message load for newer messages from the line above

I'm not exactly sure what is the best way to achieve the UI part of it. It might require new components that create a gap between the most recent messages (the normal chat list), and the navigated messages, since there would be lots of missing messages between them.

Maybe that "gap" (let's find a new word for that since we already use gap for store node gaps) component would be the one to store which cursor it is using, that was we know which page to load when scrolling.

Acceptance Criteria

  • Navigating to a message, whatever the way, goes to it directly without just scrolling up and up like right now (so it is faster)
  • There is a loading screen/state when loading the messages
  • The clicked message is highlighted for a short time (the already implemented highlight feature)
  • Scrolling up still works and loads older message from that subset of messages, ie if the page of message is from february, then scrolling up gets messages from february, than january, etc
  • Scrolling down loads newer messages, again with the same logic as above
  • There is a "go back down" button. When it is clicked, it should be instant and there should not be any message loading. We just go down to the most recent messages that were already loaded
  • Clicking again on the same message link/pin, it should be instant since we already loaded the message (it doesn't load again)
@jrainville jrainville added this to the 0.15 milestone Jun 2, 2023
@jrainville jrainville changed the title Making it possible to load a specific page of messages in the context of navigating to a message Make it possible to load a specific page of messages in the context of navigating to a message Jul 13, 2023
@jrainville jrainville removed the Chat label Jul 17, 2023
@jrainville jrainville moved this to Next Iteration in Status Desktop/Mobile Board Aug 31, 2023
@jrainville jrainville added the E:Desktop Scalability For Mass Market Issues related to make the app scalable for thousands of user at the same time label Sep 18, 2023
@iurimatias iurimatias modified the milestones: 0.16, 0.18 Nov 27, 2023
@iurimatias iurimatias modified the milestones: 2.29.0 Beta, 2.30.0 Beta Mar 5, 2024
@jrainville jrainville modified the milestones: 2.30.0 Beta, 2.31.0 Beta May 15, 2024
@jrainville jrainville modified the milestones: 2.31.0 Beta, 2.33.0 Beta Aug 26, 2024
@iurimatias iurimatias modified the milestones: 2.33.0 Beta, 2.34.0 Beta Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-team E:Desktop Scalability For Mass Market Issues related to make the app scalable for thousands of user at the same time feature
Projects
Status: No status
Development

No branches or pull requests

3 participants