-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fluent: polish copilot variant (#5293)
* Fluent: polish copilot variant * Changelog * Fix entities * Fix missing activity argument * Remove duplicate selector * Use variables * Relax bot message width * Sendbox to hide letter count unless more than allowed * Better spacing * Fix border flair plays on show-hide * Complete animation in Firefox as well * Snapshots * Remove unneeded maxMessageLength * Cleanup * CopyButton snapshots * Adjust outline for pre-chat activity * Snapshots * Sort * Format
- Loading branch information
Showing
58 changed files
with
420 additions
and
204 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -54,6 +54,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ | |
- Reworked pre-chat activity layout to use author entity for improved consistency and flexibility, in PR [#5274](https://github.com/microsoft/BotFramework-WebChat/pull/5274), by [@OEvgeny](https://github.com/OEvgeny) | ||
- Updated styles for suggested actions and attachments in Fluent theme to improve readability and consistency, in PR [#5275](https://github.com/microsoft/BotFramework-WebChat/pull/5275), by [@OEvgeny](https://github.com/OEvgeny) | ||
- Moved from `[email protected]` to `@redux/[email protected]`, in PR [#5292](https://github.com/microsoft/BotFramework-WebChat/pull/5292), by [@compulim](https://github.com/compulim) | ||
- Enhanced the visual presentation of the Fluent theme copilot variant, in PR [#5293](https://github.com/microsoft/BotFramework-WebChat/pull/5293), by [@OEvgeny](https://github.com/OEvgeny) | ||
|
||
### Fixed | ||
|
||
|
Binary file modified
BIN
-2.81 KB
(86%)
...th-dark-theme-and-copilot-variant-copy-button-should-layout-properly-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
-2.72 KB
(86%)
...h-light-theme-and-copilot-variant-copy-button-should-layout-properly-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
+362 Bytes
(100%)
...rk-theme-applied-side-by-side-left-transcript-right-pre-chat-message-5-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
+150 Bytes
(100%)
...rk-theme-applied-side-by-side-left-transcript-right-pre-chat-message-6-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
-3.49 KB
(99%)
...lied-dark-theme-applied-side-by-side-left-transcript-right-pre-liner-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 added
BIN
+255 KB
...lied-dark-theme-applied-side-by-side-left-transcript-right-streaming-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
+8.38 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-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
+5.21 KB
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-10-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
+4.85 KB
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-11-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
+5.48 KB
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-12-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
+4.2 KB
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-13-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
+5.15 KB
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-14-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
-614 Bytes
(100%)
...ed-dark-theme-applied-side-by-side-left-transcript-right-transcript-15-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
+8.11 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-2-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
+7.8 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-3-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
+7.78 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-4-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
+8.03 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-5-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
+7.8 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-6-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
+7.78 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-7-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
+6.76 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-8-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
+7.56 KB
(100%)
...ied-dark-theme-applied-side-by-side-left-transcript-right-transcript-9-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
+85 Bytes
(100%)
...nt-theme-applied-side-by-side-left-transcript-right-pre-chat-message-5-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
-4 Bytes
(100%)
...nt-theme-applied-side-by-side-left-transcript-right-pre-chat-message-6-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
-2.31 KB
(99%)
...js-fluent-theme-applied-side-by-side-left-transcript-right-pre-liner-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 added
BIN
+285 KB
...js-fluent-theme-applied-side-by-side-left-transcript-right-streaming-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
+9.81 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+6.49 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-10-snap.png
Oops, something went wrong.
Binary file modified
BIN
+5.68 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-11-snap.png
Oops, something went wrong.
Binary file modified
BIN
+6.26 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-12-snap.png
Oops, something went wrong.
Binary file modified
BIN
+4.75 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-13-snap.png
Oops, something went wrong.
Binary file modified
BIN
+6.4 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-14-snap.png
Oops, something went wrong.
Binary file modified
BIN
+1.82 KB
(100%)
...-fluent-theme-applied-side-by-side-left-transcript-right-transcript-15-snap.png
Oops, something went wrong.
Binary file modified
BIN
+9.26 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-2-snap.png
Oops, something went wrong.
Binary file modified
BIN
+10.4 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-3-snap.png
Oops, something went wrong.
Binary file modified
BIN
+9.97 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-4-snap.png
Oops, something went wrong.
Binary file modified
BIN
+10.7 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-5-snap.png
Oops, something went wrong.
Binary file modified
BIN
+10 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-6-snap.png
Oops, something went wrong.
Binary file modified
BIN
+9.85 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-7-snap.png
Oops, something went wrong.
Binary file modified
BIN
+4.15 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-8-snap.png
Oops, something went wrong.
Binary file modified
BIN
+8.4 KB
(100%)
...s-fluent-theme-applied-side-by-side-left-transcript-right-transcript-9-snap.png
Oops, something went wrong.
227 changes: 148 additions & 79 deletions
227
__tests__/html/fluentTheme/side-by-side.wide.dark.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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
32 changes: 20 additions & 12 deletions
32
packages/fluent-theme/src/components/activity/CopilotMessageHeader.tsx
This file contains 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 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as ActivityDecorator } from './ActivityDecorator'; | ||
export { default as useActivityAuthor } from './private/useActivityAuthor'; |
5 changes: 5 additions & 0 deletions
5
packages/fluent-theme/src/components/activity/private/isAIGeneratedActivity.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { getOrgSchemaMessage, type WebChatActivity } from 'botframework-webchat-core'; | ||
|
||
export default function isAIGeneratedActivity(activity: undefined | WebChatActivity) { | ||
return !!(activity && getOrgSchemaMessage(activity?.entities || [])?.keywords?.includes('AIGeneratedContent')); | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/fluent-theme/src/components/activity/private/useActivityAuthor.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useMemo } from 'react'; | ||
import { getOrgSchemaMessage, type WebChatActivity } from 'botframework-webchat-core'; | ||
|
||
export default function useActivityAuthor(activity?: WebChatActivity | undefined) { | ||
return useMemo(() => { | ||
const entity = getOrgSchemaMessage(activity?.entities || []); | ||
return typeof entity?.author === 'string' | ||
? { | ||
'@type': 'Person', | ||
description: undefined, | ||
image: undefined, | ||
name: entity?.author | ||
} | ||
: entity?.author; | ||
}, [activity]); | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/fluent-theme/src/components/activity/private/useActivityStyleOptions.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useMemo } from 'react'; | ||
import { hooks, type WebChatActivity } from 'botframework-webchat-component'; | ||
import { type StrictStyleOptions } from 'botframework-webchat-api'; | ||
|
||
const { useStyleOptions } = hooks; | ||
|
||
export default function useActivityStyleOptions(activity?: WebChatActivity | undefined) { | ||
const [styleOptions] = useStyleOptions(); | ||
return useMemo<readonly [Readonly<StrictStyleOptions>]>( | ||
() => | ||
Object.freeze([ | ||
{ | ||
...styleOptions, | ||
...activity?.channelData?.webChat?.styleOptions | ||
} | ||
]), | ||
[activity?.channelData?.webChat?.styleOptions, styleOptions] | ||
); | ||
} |
This file contains 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
17 changes: 15 additions & 2 deletions
17
packages/fluent-theme/src/components/decorator/private/BorderFlair.tsx
This file contains 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 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 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 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 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