Skip to content

Commit

Permalink
docs: merge v11 release guides and adjust links (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Nov 27, 2023
1 parent 8fd13e3 commit 2cc3b70
Show file tree
Hide file tree
Showing 12 changed files with 544 additions and 566 deletions.
4 changes: 2 additions & 2 deletions docusaurus/docs/React/basics/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The [`Channel`](../components/core-components/channel.mdx) component is a React
It provides five separate contexts to its children:

:::caution
`EmojiContext` has been removed in version `11.0.0`, see related release guides (["Reactions 11.0.0"](../release-guides/reactions-v11.mdx), ["EmojiPicker 11.0.0"](../release-guides/emoji-picker-v11.mdx) and ["emojiSearchIndex 11.0.0"](../release-guides/emoji-search-index-v11.mdx)) to adjust your integration to this new change.
`EmojiContext` has been removed in version `11.0.0`, see related release guides ([Introducing new reactions](../release-guides/upgrade-to-v11.mdx#introducing-new-reactions), [Dropping support for built-in `EmojiPicker`](../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojipicker) and [Dropping support for built-in `EmojiIndex`](../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojiindex)) to adjust your integration to this new change.
:::

- [`ChannelStateContext`](../components/contexts/channel-state-context.mdx) - stateful data (ex: `messages` or `members`)
Expand Down Expand Up @@ -182,7 +182,7 @@ The SDK is equipped with features designed to facilitate seamless integration, e

Starting from version `11.0.0`, these features are entirely optional, requiring integrators to opt-in manually. The decision was made in conjunction with enhanced architecture, aiming to reduce the overall size of the final bundles of our integrators.

Make sure to read ["EmojiPicker 11.0.0"](../release-guides/emoji-picker-v11.mdx) and ["emojiSearchIndex 11.0.0"](../release-guides/emoji-search-index-v11.mdx) release guides for more information.
Make sure to read ["Dropping support for built-in `EmojiPicker`"](../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojipicker) and ["Dropping support for built-in `EmojiIndex`"](../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojiindex) release guides for more information.

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: EmojiContext
---

:::caution
`EmojiContext` has been removed in version `11.0.0`, see related release guides (["Reactions 11.0.0"](../release-guides/reactions-v11.mdx), ["EmojiPicker 11.0.0"](../release-guides/emoji-picker-v11.mdx) and ["emojiSearchIndex 11.0.0"](../release-guides/emoji-search-index-v11.mdx)) to adjust your integration to this new change.
`EmojiContext` has been removed in version `11.0.0`, see related release guides ([Introducing new reactions](../../release-guides/upgrade-to-v11.mdx#introducing-new-reactions), [Dropping support for built-in `EmojiPicker`](../../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojipicker) and [Dropping support for built-in `EmojiIndex`](../../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojiindex)) to adjust your integration to this new change.
:::

The `EmojiContext` is established by the `Channel` component and exposes the `useEmojiContext` hook. This context holds
Expand Down
22 changes: 11 additions & 11 deletions docusaurus/docs/React/components/core-components/channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,30 +183,30 @@ Optional configuration parameters used for the initial channel query. Applied on
In the example below, we specify, that the first page of messages when a channel is queried should have 20 messages (the default is 100). Note that the `channel` prop has to be passed along `channelQueryOptions`.

```tsx
import {ChannelQueryOptions} from "stream-chat";
import {Channel, useChatContext} from "stream-chat-react";
import { ChannelQueryOptions } from 'stream-chat';
import { Channel, useChatContext } from 'stream-chat-react';

const channelQueryOptions: ChannelQueryOptions = {
messages: { limit: 20 },
};

type ChannelRendererProps = {
id: string;
type: string;
id: string;
type: string;
};

const ChannelRenderer = ({id, type}: ChannelRendererProps) => {
const ChannelRenderer = ({ id, type }: ChannelRendererProps) => {
const { client } = useChatContext();
return (
<Channel channel={client.channel(type, id)} channelQueryOptions={channelQueryOptions}>
{/* Channel children */}
</Channel>
);
}
};
```

| Type |
|-----------------------|
| --------------------- |
| `ChannelQueryOptions` |

### CooldownTimer
Expand All @@ -229,8 +229,8 @@ Custom UI component for date separators.

Custom action handler to override the default `client.deleteMessage(message.id)` function.

| Type |
|---------------------------------------------------------------------------------------------------------------------------|
| Type |
| ---------------------------------------------------------------------------------------------- |
| `(message: StreamMessage<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>>` |

The function can execute different logic for message replies compared to messages in the main message list based on the `parent_id` property of `StreamMessage` object:
Expand Down Expand Up @@ -330,15 +330,15 @@ Custom search mechanism class to override default `NimbleEmojiIndex` class from

### emojiSearchIndex (available since `11.0.0`)

Custom search mechanism instance or object to enable emoji autocomplete. See ["emojiSearchIndex 11.0.0"](../../release-guides/emoji-search-index-v11.mdx) release guide for more information.
Custom search mechanism instance or object to enable emoji autocomplete. See ["Dropping support for built-in `EmojiIndex`"](../../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojiindex) release guide for more information.

| Type | Default |
| ------ | --------- |
| object | undefined |

### EmojiPicker (changed in `11.0.0`)

Custom UI component to override default `NimblePicker` from `emoji-mart`. Markup structure changed in `11.0.0`, see ["EmojiPicker 11.0.0"](../../release-guides/emoji-picker-v11.mdx) release guide for more information.
Custom UI component to override default `NimblePicker` from `emoji-mart`. Markup structure changed in `11.0.0`, see ["Dropping support for built-in `EmojiPicker`"](../../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojipicker) release guide for more information.

| Version | Type | Default |
| ------- | --------- | -------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Reactions
import GHComponentLink from '../../_docusaurus-components/GHComponentLink';

:::caution
If you're moving from older versions to `11.0.0` then make sure to read ["Reactions 11.0.0"](../../release-guides/reactions-v11.mdx) release guide to help you transition to the new implementation.
If you're moving from older versions to `11.0.0` then make sure to read ["Introducing new reactions"](../../release-guides/upgrade-to-v11.mdx#introducing-new-reactions) release guide to help you transition to the new implementation.
:::

The Stream Chat API provides built-in support for adding reactions to messages. The component library provides three default components to enable reaction selection and display:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Emoji Picker
import CustomEmojiPicker from '../../assets/CustomEmojiPicker.png';

:::caution
Note that this guide is for versions lower than `11.0.0`, the new API has slightly changed. See the ["EmojiPicker 11.0.0"](../../release-guides/emoji-picker-v11.mdx) release guide to help you transition smoothly to the new API.
Note that this guide is for versions lower than `11.0.0`, the new API has slightly changed. See the ["Dropping support for built-in `EmojiPicker`"](../../release-guides/upgrade-to-v11.mdx#dropping-support-for-built-in-emojipicker) release guide to help you transition smoothly to the new API.
:::

In this example, we will demonstrate how to create a custom Emoji Picker component that can be used in the `MessageInput`. This component will replace the default [`EmojiPicker`](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/EmojiPicker.tsx) with only breakfast food emojis.
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/React/guides/theming/reactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import CustomReactionSelector from '../../assets/CustomReactionSelector.png';
import CustomReactionsList from '../../assets/CustomReactionsList.png';

:::caution
If you're moving from older versions to `11.0.0` then make sure to read ["Reactions 11.0.0"](../../release-guides/reactions-v11.mdx) release guide to help you transition to the new implementation.
If you're moving from older versions to `11.0.0` then make sure to read ["Introducing new reactions"](../../release-guides/upgrade-to-v11.mdx#introducing-new-reactions) release guide to help you transition to the new implementation.
:::

In this example, we will demonstrate how to override the library's default reaction set, which can be found stored as the
Expand Down
84 changes: 0 additions & 84 deletions docusaurus/docs/React/release-guides/emoji-picker-v11.mdx

This file was deleted.

138 changes: 0 additions & 138 deletions docusaurus/docs/React/release-guides/emoji-search-index-v11.mdx

This file was deleted.

Loading

0 comments on commit 2cc3b70

Please sign in to comment.