diff --git a/.changelog/5918-fix-fluent-hidesendbox.md b/.changelog/5918-fix-fluent-hidesendbox.md new file mode 100644 index 0000000000..0723d8b9b5 --- /dev/null +++ b/.changelog/5918-fix-fluent-hidesendbox.md @@ -0,0 +1,3 @@ +### Fixed + +- Fixed the Fluent theme ignoring `styleOptions.hideSendBox`, in PR [#5918](https://github.com/microsoft/BotFramework-WebChat/pull/5918), by [@OEvgeny](https://github.com/OEvgeny) diff --git a/__tests__/html2/fluentTheme/hideSendBox.copilot.html b/__tests__/html2/fluentTheme/hideSendBox.copilot.html new file mode 100644 index 0000000000..d31c757390 --- /dev/null +++ b/__tests__/html2/fluentTheme/hideSendBox.copilot.html @@ -0,0 +1,9 @@ + + +
+ + + + diff --git a/__tests__/html2/fluentTheme/hideSendBox.copilot.html.snap-1.png b/__tests__/html2/fluentTheme/hideSendBox.copilot.html.snap-1.png new file mode 100644 index 0000000000..69328d2837 Binary files /dev/null and b/__tests__/html2/fluentTheme/hideSendBox.copilot.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/hideSendBox.html b/__tests__/html2/fluentTheme/hideSendBox.html new file mode 100644 index 0000000000..11c24450fe --- /dev/null +++ b/__tests__/html2/fluentTheme/hideSendBox.html @@ -0,0 +1,75 @@ + + + + + + + + + + + diff --git a/__tests__/html2/fluentTheme/hideSendBox.html.snap-1.png b/__tests__/html2/fluentTheme/hideSendBox.html.snap-1.png new file mode 100644 index 0000000000..752a3366f5 Binary files /dev/null and b/__tests__/html2/fluentTheme/hideSendBox.html.snap-1.png differ diff --git a/__tests__/html2/linkDefinition/forcedColors.fluent.dark.html.snap-1.png b/__tests__/html2/linkDefinition/forcedColors.fluent.dark.html.snap-1.png index 763217d118..9104cca4ce 100644 Binary files a/__tests__/html2/linkDefinition/forcedColors.fluent.dark.html.snap-1.png and b/__tests__/html2/linkDefinition/forcedColors.fluent.dark.html.snap-1.png differ diff --git a/__tests__/html2/linkDefinition/forcedColors.fluent.html.snap-1.png b/__tests__/html2/linkDefinition/forcedColors.fluent.html.snap-1.png index b239f234c6..96a52ebfdd 100644 Binary files a/__tests__/html2/linkDefinition/forcedColors.fluent.html.snap-1.png and b/__tests__/html2/linkDefinition/forcedColors.fluent.html.snap-1.png differ diff --git a/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.dark.html.snap-1.png b/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.dark.html.snap-1.png index ac475cea7a..de9afdd0af 100644 Binary files a/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.dark.html.snap-1.png and b/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.dark.html.snap-1.png differ diff --git a/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.html.snap-1.png b/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.html.snap-1.png index ffc75e7aab..57d425f764 100644 Binary files a/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.html.snap-1.png and b/__tests__/html2/markdown/codeBlockCopyButton/forcedColors.fluent.html.snap-1.png differ diff --git a/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.dark.html.snap-1.png b/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.dark.html.snap-1.png index 43bb7e326e..44c5b6bb34 100644 Binary files a/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.dark.html.snap-1.png and b/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.dark.html.snap-1.png differ diff --git a/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.html.snap-1.png b/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.html.snap-1.png index 05b737dd34..c34c9c07c0 100644 Binary files a/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.html.snap-1.png and b/__tests__/html2/markdown/externalLinkIcon/forcedColors.fluent.html.snap-1.png differ diff --git a/packages/api/src/StyleOptions.ts b/packages/api/src/StyleOptions.ts index 8f419d8e7d..23a596a438 100644 --- a/packages/api/src/StyleOptions.ts +++ b/packages/api/src/StyleOptions.ts @@ -283,6 +283,9 @@ type StrictStyleOptions = { * Send box styling */ + /** + * `true` to hide the send box and its suggested actions, otherwise, `false`. Defaults to `false`. + */ hideSendBox: boolean | undefined; /** diff --git a/packages/fluent-theme/src/components/sendBox/SendBox.tsx b/packages/fluent-theme/src/components/sendBox/SendBox.tsx index f1d1678f66..ee70641709 100644 --- a/packages/fluent-theme/src/components/sendBox/SendBox.tsx +++ b/packages/fluent-theme/src/components/sendBox/SendBox.tsx @@ -296,10 +296,16 @@ function SendBox(props: Props) { ); } -const PrimarySendBox = memo((props: Exclude