Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/allow-custom-react-markdown…
Browse files Browse the repository at this point in the history
…-plugin-composition' into feat/allow-custom-react-markdown-plugin-composition
  • Loading branch information
MartinCupela committed Oct 25, 2023
2 parents aa84725 + e669205 commit 0e2ab8e
Show file tree
Hide file tree
Showing 24 changed files with 997 additions and 266 deletions.
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

0 comments on commit 0e2ab8e

Please sign in to comment.