Skip to content
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
1 change: 0 additions & 1 deletion examples/vite/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ const App = () => {
overrides={{
emojiSearchIndex: SearchIndex,
EmojiPicker: EmojiPickerWithCustomOptions,
MessageListNotifications: ConfigurableNotificationList,
NotificationList: ConfigurableNotificationList,
ReactionsList: CustomMessageReactions,
reactionOptions: newReactionOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Attachment/VoiceRecording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
type AudioPlayerState,
DurationDisplay,
PlaybackRateButton,
useAudioPlayer,
WaveProgressBar,
} from '../AudioPlayback';
import { useAudioPlayer } from '../AudioPlayback/WithAudioPlayback';
import { useStateStore } from '../../store';
import { PlayButton } from '../Button';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import {
type AudioPlayerState,
DurationDisplay,
PlaybackRateButton,
useAudioPlayer,
WaveProgressBar,
} from '../../AudioPlayback';
import { useAudioPlayer } from '../../AudioPlayback/WithAudioPlayback';
import { useStateStore } from '../../../store';

export type AudioAttachmentPreviewProps<CustomLocalMetadata = Record<string, unknown>> =
Expand Down
14 changes: 7 additions & 7 deletions src/components/MessageList/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ import {
} from '../../constants/limits';
import { useLastOwnMessage } from './hooks/useLastOwnMessage';
import { ScrollToLatestMessageButton } from './ScrollToLatestMessageButton';
import { NotificationList, useNotificationTarget } from '../Notifications';
import {
NotificationList as DefaultNotificationList,
useNotificationTarget,
} from '../Notifications';

type MessageListWithContextProps = Omit<
ChannelStateContextValue,
Expand Down Expand Up @@ -95,15 +98,12 @@ const MessageListWithContext = (props: MessageListWithContextProps) => {
EmptyStateIndicator = DefaultEmptyStateIndicator,
LoadingIndicator = DefaultLoadingIndicator,
MessageListMainPanel = DefaultMessageListMainPanel,
MessageListNotifications = undefined,
MessageListWrapper = 'ul',
NewMessageNotification = DefaultNewMessageNotification,
NotificationList: NotificationListFromContext = NotificationList,
NotificationList = DefaultNotificationList,
TypingIndicator = DefaultTypingIndicator,
UnreadMessagesNotification = DefaultUnreadMessagesNotification,
} = useComponentContext('MessageList');
const MessageListNotificationsComponent =
MessageListNotifications ?? NotificationListFromContext;
} = useComponentContext();

const notificationTarget = useNotificationTarget();

Expand Down Expand Up @@ -307,7 +307,7 @@ const MessageListWithContext = (props: MessageListWithContextProps) => {
threadList={threadList}
/>
</DialogManagerProvider>
<MessageListNotificationsComponent panel={notificationTarget} />
<NotificationList panel={notificationTarget} />
</MessageListMainPanel>
</MessageTranslationViewProvider>
</MessageListContextProvider>
Expand Down
25 changes: 0 additions & 25 deletions src/components/MessageList/MessageListNotifications.tsx

This file was deleted.

12 changes: 6 additions & 6 deletions src/components/MessageList/VirtualizedMessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ import {
} from '../MessageList';
import { DateSeparator as DefaultDateSeparator } from '../DateSeparator';
import { EventComponent as DefaultMessageSystem } from '../EventComponent';
import { NotificationList, useNotificationTarget } from '../Notifications';
import {
NotificationList as DefaultNotificationList,
useNotificationTarget,
} from '../Notifications';

import { DialogManagerProvider } from '../../context';
import type { ChannelActionContextValue } from '../../context/ChannelActionContext';
Expand Down Expand Up @@ -245,17 +248,14 @@ const VirtualizedMessageListWithContext = (
DateSeparator = DefaultDateSeparator,
GiphyPreviewMessage = DefaultGiphyPreviewMessage,
MessageListMainPanel = DefaultMessageListMainPanel,
MessageListNotifications = undefined,
MessageSystem = DefaultMessageSystem,
NewMessageNotification = DefaultNewMessageNotification,
NotificationList: NotificationListFromContext = NotificationList,
NotificationList = DefaultNotificationList,
TypingIndicator,
UnreadMessagesNotification = DefaultUnreadMessagesNotification,
UnreadMessagesSeparator = DefaultUnreadMessagesSeparator,
VirtualMessage: MessageUIComponentFromContext = MessageSimple,
} = useComponentContext('VirtualizedMessageList');
const MessageListNotificationsComponent =
MessageListNotifications ?? NotificationListFromContext;
const MessageUIComponent = MessageUIComponentFromProps || MessageUIComponentFromContext;

const { client, customClasses } = useChatContext('VirtualizedMessageList');
Expand Down Expand Up @@ -596,7 +596,7 @@ const VirtualizedMessageListWithContext = (
/>
</div>
</DialogManagerProvider>
<MessageListNotificationsComponent panel={notificationTarget} />
<NotificationList panel={notificationTarget} />
</MessageListMainPanel>
{giphyPreviewMessage && <GiphyPreviewMessage message={giphyPreviewMessage} />}
</MessageTranslationViewProvider>
Expand Down
1 change: 0 additions & 1 deletion src/components/MessageList/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './ConnectionStatus'; // TODO: export this under its own folder
export * from './GiphyPreviewMessage';
export * from './MessageList';
export * from './MessageListNotifications';
export * from './NewMessageNotification';
export * from './ScrollToLatestMessageButton';
export * from './UnreadMessagesNotification';
Expand Down
2 changes: 0 additions & 2 deletions src/context/ComponentContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ export type ComponentContextValue = {
MessageListMainPanel?: React.ComponentType<PropsWithChildrenOnly>;
/** Custom UI component to display notifications rendered by `NotificationList`, defaults to and accepts same props as: [NotificationList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Notifications/NotificationList.tsx) */
NotificationList?: React.ComponentType<NotificationListProps>;
/** Custom UI component that displays message and connection status notifications in the `MessageList`, defaults to and accepts same props as [DefaultMessageListNotifications](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/MessageListNotifications.tsx) */
MessageListNotifications?: React.ComponentType<NotificationListProps>;
/** Custom UI component to display a notification when scrolled up the list and new messages arrive, defaults to and accepts same props as [NewMessageNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/NewMessageNotification.tsx) */
NewMessageNotification?: React.ComponentType<NewMessageNotificationProps>;
/** Custom UI component to display message replies, defaults to and accepts same props as: [MessageRepliesCountButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageRepliesCountButton.tsx) */
Expand Down
Loading