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

[Feat] Add a "Scroll to Top" button #512

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

thesynthax
Copy link
Contributor

@thesynthax thesynthax commented Mar 12, 2024

Brief Title

Feature: Adding a "Scroll to Top" button to go to the start of conversation

Acceptance Criteria fulfillment

  • Added the button as shown in the video below

Fixes Issue RocketChat/Rocket.Chat#511

Video/Screenshots

pr1.mp4

@Spiral-Memory
Copy link
Contributor

Spiral-Memory commented Mar 12, 2024

Good work! However, I don't see the necessity for this feature. In any chatting app, I have never encountered such a feature because there isn't much use case for it. Imagine a scenario with thousands of messages; does it make sense to go to the top message? Additionally, the placement of this feature is incorrect. It should not be in the kebab menu, options in this menu are used for opening sidebars here. Perhaps adding the option to go to the recent message could be considered, triggered by a floating down icon in chat body when users scroll up as you might see in whatsapp. However, this feature is also not available in the main RC app. So, I don't think these features would be very useful. Anyway, maintainers will know better. Let them review.

@thesynthax
Copy link
Contributor Author

This issue describes the necessity. I have personally faced situations in WhatsApp and Discord where it was required to reach the top. It allows to establish the context of the origin of the conversation. Even with the GSoC team channels, most of them had certain messages at the start that were crucial for the aspiring GSoC contributors. Other than that, I feel that this feature may come to use for many, if not all people. Talking about the positioning of the button, I will place it wherever as required or as suggested

@Spiral-Memory
Copy link
Contributor

I understand, but there is a reason why WhatsApp/Discord does not offer this feature. If there are numerous messages, when scrolling up, the application has to load the older messages each time. This process of reloading continues as you scroll up, making the overall experience very inefficient. Additionally, there is no control over how far back you want to go. A more effective feature would be to provide a date option, allowing users to select the specific date they want to navigate to. This gives users more control and streamlines the process. So, having the option to scroll down to go to recent message is one thing that can be added or providing a date picker for accessing older messages and selecting the desired time frame can be added. Rest is up to you..

@thesynthax
Copy link
Contributor Author

That is indeed a good idea to go to a message by date, even Whatsapp has recently implemented this feature. And whatsapp mods already have this feature since long. Maybe integrating this scroll to top option into the date picker would be the best case for this feature.

@Spiral-Memory
Copy link
Contributor

Yep! But that also has to be efficient. It depends on how messages are categorized on the backend. If they are categorized by date, users can access key-value pairs and navigate to those messages efficiently. Many factors need to be taken care of, and it also depends heavily on how the Rocket Chat server handles it. So, I suggest first proposing this feature there. Once it is optimized for message navigation by date, it can be implemented here.

@thesynthax
Copy link
Contributor Author

Yes I understand

@thesynthax
Copy link
Contributor Author

thesynthax commented Mar 12, 2024

Hey @sidmohanty11, @abhinavkrin. We can implement this feature first, then as a complement to the searching message with date feature as mentioned above. Please take a look at this PR whenever you are available. Thank you

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

Successfully merging this pull request may close these issues.

None yet

2 participants