Skip to content

Commit

Permalink
docs: remove review notes from the documentation (GetStream#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela authored Nov 25, 2022
1 parent 8023d0a commit eb444b0
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 233 deletions.
76 changes: 0 additions & 76 deletions docusaurus/docs/React/_docusaurus-components/ReviewNote.jsx

This file was deleted.

28 changes: 0 additions & 28 deletions docusaurus/docs/React/basics/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 2
title: Getting Started
---

import ReviewNote from '../_docusaurus-components/ReviewNote';

This section provides a high level overview of the library setup, core components, and how they fit together. It's a great
starting point and you can follow along in your code editor. For a complete, step-by-step guide in terms setting up a React
project or instructions on creating specific files, see our [React Chat tutorial](https://getstream.io/chat/react-chat/tutorial/).
Expand Down Expand Up @@ -84,17 +82,6 @@ The defaults include:
- `gaming`
- `commerce`

<ReviewNote
id='ab86a784-22f9-11ed-936e-a4bb6d26ac2f'
>
Failing to provide explanation why in the first place should user of the SDK interact with the channel object
directly.
Provide examples of scenarios when a channel object would be needed.
Missing the mention, that ChannelList - if used - loads channel data from the API and thus it integrator does not need
to create channels
Proposing to add recommendation to create channels from the backend
</ReviewNote>

:::note
You can also create [custom channel types](https://getstream.io/chat/docs/react/channel_features/#creating-a-channel-type)
and define your own permission sets.
Expand All @@ -120,12 +107,6 @@ const channel = client.channel('messaging', {
Now that we have a client instance, a connected user, and a channel, it's time to look at the core components involved in building
a fully functioning chat application.

<ReviewNote
id='dcfe3c22-2304-11ed-83ef-a4bb6d26ac2f'
>
Add visualisation - wireframe - to demonstrate the main components in the UI
</ReviewNote>

### Chat

The [`Chat`](../components/core-components/chat.mdx) component is a React Context provider that wraps the entire Stream Chat application. It provides the [`ChatContext`](../components/contexts/chat-context.mdx)
Expand Down Expand Up @@ -199,15 +180,6 @@ In addition to the above referenced UI components, client instantiation, and use
Remember our [Theming](../guides/theming/overview.mdx) and [Customizing Components](../guides/customization/overview.mdx) sections in our guides. They offer you a lot of flexibility when adopting our SDK.
:::

<ReviewNote
id='179e58f8-22fb-11ed-909b-a4bb6d26ac2f'
>
The filters variable should actually include members key:
<CodeBlock>{'const filters = {type: "messaging", members: {$in: [userId]}};'}</CodeBlock>
That means that we should explain how the userId gets there in a real life application. For a real-life example too
soon here?
</ReviewNote>

```tsx
import React, { useEffect, useState } from 'react';
import { StreamChat } from 'stream-chat';
Expand Down
33 changes: 0 additions & 33 deletions docusaurus/docs/React/components/contexts/chat-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 1
title: ChatContext
---

import ReviewNote from '../../_docusaurus-components/ReviewNote';

The `ChatContext` is exposed by the [`Chat`](../core-components/chat.mdx) component. Since `Chat` wraps the entire chat application, all other components in the library
have access to the values stored in this context. You can access the context values by calling the `useChatContext` custom hook.

Expand Down Expand Up @@ -35,13 +33,6 @@ The currently active channel, which populates the [`Channel`](../core-components
| ------- |
| Channel |


<ReviewNote
id='8f87022a-2305-11ed-9971-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>

### closeMobileNav

The function to close mobile navigation.
Expand Down Expand Up @@ -83,12 +74,6 @@ An array of users that have been muted by the connected user.
| ------ |
| Mute[] |

<ReviewNote
id='db6b3990-2305-11ed-bcfc-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>

### navOpen

When the screen width is at a mobile breakpoint, whether the mobile navigation menu is open.
Expand All @@ -97,12 +82,6 @@ When the screen width is at a mobile breakpoint, whether the mobile navigation m
|---------|---------|
| boolean | true |

<ReviewNote
id='eeaf7eb2-2305-11ed-9285-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>

### openMobileNav

The function to open mobile navigation.
Expand All @@ -120,12 +99,6 @@ You can override the default behavior by pulling it from context and then utiliz
|----------|
| function |

<ReviewNote
id='57bc33a6-2369-11ed-aefd-a4bb6d26ac2f'
>
Should we remove this value from the chat context?
</ReviewNote>

### theme

Deprecated and to be removed in a future major release. Use the `customStyles` prop to adjust CSS variables and [customize the theme](../../guides/theming/css-and-theming.mdx#css-variables) of your app.
Expand All @@ -134,12 +107,6 @@ Deprecated and to be removed in a future major release. Use the `customStyles` p
| ----- |
| Theme |

<ReviewNote
id='df7331b2-243d-11ed-8076-a4bb6d26ac2f'
>
Proposing to add information about which release has introduced a given prop/value
</ReviewNote>

### themeVersion

Stream chat theme version 2 has been introduced with the release of stream-chat-react v10.0.0. This flag is used internally by some UI components of the SDK and the integrators shouldn't need to use it. The value is extracted from a CSS variable `--str-chat__theme-version`. You can set it to values `'1'` or `'2'` in your stylesheets and import the corresponding v2 stylesheet from `stream-chat-react/dist`. Find out more about benefits that the theme version 2 brings to the integrators with [the theming guide](../../guides/theming/css-and-theming.mdx).
Expand Down
16 changes: 0 additions & 16 deletions docusaurus/docs/React/components/core-components/channel-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title: ChannelList
import CodeBlock from '@theme/CodeBlock';

import GHComponentLink from '../../_docusaurus-components/GHComponentLink';
import ReviewNote from '../../_docusaurus-components/ReviewNote';


The `ChannelList` component queries an array of `channel` objects from the Stream Chat API and displays as a customizable list
Expand All @@ -23,14 +22,6 @@ The `ChannelList` component also comes pre-built with navigation functionality.

## Basic Usage

<ReviewNote
id='a0523cee-2375-11ed-8530-a4bb6d26ac2f'
>
Proposing to make filters mandatory as per the JS docs requirement: At a minimum, the filter should include:
<CodeBlock>{`{members: { $in: [userID] }}`}</CodeBlock>
It is confusing to newcomers that the channels query fails due to this missing param
</ReviewNote>

The `ChannelList` does not have any required props, but in order to refine channel query results we recommend providing
values for [`filters`](#filters), [`sort`](#sort) and [`options`](#options).

Expand Down Expand Up @@ -373,13 +364,6 @@ Function to override the default behavior when rendering channels, so this funct
|----------|
| function |

<ReviewNote
id='6bd7d78e-2542-11ed-a44c-a4bb6d26ac2f'
>
Missing example use case to better understand the purpose. The default `List` component does not make use of the
loadedChannels prop
</ReviewNote>

### sendChannelsToList

If true, sends the list's currently loaded channels to the `List` component as the `loadedChannels` prop.
Expand Down
26 changes: 0 additions & 26 deletions docusaurus/docs/React/components/core-components/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 2
title: Chat
---

import ReviewNote from '../../_docusaurus-components/ReviewNote';

The `Chat` component is a React Context provider that wraps the entire Stream Chat application. It provides the [`ChatContext`](../contexts/chat-context.mdx)
to its children, which includes the `StreamChat` client instance. All other components within the library must be nested as children
of `Chat` to maintain proper functionality.
Expand Down Expand Up @@ -56,12 +54,6 @@ for implementation assistance.
| ------ |
| object |

<ReviewNote
id='d24641be-2302-11ed-a4fd-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>

### customStyles

Object containing custom styles to override the default CSS variables. See [CSS and Theming](../../guides/theming/css-and-theming.mdx)
Expand All @@ -71,12 +63,6 @@ for implementation assistance.
| ------ |
| object |

<ReviewNote
id='045d0e58-2303-11ed-add3-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>

### darkMode

If true, toggles the CSS variables to the default dark mode color palette.
Expand Down Expand Up @@ -115,12 +101,6 @@ const i18nInstance = new Streami18n({
| ------ |
| object |
<ReviewNote
id='1183a05a-2304-11ed-b48a-a4bb6d26ac2f'
>
This applies only to theme V1. We should include deprecation notice.
</ReviewNote>
### initialNavOpen
When the screen width is at a mobile breakpoint, whether or not the mobile navigation menu is open.
Expand All @@ -129,12 +109,6 @@ When the screen width is at a mobile breakpoint, whether or not the mobile navig
| ------- | ------- |
| boolean | true |
<ReviewNote
id='4ee6062c-2304-11ed-aee7-a4bb6d26ac2f'
>
Should we remove this prop?
</ReviewNote>
### theme
Deprecated and to be removed in a future major release. Use the `customStyles` prop to adjust CSS variables and [customize the theme](../../guides/theming/css-and-theming.mdx#css-variables) of your app.
Expand Down
10 changes: 0 additions & 10 deletions docusaurus/docs/React/components/core-components/message-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: MessageList
---

import GHComponentLink from '../../_docusaurus-components/GHComponentLink';
import ReviewNote from '../../_docusaurus-components/ReviewNote';

import MessageActionsBoxWithCustomAction from '../../assets/message-actions-box-custom-actions.png';

Expand Down Expand Up @@ -285,11 +284,6 @@ Whether the list has more items to load.
| ------- | ------------------------------------------------------------------------------------ |
| boolean | [ChannelStateContextValue['hasMore']](../contexts/channel-state-context.mdx#hasmore) |

<ReviewNote id='6af16f24-2849-11ed-a3b5-a4bb6d26ac2f'>
This prop needs a link to an example or a demonstration of use of header component and its
positioning.
</ReviewNote>

### headerPosition

Position to render the `HeaderComponent` in the list.
Expand Down Expand Up @@ -414,10 +408,6 @@ Custom action handler function to run on click of user avatar.

Custom action handler function to run on hover of user avatar.

<ReviewNote id='c6f3972e-2854-11ed-9abc-a4bb6d26ac2f'>
Shouldn't the event type be MouseEvent?
</ReviewNote>

| Type |
| ----------------------------------------------------- |
| (event: React.BaseSyntheticEvent, user: User) => void |
Expand Down
8 changes: 0 additions & 8 deletions docusaurus/docs/React/components/core-components/thread.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 7
title: Thread
---

import ReviewNote from '../../_docusaurus-components/ReviewNote';

The `Thread` component renders a list of replies tied to a single parent message in a channel's main message list.
A `Thread` maintains its own state and renders its own `MessageList` and `MessageInput` components. Each piece of
rendered UI can be overridden with custom components either drawn from the `ComponentContext` or supplied via props.
Expand Down Expand Up @@ -172,12 +170,6 @@ Controls injection of <GHComponentLink text='DateSeparator' path='/DateSeparator
|---------|---------|
| boolean | false |

<ReviewNote
id='787aad50-2866-11ed-88c5-a4bb6d26ac2f'
>
Proposing the <pre>fullWidth</pre> prop to be deprecated / removed. The container width should be handled by CSS.
</ReviewNote>

### fullWidth

If true, displays the thread at 100% width of its parent container, useful for mobile styling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: VirtualizedMessageList
---

import GHComponentLink from '../../_docusaurus-components/GHComponentLink';
import ReviewNote from '../../_docusaurus-components/ReviewNote';

The `VirtualizedMessageList` component renders a scrollable list of messages. It differs from the standard `MessageList`
in that it handles UI virtualization by default. Virtualization is a technique used to emulate large lists of elements by
Expand Down Expand Up @@ -224,12 +223,6 @@ If true, group messages belonging to the same user, otherwise show each message
|---------|---------|
| boolean | false |

<ReviewNote
id='5f3a9958-2849-11ed-84d3-a4bb6d26ac2f'
>
This flag does not work. Can we deprecate it? See the <a href='https://github.com/GetStream/stream-chat-react/issues/1729' target='_blank'>GH issue</a>.
</ReviewNote>

### separateGiphyPreview

If true, the Giphy preview will render as a separate component above the `MessageInput`, rather than inline with the other messages in the list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Attachments
---

import GHComponentLink from '../../_docusaurus-components/GHComponentLink';
import ReviewNote from '../../_docusaurus-components/ReviewNote';
import ImageSizingScreenshot1 from '../../assets/ImageSizing1.png';
import ImageSizingScreenshot2 from '../../assets/ImageSizing2.png';
import ImageSizingScreenshot3 from '../../assets/ImageSizing3.png';
Expand Down Expand Up @@ -177,11 +176,6 @@ The handler function to call when an action is performed on an attachment, examp
| ----------------------------------------------------------------------------------------------------- |
| (dataOrName?: string \| FormData, value?: string, event?: React.BaseSyntheticEvent) => Promise<void\> |
<ReviewNote author='Martin Cupela' id='04803878-3362-11ed-8912-a4bb6d26ac2f'>
What are attachment actions, what is their use case / recipes? Missing concept explanation. It
would be nice to have a link to a doc explaining these.
</ReviewNote>
### AttachmentActions
Custom UI component for displaying attachment actions.
Expand Down
Loading

0 comments on commit eb444b0

Please sign in to comment.