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(VirtualizedMessageList): allow to merge custom virtuoso components with the SDK defaults #2140

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/DateSeparator/DateSeparator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const UnMemoizedDateSeparator = (props: DateSeparatorProps) => {
});

return (
<div className='str-chat__date-separator'>
<div className='str-chat__date-separator' data-testid='date-separator'>
{(position === 'right' || position === 'center') && (
<hr className='str-chat__date-separator-line' />
)}
Expand Down
4 changes: 4 additions & 0 deletions src/components/DateSeparator/__tests__/DateSeparator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('DateSeparator', () => {
expect(tree).toMatchInlineSnapshot(`
<div
className="str-chat__date-separator"
data-testid="date-separator"
>
<hr
className="str-chat__date-separator-line"
Expand Down Expand Up @@ -80,6 +81,7 @@ describe('DateSeparator', () => {
expect(tree).toMatchInlineSnapshot(`
<div
className="str-chat__date-separator"
data-testid="date-separator"
>
<hr
className="str-chat__date-separator-line"
Expand All @@ -99,6 +101,7 @@ describe('DateSeparator', () => {
expect(tree).toMatchInlineSnapshot(`
<div
className="str-chat__date-separator"
data-testid="date-separator"
>
<div
className="str-chat__date-separator-date"
Expand All @@ -117,6 +120,7 @@ describe('DateSeparator', () => {
expect(tree).toMatchInlineSnapshot(`
<div
className="str-chat__date-separator"
data-testid="date-separator"
>
<hr
className="str-chat__date-separator-line"
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventComponent/EventComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const UnMemoizedEventComponent = <

if (type === 'system')
return (
<div className='str-chat__message--system'>
<div className='str-chat__message--system' data-testid='message-system'>
<div className='str-chat__message--system__text'>
<div className='str-chat__message--system__line' />
<p>{text}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('EventComponent', () => {
expect(tree).toMatchInlineSnapshot(`
<div
className="str-chat__message--system"
data-testid="message-system"
>
<div
className="str-chat__message--system__text"
Expand Down
8 changes: 5 additions & 3 deletions src/components/MessageList/MessageList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from 'react';

import { useEnrichedMessages } from './hooks/useEnrichedMessages';
import { useMessageListElements } from './hooks/useMessageListElements';
import { useScrollLocationLogic } from './hooks/useScrollLocationLogic';
import {
useEnrichedMessages,
useMessageListElements,
useScrollLocationLogic,
} from './hooks/MessageList';

import { MessageNotification as DefaultMessageNotification } from './MessageNotification';
import { MessageListNotifications as DefaultMessageListNotifications } from './MessageListNotifications';
Expand Down
Loading
Loading