Skip to content

Commit 68ed0a9

Browse files
committed
Update doc
1 parent 8e1ce63 commit 68ed0a9

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Breaking changes in this release:
4040
- 💥 Root-level (unconnected) `Claim` entity is being deprecated, in PR [#5564](https://github.com/microsoft/BotFramework-WebChat/pull/5564), by [@compulim](https://github.com/compulim). It will be removed on or after 2027-08-29
4141
- Use `entities[@id=""][@type="Message"].citation[@type="Claim"]` instead
4242
- 💥 `activityStatusMiddleware.nextVisibleActivity` and `activityStatusMiddleware.sameTimestampGroup` is removed after deprecation, in PR [#5565](https://github.com/microsoft/BotFramework-WebChat/issues/5565), by [@compulim](https://github.com/compulim)
43+
- 💥 `avatarMiddleware` is being deprecated in favor of [`polymiddleware`](./docs/MIDDLEWARE.md). It will be removed on or after 2028-03-18, related to PR [#5779](https://github.com/microsoft/BotFramework-WebChat/pull/5779)
4344

4445
### Added
4546

@@ -108,8 +109,10 @@ Breaking changes in this release:
108109
- Updated `BasicSendBoxToolbar` to rely solely on `disableFileUpload`.
109110
- Added support for livestreaming via `entities[type="streaminfo"]` in PR [#5517](https://github.com/microsoft/BotFramework-WebChat/pull/5517) by [@kylerohn](https://github.com/kylerohn) and [@compulim](https://github.com/compulim)
110111
- Added `polymiddleware`, a new [universal middleware for every UIs](./docs/MIDDLEWARE.md), by [@compulim](https://github.com/compulim) in PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515) and [#5566](https://github.com/microsoft/BotFramework-WebChat/pull/5566)
112+
- Legacy middleware is prioritized over polymiddleware
111113
- Added `polymiddleware` to `<ThemeProvider>`
112114
- Currently supports activity middleware and the new error box middleware
115+
- Supports avatar middleware, by [@compulim](https://github.com/compulim) in PR [#5779](https://github.com/microsoft/BotFramework-WebChat/pull/5779)
113116
- New internal packages, by [@compulim](https://github.com/compulim) in PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515)
114117
- `@msinternal/botframework-webchat-api-middleware` for middleware branch of API package
115118
- `@msinternal/botframework-webchat-debug-theme` package for enabling debugging scenarios
@@ -348,6 +351,7 @@ Breaking changes in this release:
348351
- Removed legacy test harness, in PR [#5655](https://github.com/microsoft/BotFramework-WebChat/issues/5655), by [@compulim](https://github.com/compulim)
349352
- All tests are now either using `html2` test harness or simple unit tests
350353
- Legacy and `html` (html1) test harness are all migrated to `html2`
354+
- `avatarMiddleware` is being deprecated in favor of [`polymiddleware`](./docs/MIDDLEWARE.md). It will be removed on or after 2028-03-18, related to PR [#5779](https://github.com/microsoft/BotFramework-WebChat/pull/5779)
351355

352356
### Fixed
353357

docs/MIDDLEWARE.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function MyChatUI() {
5252
The following are supported polymiddleware types:
5353

5454
- Activity (PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515))
55+
- Avatar (PR [#5779](https://github.com/microsoft/BotFramework-WebChat/pull/5779))
56+
- [Sample code](__tests__/html2/middleware/avatar/polymiddleware/decorate.html)
5557
- Error box (PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515))
5658

5759
## Recipes
@@ -284,7 +286,7 @@ Over the past 7.5 years of journey, we learnt a lot. Polymiddleware combined all
284286
285287
### Polyfilling legacy middleware
286288
287-
Legacy middleware passed to deprecating props such as `activityMiddleware` will be upgraded to polymiddleware automatically and placed after other polymiddleware passed via the `polymiddleware` prop. In other words, legacy middleware has lower priority than polymiddleware.
289+
Legacy middleware passed to deprecating props such as `activityMiddleware` will be upgraded to polymiddleware automatically and placed before other polymiddleware passed via the `polymiddleware` prop. In other words, legacy middleware has higher priority than polymiddleware.
288290
289291
Special polymiddleware factory functions such as `createActivityPolymiddlewareFromLegacy()` allow input of legacy middleware and output as polymiddleware. This helps the transition period. However, these special factory functions is also marked as deprecated.
290292
@@ -296,7 +298,7 @@ When multiple legacy middleware are passed as an array to `createActivityPolymid
296298
297299
### When to use `useBuildRenderXXXCallback()` vs. `<XXXPolymiddlewareProxy>`?
298300
299-
The main differences are:
301+
We recommend the proxy component if you do not care about empty rendering or element count. For example, empty `<Fragment>` will be emitted by proxy but not rendered by `useBuildRenderXXXCallback()`.
300302
301303
- `useBuildRenderXXXCallback()` allows precise render control
302304
- Developers can control how the render function is being used and what to do if the polymiddleware decided not to render the activity
@@ -314,8 +316,8 @@ The following table shows how polymiddleware are prioritized.
314316
| Priority | Type | Description |
315317
| -------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
316318
| Highest | Error boundary | <p>All polymiddleware has an error boundary wrapper to control error propagation.</p><p>Error will be rendered using the `ErrorBox` polymiddleware and reported via `onTelemetry` prop.</p> |
317-
| Normal | Polymiddleware | Polymiddleware passed to the `polymiddleware` prop. |
318-
| Low | Legacy middleware | Legacy middleware passed to their corresponding prop (such as `activityMiddleware`) and upgraded automatically. |
319+
| Normal | Legacy middleware | Legacy middleware passed to their corresponding prop (such as `activityMiddleware`) and upgraded automatically. |
320+
| Low | Polymiddleware | Polymiddleware passed to the `polymiddleware` prop. |
319321
| Lowest | Catch-all as error | Requests not handled by any polymiddleware in the chain will be thrown as an error. |
320322
321323
## Deprecation dates
@@ -328,7 +330,7 @@ We introduced polymiddleware in 2025-08-16. Based on our 2-year deprecation rule
328330
| Activity status | | (TBD) |
329331
| Attachment | | (TBD) |
330332
| Attachment for screen reader | | (TBD) |
331-
| Avatar | | (TBD) |
333+
| Avatar | PR [#5779](https://github.com/microsoft/BotFramework-WebChat/pull/5779) | 2028-03-18 |
332334
| Card action | | (TBD) |
333335
| Group activities | | (TBD) |
334336
| Scroll to end button | | (TBD) |

0 commit comments

Comments
 (0)