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: Scroll to bottom in a click. #33284

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Barrylimarti
Copy link

Proposed changes (including videos or screenshots)

There is no way to go down to the bottom of the chat if you scrolled way too much in your channel. It becomes irritating sometimes to scroll way down to reach the bottom. Although, there were buttons that popped whenever there are new messages to see that message which practically brings you to the bottom, but that's not always the case.

Things that I added includes:-

  1. New Jump to bottom button, which pops at the screen whenever user scrolls and is not at bottom.
  2. This button disappears automatically after 4 seconds (This can be changed according to requirement)
  3. This won't be displayed in case user has new message as it has already been implemented.

In terms of code change:-

  1. I added a new component for Jump to bottom button.
  2. Created a new hook useIsScroll, to know when scroll is triggered and when it is stopped. This is a reusable hook if needed for other purposes.
  3. I also added the translations for the button with key "Jump_to_bottom" in the i18n package.
Screen.Recording.2024-09-14.at.1.54.13.AM.mov

Issue(s)

This is a long pending feature request

Steps to test or reproduce

This is a new feature

Further comments

I couldn't find tests for these. Let me know if its there and it needs to be added.

@Barrylimarti Barrylimarti requested a review from a team as a code owner September 13, 2024 20:31
Copy link
Contributor

dionisio-bot bot commented Sep 13, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: 32e7aeb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
@rocket.chat/i18n Minor
@rocket.chat/meteor Minor
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/ui-client Major
@rocket.chat/uikit-playground Patch
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/model-typings Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Barrylimarti
Copy link
Author

Hi! Can I get a review on this? If it needs changes do let know! Thanks.

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.

1 participant