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

fix: Inconsistent rendering on scrollToBottom button #559

Merged
merged 2 commits into from
May 26, 2023

Conversation

sravan-s
Copy link
Contributor

While refactor, we removed scrollToButton, it got coupled with handleOnScroll
which means, it would be called only when data fetching is involved
Seperating these logics would fix this

fixes: https://sendbird.atlassian.net/browse/UIKIT-3972

@sravan-s sravan-s requested a review from HoonBaek May 25, 2023 14:16
@sravan-s sravan-s self-assigned this May 25, 2023
@sravan-s sravan-s force-pushed the fix/UIKIT-3972/scroll_bottom branch from d5781f6 to a8ddde6 Compare May 25, 2023 14:19
@sravan-s
Copy link
Contributor Author

Kapture 2023-05-25 at 23 17 15

Copy link
Collaborator

@HoonBaek HoonBaek left a comment

Choose a reason for hiding this comment

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

Wow, the test codes look awesome

@@ -17,6 +17,9 @@ import useSendbirdStateContext from '../../../../hooks/useSendbirdStateContext';
import { UserMessage } from '@sendbird/chat/message';
import { MessageProvider } from '../../../Message/context/MessageProvider';
import { useHandleOnScrollCallback } from '../../../../hooks/useHandleOnScrollCallback';
import { useSetScrollToBottom } from './hooks/useSetScrollToBottom';

const SCROLL_BOTTOM_PADDING = 200;
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't it too big?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

set as 50

@sravan-s sravan-s merged commit 540eee2 into main May 26, 2023
2 checks passed
@sravan-s sravan-s deleted the fix/UIKIT-3972/scroll_bottom branch May 26, 2023 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants