Skip to content

Commit 19ad6cb

Browse files
authored
Merge branch 'main' into a11y/fixes
2 parents 1b5d55e + 9605099 commit 19ad6cb

File tree

105 files changed

+6541
-3001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+6541
-3001
lines changed

.eslintrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ overrides:
8282
no-duplicate-imports: off
8383
'import/no-duplicates': error
8484

85+
# Shorthanding if-condition with && and ||.
86+
'@typescript-eslint/no-unused-expressions': off
87+
8588
rules:
8689
# Only list rules that are not in *:recommended set
8790
# If rules are set to disable the one in *:recommended, please elaborate the reason

CHANGELOG.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
8080
- When set to `'activity-status'`, feedback buttons appear in the activity status area (default behavior)
8181
- Added support for including activity ID and key into form data indicated by `data-webchat-include-activity-id` and `data-webchat-include-activity-key` attributes, in PR [#5418](https://github.com/microsoft/BotFramework-WebChat/pull/5418), by [@OEvgeny](https://github.com/OEvgeny)
8282
- Added dedicated loading animation for messages in preparing state for Fluent theme, in PR [#5423](https://github.com/microsoft/BotFramework-WebChat/pull/5423), by [@OEvgeny](https://github.com/OEvgeny)
83+
- Resolved [#2661](https://github.com/microsoft/BotFramework-WebChat/issues/2661) and [#5352](https://github.com/microsoft/BotFramework-WebChat/issues/5352). Added speech recognition continuous mode with barge-in support, in PR [#5426](https://github.com/microsoft/BotFramework-WebChat/pull/5426), by [@RushikeshGavali](https://github.com/RushikeshGavali) and [@compulim](https://github.com/compulim)
84+
- Set `styleOptions.speechRecognitionContinuous` to `true` with a Web Speech API provider with continuous mode support
8385

8486
### Changed
8587

@@ -101,10 +103,84 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
101103
- Switched math block syntax from `$$` to Tex-style `\[ \]` and `\( \)` delimiters with improved rendering and error handling, in PR [#5353](https://github.com/microsoft/BotFramework-WebChat/pull/5353), by [@OEvgeny](https://github.com/OEvgeny)
102104
- Improved avatar display and grouping behavior by fixing rendering issues and activity sender identification, in PR [#5346](https://github.com/microsoft/BotFramework-WebChat/pull/5346), by [@OEvgeny](https://github.com/OEvgeny)
103105
- Activity "copy" button will use `outerHTML` and `textContent` for clipboard content, in PR [#5378](https://github.com/microsoft/BotFramework-WebChat/pull/5378), by [@compulim](https://github.com/compulim)
104-
- Bumped dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#5385](https://github.com/microsoft/BotFramework-WebChat/pull/5385) and [#5400](https://github.com/microsoft/BotFramework-WebChat/pull/5400)
106+
- Bumped dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#5385](https://github.com/microsoft/BotFramework-WebChat/pull/5385), [#5400](https://github.com/microsoft/BotFramework-WebChat/pull/5400), and [#5426](https://github.com/microsoft/BotFramework-WebChat/pull/5426)
105107
- Production dependencies
106108
- [`[email protected]`](https://npmjs.com/package/web-speech-cognitive-services)
109+
- [`[email protected]`](https://npmjs.com/package/react-dictate-button)
107110
- Enabled icon customization in Fluent theme through CSS variables, in PR [#5413](https://github.com/microsoft/BotFramework-WebChat/pull/5413), by [@OEvgeny](https://github.com/OEvgeny)
111+
- Bumped all dependencies to the latest versions, by [@compulim](https://github.com/compulim) in PR [#5427](https://github.com/microsoft/BotFramework-WebChat/pull/5427)
112+
- Production dependencies
113+
- [`[email protected]`](https://npmjs.com/package/core-js-pure/)
114+
- [`[email protected]`](https://npmjs.com/package/core-js/)
115+
- [`[email protected]`](https://npmjs.com/package/event-as-promise/)
116+
- [`[email protected]`](https://npmjs.com/package/katex/)
117+
- [`[email protected]`](https://npmjs.com/package/mdast-util-from-markdown/)
118+
- [`[email protected]`](https://npmjs.com/package/micromark-extension-gfm/)
119+
- [`[email protected]`](https://npmjs.com/package/micromark-util-character/)
120+
- [`[email protected]`](https://npmjs.com/package/micromark/)
121+
- [`[email protected]`](https://npmjs.com/package/microsoft-cognitiveservices-speech-sdk/)
122+
- [`[email protected]`](https://npmjs.com/package/mime/)
123+
- [`[email protected]`](https://npmjs.com/package/react-chain-of-responsibility/)
124+
- [`[email protected]`](https://npmjs.com/package/react-scroll-to-bottom/)
125+
- [`[email protected]`](https://npmjs.com/package/sanitize-html/)
126+
- [`[email protected]`](https://npmjs.com/package/shiki/)
127+
- [`[email protected]`](https://npmjs.com/package/use-propagate/)
128+
- [`[email protected]`](https://npmjs.com/package/use-state-with-ref/)
129+
- [`[email protected]`](https://npmjs.com/package/valibot/)
130+
- [`[email protected]`](https://npmjs.com/package/web-speech-cognitive-services/)
131+
- Development dependencies
132+
- [`@biomejs/[email protected]`](https://npmjs.com/package/@biomejs/biome/)
133+
- [`@emotion/[email protected]`](https://npmjs.com/package/@emotion/css/)
134+
- [`@happy-dom/[email protected]`](https://npmjs.com/package/@happy-dom/jest-environment/)
135+
- [`@jridgewell/[email protected]`](https://npmjs.com/package/@jridgewell/sourcemap-codec/)
136+
- [`@types/[email protected]`](https://npmjs.com/package/@types/mdast/)
137+
- [`@types/[email protected]`](https://npmjs.com/package/@types/node/)
138+
- [`@types/[email protected]`](https://npmjs.com/package/@types/react-dom/)
139+
- [`@types/[email protected]`](https://npmjs.com/package/@types/react/)
140+
- [`@types/[email protected]`](https://npmjs.com/package/@types/react/)
141+
- [`@typescript-eslint/[email protected]`](https://npmjs.com/package/@typescript-eslint/eslint-plugin/)
142+
- [`@typescript-eslint/[email protected]`](https://npmjs.com/package/@typescript-eslint/parser/)
143+
- [`[email protected]`](https://npmjs.com/package/adm-zip/)
144+
- [`[email protected]`](https://npmjs.com/package/axe-core/)
145+
- [`[email protected]`](https://npmjs.com/package/babel-plugin-istanbul/)
146+
- [`[email protected]`](https://npmjs.com/package/bent/)
147+
- [`[email protected]`](https://npmjs.com/package/compression/)
148+
- [`[email protected]`](https://npmjs.com/package/concurrently/)
149+
- [`[email protected]`](https://npmjs.com/package/core-js/)
150+
- [`[email protected]`](https://npmjs.com/package/dotenv/)
151+
- [`[email protected]`](https://npmjs.com/package/esbuild/)
152+
- [`[email protected]`](https://npmjs.com/package/eslint-config-prettier/)
153+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-import/)
154+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-prettier/)
155+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-react-hooks/)
156+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-react/)
157+
- [`[email protected]`](https://npmjs.com/package/eslint-plugin-security/)
158+
- [`[email protected]`](https://npmjs.com/package/eslint/)
159+
- [`[email protected]`](https://npmjs.com/package/express/)
160+
- [`[email protected]`](https://npmjs.com/package/glob/)
161+
- [`[email protected]`](https://npmjs.com/package/http-proxy-middleware/)
162+
- [`[email protected]`](https://npmjs.com/package/husky/)
163+
- [`[email protected]`](https://npmjs.com/package/lint-staged/)
164+
- [`[email protected]`](https://npmjs.com/package/micromark-util-types/)
165+
- [`[email protected]`](https://npmjs.com/package/nodemon/)
166+
- [`[email protected]`](https://npmjs.com/package/nopt/)
167+
- [`[email protected]`](https://npmjs.com/package/prettier/)
168+
- [`[email protected]`](https://npmjs.com/package/progress/)
169+
- [`[email protected]`](https://npmjs.com/package/q/)
170+
- [`[email protected]`](https://npmjs.com/package/read-pkg-up/)
171+
- [`[email protected]`](https://npmjs.com/package/read-pkg/)
172+
- [`[email protected]`](https://npmjs.com/package/request-progress/)
173+
- [`[email protected]`](https://npmjs.com/package/request/)
174+
- [`[email protected]`](https://npmjs.com/package/selenium-webdriver/)
175+
- [`[email protected]`](https://npmjs.com/package/selfsigned/)
176+
- [`[email protected]`](https://npmjs.com/package/serve-handler/)
177+
- [`[email protected]`](https://npmjs.com/package/serve/)
178+
- [`[email protected]`](https://npmjs.com/package/tsd/)
179+
- [`[email protected]`](https://npmjs.com/package/tsup/)
180+
- [`[email protected]`](https://npmjs.com/package/type-fest/)
181+
- [`[email protected]`](https://npmjs.com/package/typescript/)
182+
- [`[email protected]`](https://npmjs.com/package/webpack-cli/)
183+
- [`[email protected]`](https://npmjs.com/package/webpack/)
108184

109185
### Fixed
110186

__tests__/hooks/useDictateState.js

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Adopted from https://github.com/testing-library/react-testing-library/blob/main/src/pure.js#L292C1-L329C2
2+
3+
/*!
4+
* The MIT License (MIT)
5+
* Copyright (c) 2017-Present Kent C. Dodds
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
*/
25+
26+
function wrapUiIfNeeded(innerElement, wrapperComponent) {
27+
return wrapperComponent ? React.createElement(wrapperComponent, null, innerElement) : innerElement;
28+
}
29+
30+
export default function renderHook(
31+
/** @type {(props: RenderCallbackProps) => any} */ renderCallback,
32+
/** @type {{}} */ options = {}
33+
) {
34+
const { initialProps, ...renderOptions } = options;
35+
36+
if (renderOptions.legacyRoot && typeof ReactDOM.render !== 'function') {
37+
const error = new Error(
38+
'`legacyRoot: true` is not supported in this version of React. ' +
39+
'If your app runs React 19 or later, you should remove this flag. ' +
40+
'If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.'
41+
);
42+
Error.captureStackTrace(error, renderHook);
43+
throw error;
44+
}
45+
46+
const result = React.createRef();
47+
48+
function TestComponent({ renderCallbackProps }) {
49+
const pendingResult = renderCallback(renderCallbackProps);
50+
51+
React.useEffect(() => {
52+
result.current = pendingResult;
53+
});
54+
55+
return null;
56+
}
57+
58+
// A stripped down version of render() from `@testing-library/react`.
59+
const render = ({ renderCallbackProps }) => {
60+
const element = document.querySelector('main');
61+
62+
ReactDOM.render(wrapUiIfNeeded(React.createElement(TestComponent, renderCallbackProps), renderOptions.wrapper), element);
63+
64+
return { rerender: render, unmount: () => ReactDOM.unmountComponentAtNode(element) };
65+
};
66+
67+
const { rerender: baseRerender, unmount } = render(
68+
React.createElement(TestComponent, { renderCallbackProps: initialProps }),
69+
renderOptions
70+
);
71+
72+
function rerender(rerenderCallbackProps) {
73+
return baseRerender(React.createElement(TestComponent, { renderCallbackProps: rerenderCallbackProps }));
74+
}
75+
76+
return { result, rerender, unmount };
77+
}

0 commit comments

Comments
 (0)