You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you are importing the default styles correctly as `import 'stream-chat-react/dist/css/v2/index.css';`
76
76
:::
77
77
@@ -80,7 +80,7 @@ Make sure you are importing the default styles correctly as `import 'stream-chat
80
80
With the version 10 of `stream-chat-react` new stylesheet has been introduced. The stylesheet used previously became a legacy stylesheet. Legacy stylesheet had often times CSS classes and SDK components, that were not supported with the new stylesheet. Now, the legacy stylesheet and corresponding CSS classes and SDK component are being removed.
81
81
82
82
:::caution
83
-
These changes will impact you only, if you have imported the CSS as one of the following (you have used the legacy styles):
83
+
These changes will impact you only if you have imported the CSS as one of the following (you have used the legacy styles):
Supporting two stylesheet lead to introduction of a flag `themeVersion` into the `ChatContext`. This flag is no more necessary and has been removed from the context value.
98
98
99
99
:::important
100
-
**Action required**<br/>
101
-
Make sure you are not using `themeVersion in your custom components.
100
+
**Action required**
101
+
Make sure you are not using `themeVersion` in your custom components.
102
102
:::
103
103
104
104
### Removal of styles related Chat props
@@ -114,17 +114,17 @@ Also associated parts of code were removed:
114
114
-`useCustomStyles` hook
115
115
116
116
:::important
117
-
**Action required**<br/>
118
-
1 The styles applied through `customStyles` should be applied through custom CSS.
119
-
2 Theme (not only dark theme) can be through `Chat` prop `theme` instead of `darkMode`
117
+
**Action required**
118
+
1\. The styles applied through `customStyles` should be applied through custom CSS.
119
+
2\. Theme (not only dark theme) can be through `Chat` prop `theme` instead of `darkMode`
120
120
:::
121
121
122
122
### Removal from ComponentContext
123
123
124
124
-`AutocompleteSuggestionHeader` - the up-to-date SDK markup does not count with a header in the `ChatAutoComplete` suggestion list
125
125
126
126
:::important
127
-
**Action required**<br/>
127
+
**Action required**
128
128
Make sure you are passing these custom components to the `Channel` component.
129
129
:::
130
130
@@ -133,10 +133,10 @@ Make sure you are passing these custom components to the `Channel` component.
133
133
The following components are not available anymore as they were related to legacy stylesheet and are not used by the latest SDK components.
134
134
135
135
:::important
136
-
**Action required**<br/>
137
-
1 Remove imports of these components from `stream-chat-react` in your custom components.<br/>
138
-
2 If importing `SendIconV2` rename it to `SendIcon`.<br/>
139
-
3 Remove the listed classes if used in your CSS.
136
+
**Action required**
137
+
1\. Remove imports of these components from `stream-chat-react` in your custom components.
138
+
2\. If importing `SendIconV2` rename it to `SendIcon`.
139
+
3\. Remove the listed classes if used in your CSS.
140
140
:::
141
141
142
142
| Component | Details | Removed CSS classes |
@@ -161,7 +161,7 @@ The following components are not available anymore as they were related to legac
161
161
The `FileIcon` component does not accept argument `version` anymore. This parameter used to determine the file icon set. There were two sets - version `'1'` and `'2'`. The icons of version `'1'` have been rendered with legacy stylesheets in the SDK components. The icons displayed under the version `'1'` have been removed now.
162
162
163
163
:::important
164
-
**Action required**<br/>
164
+
**Action required**
165
165
Remove prop `version` if the `FileIcon` is used in your custom components.
166
166
:::
167
167
@@ -170,7 +170,7 @@ Remove prop `version` if the `FileIcon` is used in your custom components.
170
170
We have removed classes that were used in the legacy CSS stylesheet only and thus are redundant. We recommend to use classes that were already available previously and are used by the SDK stylesheet:
171
171
172
172
:::important
173
-
**Action required**<br/>
173
+
**Action required**
174
174
Replace the removed classes with their alternatives in the custom CSS.
175
175
:::
176
176
@@ -222,7 +222,7 @@ Replace the removed classes with their alternatives in the custom CSS.
222
222
Migration to non-legacy styles leads to rendering of markup with the following classes:
223
223
224
224
:::important
225
-
**Action required**<br/>
225
+
**Action required**
226
226
Verify your app layout is not broken and adjust the CSS if necessary.
227
227
:::
228
228
@@ -233,7 +233,7 @@ Verify your app layout is not broken and adjust the CSS if necessary.
233
233
### Removed types
234
234
235
235
:::important
236
-
**Action required**<br/>
236
+
**Action required**
237
237
Importtypealternatives if necessary.
238
238
:::
239
239
@@ -246,6 +246,25 @@ Import type alternatives if necessary.
246
246
The `TypingIndicator` component does not render avatars as it used to with legacy stylesheet. Therefore, its prop `Avatar` has been removed.
247
247
248
248
:::important
249
-
**Action optional**<br/>
249
+
**Action optional**
250
250
Provide custom `TypingIndicator` through the `Channel` prop.
251
251
:::
252
+
253
+
## Updated browser target
254
+
255
+
Version 12 targets browsers that support ES2020. In particular, the code includes `async` functions, optional chaining (`?.`), and nullish coalescing (`??`). These features have been supported by all major desktop and mobile browsers for years, so it made sense for us to raise the baseline.
256
+
257
+
If you need to support older browsers, you should transpile your bundle using `babel` or a similar tool.
258
+
259
+
:::important
260
+
**Action optional**
261
+
If you're targeting browsers that don't support ES2020, use a transpilation tool like `babel` to process your bundle.
262
+
:::
263
+
264
+
## Browser bundle removed from the package
265
+
266
+
Prior to version 12, we included the browser bundle in the package, which could be added to the page using the `<script>` tag. We no longer ship the browser bundle.
267
+
268
+
Using the browser bundle was never recommended, and it was mostly for testing purposes. If you still want to quickly add the SDK using the `<script>` tag, you can use services such as [https://esm.sh/](esm.sh) or [https://www.unpkg.com/](unpkg.com).
269
+
270
+
Installing the package from NPM and then bundling it with your application is still the best way to use the SDK.
0 commit comments