-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Introduction of polymiddleware
#5515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
5671929
Initial commit of polyMiddleware
compulim 6e33a6e
Bump react-chain-of-responsibility and handler-chain
compulim 10d1d42
Move middleware typing to middleware package
compulim ff67e17
Add useReduceMemo
compulim c36bed0
Update performance snapshot
compulim 58c6f7e
Fix ESLint
compulim 138146b
Fix test
compulim e1effac
Bump to latest
compulim f357ea5
Revert
compulim 91d7894
Apply
compulim 65eb765
Revert
compulim 5cd32f0
Bump to latest
compulim 2e03849
Fix test
compulim 64ca8a2
Add expectation
compulim bebeba3
Group activities should invalidate callback on style options change
compulim df90db2
Add barrel file for Webpack4
compulim 8690ee5
Rename
compulim c3e1f27
Better comment
compulim 2547699
Add comment
compulim 402454f
Convert to class component
compulim c1af378
Improve performance
compulim f972e63
Reduce one use variable
compulim 911e472
Use internal current config
compulim 447a112
Hide Init
compulim 370253e
Add types="jest"
compulim 3b1f9ec
Add comment
compulim d408dc3
Better comment
compulim e27de2f
Fix reducer immutability
compulim a59abaf
Import botframework-webchat-middleware
compulim d01d5e8
Export activity poly middleware components
compulim 64c54e6
Add priority
compulim bf5a2c6
Add TODO
compulim 182246c
Sort
compulim 23056e3
Unify react-chain-of-responsibility version
compulim 54ca7f7
WIP: Add test
compulim d65971c
Port useCreateActivityRendererInternal hook
compulim d24b30f
Upgrade test to html2
compulim 843ad07
Prefix Legacy* and allow extraneous activity props
compulim fb50ce5
Fold unnecessary useCreateActivityRendererInternal
compulim 11cb470
Add no import rules
compulim b1dfe2e
Comments
compulim 5322961
Pass all legacy props
compulim e276846
Add import restriction
compulim 7ec1bc3
Move under folder
compulim 35ec057
Add test
compulim b88e124
Bump react-chain-of-responsibility
compulim 4223d78
Add snapshot
compulim 9af078c
Merge branch 'main' into feat-poly-middleware
compulim 3c30ba3
Better comments
compulim 60f272f
Add tests
compulim 7d774c7
Update comment
compulim cb26a58
Rename to LegacyAttachmentMiddleware and added bf-wc-middleware/internal
compulim 5c5ceda
Check middleware factory marker
compulim 21f940d
Add deprecation
compulim f66c541
Use valibot for factory function validation
compulim e251389
Enhancer must be of type function
compulim cad87da
Check for no console.warn
compulim 46b5db6
Add comments
compulim fd175bb
Add comments
compulim 1b3a953
Rename marker to tag
compulim 9525a4d
Bump use-reduce-memo
compulim 25cd957
Add tests
compulim eaa323e
Better comments
compulim 94ff79d
Prevent wasted rendering on unrelated middleware changes
compulim 3536c4e
Fix exports
compulim fd4b288
Fix ESLint
compulim 93d2acd
Fix tests for extractEnhancer
compulim 156ed89
Add snapshots
compulim 4909dd4
Add React rules
compulim 771347e
Fix ESLint
compulim 423735b
Better comments
compulim 833e867
Use Object.defineProperty
compulim e2107f0
Remove one-use
compulim 6e4ba44
Offload things from LegacyActivityBridge to LegacyActivityComposer
compulim f745492
Update snapshots
compulim 9812ba3
Provide deprecation path for api activityMiddleware
compulim 390ee09
Remove unnecessary declaration of activityMiddleware
compulim d3861bc
Simplify import
compulim e070746
Fix import
compulim c45b35f
Rename to api-middleware
compulim 442c689
Fix npm start
compulim 9a80912
Rename/add tests
compulim 822eb22
Fix .eslintrc
compulim db3a917
Add tests
compulim 69cacaf
Add sample
compulim 9ddea38
Add sample
compulim 26deb14
Clean up docs
compulim a9a161a
Rename PolyMiddleware to Polymiddleware
compulim 5dcee0a
Cascade build
compulim 0758b57
Ignore render thru error boundary
compulim 997b41f
Add error box middleware
compulim d4e1a58
Fix falsy polymiddleware
compulim 22ecad2
Allow middleware of false
compulim 489658d
Remove unnecessary props
compulim 9020430
Fix test
compulim c8f0357
Fix grouping
compulim 6e8b890
Fix ESLint
compulim 6fab0e7
Upgrade a test
compulim a3eeeef
Add trackException
compulim e297740
Print error once by React
compulim 87d286d
No export Provider and extract*
compulim f4cbb17
Add priority
compulim eff52fb
Rename
compulim 26bac86
Set TODO priority
compulim 8ce8f4d
Reduce exports
compulim 1f9da89
Clean up
compulim a7c0137
Add fallback error box
compulim c23a708
Clean up
compulim 226f097
Add snapshot
compulim f8011c0
Add no error box test
compulim f0c59ac
Deconfuse render function with function component
compulim 0c04c53
Use ErrorBoxPolymiddlewareProxy
compulim 5469cfe
Fix homepage
compulim 9495a18
Add new <DebugProvider>
compulim 1b3c895
Should not depends on bundle
compulim 5dfe961
Remove dependency to bundle
compulim 5dd43bd
Add debug-provider package
compulim eb2f2ac
Add debug-theme
compulim 389da17
Update tests
compulim 3d5673b
Remove unnecessary expect
compulim dcb193c
Add new test
compulim f56d743
Add a red box
compulim 033274d
Remove node_env
compulim 84bbe87
Add date
compulim 96dfcce
Rename
compulim dc8a338
Remove localDependencies
compulim 91a0233
Fix typing
compulim 9baa36c
Fix test
compulim 6b53836
Fix test
compulim 4645fe0
Merge branch 'main' into feat-poly-middleware
compulim 0a3db13
Apply suggestion
compulim 9b9f157
Add botframework-webchat-react-hooks package
compulim f270455
Use as unknown instead of as any
compulim 1d9acb4
Add prop type
compulim a6855c5
Add entry
compulim 796b75a
Add entry
compulim 24d19e0
Fix ESLint
compulim e0253bb
Typos
compulim ff230e4
Typo
compulim e661cee
Test bundle content
compulim cc91f39
Reduce boot coed
compulim 5ddc4ff
Add test for exports
compulim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ | |
| - `sendBoxToolbarMiddleware`, related to PR [#5504](https://github.com/microsoft/BotFramework-WebChat/pull/5504) | ||
| - `styleOptions.hideUploadButton` is being deprecated in favor of `styleOptions.disableFileUpload`. The option will be removed on or after 2027-07-14 | ||
| - `botframework-directlinespeech-sdk` no longer ponyfill `AbortController`, it is supported by modern browsers, in PR [#5530](https://github.com/microsoft/BotFramework-WebChat/pull/5530) | ||
| - `activityMiddleware` is being deprecated in favor of [`polymiddleware`](./docs/MIDDLEWARE.md). It will be removed on or after 2027-08-16, related to PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515) | ||
|
|
||
| ### Added | ||
|
|
||
|
|
@@ -108,6 +109,13 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ | |
| - Deprecated `hideUploadButton` in favor of `disableFileUpload`. | ||
| - Updated `BasicSendBoxToolbar` to rely solely on `disableFileUpload`. | ||
| - 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) | ||
| - 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) | ||
| - Added `polymiddleware` to `<ThemeProvider>` | ||
| - Currently supports activity middleware and the new error box middleware | ||
| - New internal packages, by [@compulim](https://github.com/compulim) in PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515) | ||
| - `@msinternal/botframework-webchat-api-middleware` for middleware branch of API package | ||
| - `@msinternal/botframework-webchat-debug-theme` package for enabling debugging scenarios | ||
| - `@msinternal/botframework-webchat-react-hooks` for helpers for React hooks | ||
|
|
||
| ### Changed | ||
|
|
||
|
|
@@ -151,7 +159,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ | |
| - [`[email protected]`](https://npmjs.com/package/micromark/v/4.0.2) | ||
| - [`[email protected]`](https://npmjs.com/package/microsoft-cognitiveservices-speech-sdk/v/1.45.0) | ||
| - [`[email protected]`](https://npmjs.com/package/mime/v/4.0.7) | ||
| - [`react-chain-of-responsibility@0.3.0`](https://npmjs.com/package/react-chain-of-responsibility/v/0.3.0) | ||
| - [`react-chain-of-responsibility@0.4.0-main.2a72139`](https://npmjs.com/package/react-chain-of-responsibility/v/0.4.0-main.2a72139) | ||
| - [`[email protected]`](https://npmjs.com/package/react-film/v/4.0.0) | ||
| - [`[email protected]`](https://npmjs.com/package/react-say/v/2.2.0) | ||
| - [`[email protected]`](https://npmjs.com/package/react-scroll-to-bottom/v/4.2.0) | ||
|
|
@@ -277,11 +285,12 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ | |
| - Fixed [#5518](https://github.com/microsoft/BotFramework-WebChat/issues/5518). Minimal bundled build should work properly, in PR [#5507](https://github.com/microsoft/BotFramework-WebChat/pull/5507), by [@compulim](https://github.com/compulim) | ||
| - Fixed [#5520](https://github.com/microsoft/BotFramework-WebChat/issues/5520). Version information should be injected when installed via npm, in PR [#5521](https://github.com/microsoft/BotFramework-WebChat/pull/5521), by [@compulim](https://github.com/compulim) | ||
|
|
||
| # Removed | ||
| ### Removed | ||
|
|
||
| - Deprecating `disabled` props and `useDisabled` hook in favor of new `uiState` props and `useUIState` hook, in PR [#5276](https://github.com/microsoft/BotFramework-WebChat/pull/5276), by [@compulim](https://github.com/compulim) | ||
| - `useSuggestedActions()` hook is being deprecated in favor of the `useSuggestedActionsHooks().useSuggestedActions()` hook, in PR [#5489](https://github.com/microsoft/BotFramework-WebChat/pull/5489), by [@compulim](https://github.com/compulim) | ||
| - Fixed core internal import in legacy CommonJS environments, in [5509](https://github.com/microsoft/BotFramework-WebChat/pull/5509), by [@OEvgeny](https://github.com/OEvgeny) | ||
| - `activityMiddleware` is being deprecated in favor of [`polymiddleware`](./docs/MIDDLEWARE.md). It will be removed on or after 2027-08-16, related to PR [#5515](https://github.com/microsoft/BotFramework-WebChat/pull/5515) | ||
|
|
||
| ### Samples | ||
|
|
||
|
|
||
Binary file modified
BIN
+15.9 KB
(140%)
...s-activity-render-performance-does-not-produce-unnecessary-rerenders-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13.2 KB
(140%)
...y-profiling-js-activity-render-performance-render-activity-profiling-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.