Skip to content

Commit

Permalink
[CLNP-6249] deprecated mark for ChannelXXX (#1302)
Browse files Browse the repository at this point in the history
- Added @deprecated annotation to the deprecated Channel components

Fixes [CLNP-6249](https://sendbird.atlassian.net/browse/CLNP-6249)

### Changelogs

### Checklist

Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If unsure, ask the members.
This is a reminder of what we look for before merging your code.

- [ ] **All tests pass locally with my changes**
- [ ] **I have added tests that prove my fix is effective or that my
feature works**
- [ ] **Public components / utils / props are appropriately exported**
- [ ] I have added necessary documentation (if appropriate)


## External Contributions

This project is not yet set up to accept pull requests from external
contributors.

If you have a pull request that you believe should be accepted, please
contact
the Developer Relations team <[email protected]> with
details
and we'll evaluate if we can set up a
[CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) to
allow for the contribution.


[CLNP-6249]:
https://sendbird.atlassian.net/browse/CLNP-6249?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
chrisallo authored Jan 22, 2025
1 parent 63ed666 commit cdeb26e
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/Channel/components/ChannelHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export interface ChannelHeaderProps {
className?: string;
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
export const ChannelHeader = ({ className }: ChannelHeaderProps) => {
const context = useChannelContext();
return (
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/ChannelUI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export interface ChannelUIProps extends GroupChannelUIBasicProps {
renderMessage?: GroupChannelUIBasicProps['renderMessage'];
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
const ChannelUI = (props: ChannelUIProps) => {
const context = useChannelContext();
const { channelUrl, isInvalid } = context;
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/FileViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export interface FileViewerProps {
message: FileMessage;
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
export const FileViewer = (props: FileViewerProps) => {
const { deleteMessage } = useChannelContext();
return <FileViewerView {...props} deleteMessage={deleteMessage} />;
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/Message/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import MessageView, { MessageProps } from '../../../GroupChannel/components/Mess
import FileViewer from '../FileViewer';
import RemoveMessageModal from '../RemoveMessageModal';

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
const Message = (props: MessageProps) => {
const { config } = useSendbirdStateContext();
const {
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/MessageInputWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export interface MessageInputWrapperProps {
renderSendMessageIcon?: GroupChannelUIBasicProps['renderSendMessageIcon'];
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
export const MessageInputWrapper = (props: MessageInputWrapperProps) => {
const context = useChannelContext();
const { quoteMessage, currentGroupChannel, sendMessage, sendFileMessage, sendVoiceMessage, sendMultipleFilesMessage } = context;
Expand Down
7 changes: 7 additions & 0 deletions src/modules/Channel/components/MessageList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ export interface MessageListProps extends GroupChannelMessageListProps {
* */
renderMessage?: GroupChannelUIBasicProps['renderMessage'];
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
export const MessageList = (props: MessageListProps) => {
const { className = '' } = props;
const {
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/RemoveMessageModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import RemoveMessageModalView, {
} from '../../../GroupChannel/components/RemoveMessageModal/RemoveMessageModalView';
import { useChannelContext } from '../../context/ChannelProvider';

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
const RemoveMessageModal = (props: RemoveMessageModalProps) => {
const { deleteMessage } = useChannelContext();
return <RemoveMessageModalView {...props} deleteMessage={deleteMessage} />;
Expand Down
6 changes: 6 additions & 0 deletions src/modules/Channel/components/SuggestedMentionList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { useChannelContext } from '../../context/ChannelProvider';

export type SuggestedMentionListProps = Omit<SuggestedMentionListViewProps, 'currentChannel'>;

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
export const SuggestedMentionList = (props: SuggestedMentionListProps) => {
const { currentGroupChannel } = useChannelContext();
return (
Expand Down
6 changes: 6 additions & 0 deletions src/modules/ChannelList/components/ChannelListUI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export interface ChannelListUIProps {
renderPlaceHolderEmptyList?: (props: void) => React.ReactElement;
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
const ChannelListUI: React.FC<ChannelListUIProps> = (props: ChannelListUIProps) => {
const { renderHeader, renderChannelPreview, renderPlaceHolderError, renderPlaceHolderLoading, renderPlaceHolderEmptyList } = props;

Expand Down
6 changes: 6 additions & 0 deletions src/modules/ChannelList/components/ChannelPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ interface ChannelPreviewInterface extends GroupChannelListItemBasicProps {
isActive?: boolean;
}

/**
* @deprecated This component is deprecated and will be removed in the next major update.
* Please use the `GroupChannel` component from '@sendbird/uikit-react/GroupChannel' instead.
* For more information, please refer to the migration guide:
* https://docs.sendbird.com/docs/chat/uikit/v3/react/introduction/group-channel-migration-guide
*/
const ChannelPreview = ({
channel,
isActive = false,
Expand Down

0 comments on commit cdeb26e

Please sign in to comment.