-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: sliding dots have white background #5770
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
3 commits
Select commit
Hold shift + click to select a range
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
9 changes: 9 additions & 0 deletions
9
__tests__/html2/typing/typingIndicator.scroll.copilot.dark.html
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <script> | ||
| location = './typingIndicator.scroll?theme=fluent&variant=copilot&fluentTheme=dark'; | ||
| </script> | ||
| </head> | ||
| <body></body> | ||
| </html> |
Binary file added
BIN
+44.3 KB
__tests__/html2/typing/typingIndicator.scroll.copilot.dark.html.snap-1.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
+44.2 KB
__tests__/html2/typing/typingIndicator.scroll.copilot.dark.html.snap-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
__tests__/html2/typing/typingIndicator.scroll.fluent.dark.html
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <script> | ||
| location = './typingIndicator.scroll?theme=fluent&fluentTheme=dark'; | ||
| </script> | ||
| </head> | ||
| <body></body> | ||
| </html> |
Binary file added
BIN
+44.5 KB
__tests__/html2/typing/typingIndicator.scroll.fluent.dark.html.snap-1.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
+45.1 KB
__tests__/html2/typing/typingIndicator.scroll.fluent.dark.html.snap-2.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,127 +1,170 @@ | ||
| <!doctype html> | ||
| <html lang="en-US"> | ||
| <head> | ||
| <link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
| <script crossorigin="anonymous" src="https://unpkg.com/react@16.8.6/umd/react.production.min.js"></script> | ||
| <script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script> | ||
| <script crossorigin="anonymous" src="/test-harness.js"></script> | ||
| <script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
| <script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
| <script crossorigin="anonymous" src="/__dist__/botframework-webchat-fluent-theme.production.min.js"></script> | ||
| <style> | ||
| #webchat .webchat__typing-indicator { | ||
| background-image: url(data:image/gif;base64,R0lGODlhQAAYAPUAAOzv8evu8Ort7+fq7Ons7ujr7eXo6uTn6ebp6+Xn6ezu8OPm6N/i49/i5OHk5uDj5d/h49PV17/BwsLExdja3MvNz72/wL7Awc/S08TGyMDCw9TW2NbZ2tvd39nc3d3f4ens7bO0tbS2t7GztLW3uK6vsMnLzamqq7m7vK2ur6yurp2en6KjpJeXmI2NjpGSkpOUlJiYmZqbmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQABwD/ACwAAAAAQAAYAAAG8ECAcEgsGo/IpHLJbDqf0Kh0Sq1ar9isdsvtegOGgTAwLBQPRQNAMAw0HGRAPA4gVAMUjWW/KA89IiqCHkJqbHImMS4uKxFjcnVFdgpOeHuXEghCZgAeKYKgHURsiYumHI9DdlQSmHsYkEIooKAoRQErpqYndKpVrXvAFn60tL0QL7qLMWKxQqtSwhbARSXFgkUPycoyIKmRrJfBG36zxRKjACzKLiG94ELNTwwXroecByPFfQCGABAwdHX79owKmQoTMkRYxWlIhkAZEhQSIoDMhxItZJDgR4YMNADNKHkZSbKkyZMoU6pcybKly5dBAAA7); background-color: black; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <main id="webchat"></main> | ||
| <script type="importmap"> | ||
|
|
||
| <head> | ||
| <link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
| <script type="importmap"> | ||
| { | ||
| "imports": { | ||
| "@fluentui/react-provider": "/__dist__/packages/test/test-assets/out/@fluentui/react-provider.js", | ||
| "@fluentui/tokens": "/__dist__/packages/test/test-assets/out/@fluentui/tokens.js", | ||
| "@testduet/wait-for": "https://unpkg.com/@testduet/wait-for@main/dist/wait-for.mjs", | ||
| "jest-mock": "https://esm.sh/jest-mock", | ||
| "react-dictate-button/internal": "https://unpkg.com/react-dictate-button@main/dist/react-dictate-button.internal.mjs" | ||
| "react": "https://esm.sh/react@18", | ||
| "react-dom": "https://esm.sh/react-dom@18", | ||
| "react-dom/": "https://esm.sh/react-dom@18/", | ||
| "react-jsx-runtime": "https://esm.sh/react@18/jsx-runtime" | ||
| } | ||
| } | ||
| </script> | ||
| <script type="module"> | ||
| import { waitFor } from '@testduet/wait-for'; | ||
| <script crossorigin="anonymous" src="/test-harness.js"></script> | ||
| <script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
| <script type="module"> | ||
| import React from 'react'; | ||
| window.React = React; | ||
OEvgeny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </script> | ||
| <script defer crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
| <script defer crossorigin="anonymous" src="/__dist__/botframework-webchat-fluent-theme.production.min.js"></script> | ||
| <style> | ||
| main { | ||
| display: flex; | ||
| } | ||
|
|
||
| #webchat .webchat__typing-indicator { | ||
| background-image: url(data:image/gif;base64,R0lGODlhQAAYAPUAAOzv8evu8Ort7+fq7Ons7ujr7eXo6uTn6ebp6+Xn6ezu8OPm6N/i49/i5OHk5uDj5d/h49PV17/BwsLExdja3MvNz72/wL7Awc/S08TGyMDCw9TW2NbZ2tvd39nc3d3f4ens7bO0tbS2t7GztLW3uK6vsMnLzamqq7m7vK2ur6yurp2en6KjpJeXmI2NjpGSkpOUlJiYmZqbmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQABwD/ACwAAAAAQAAYAAAG8ECAcEgsGo/IpHLJbDqf0Kh0Sq1ar9isdsvtegOGgTAwLBQPRQNAMAw0HGRAPA4gVAMUjWW/KA89IiqCHkJqbHImMS4uKxFjcnVFdgpOeHuXEghCZgAeKYKgHURsiYumHI9DdlQSmHsYkEIooKAoRQErpqYndKpVrXvAFn60tL0QL7qLMWKxQqtSwhbARSXFgkUPycoyIKmRrJfBG36zxRKjACzKLiG94ELNTwwXroecByPFfQCGABAwdHX79owKmQoTMkRYxWlIhkAZEhQSIoDMhxItZJDgR4YMNADNKHkZSbKkyZMoU6pcybKly5dBAAA7); | ||
| background-color: black; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <main id="webchat"></main> | ||
| <script type="module"> | ||
| import { FluentProvider } from '@fluentui/react-provider'; | ||
| import { webDarkTheme, webLightTheme } from '@fluentui/tokens'; | ||
| import { waitFor } from '@testduet/wait-for'; | ||
| import React from 'react'; | ||
| import { createRoot } from 'react-dom/client'; | ||
|
|
||
| const { searchParams } = new URL(location); | ||
| const fluentTheme = searchParams.get('fluentTheme'); | ||
| const isFluentTheme = searchParams.get('theme') === 'fluent'; | ||
| const isLivestream = searchParams.has('livestream'); | ||
| const variant = searchParams.get('variant'); | ||
|
|
||
| run(async function () { | ||
| await host.sendDevToolsCommand('Emulation.setEmulatedMedia', { | ||
| features: [ | ||
| { name: 'prefers-reduced-motion', value: 'reduce' }, | ||
| ...(fluentTheme === 'dark' || fluentTheme === 'light' | ||
| ? [{ name: 'prefers-color-scheme', value: fluentTheme }] | ||
| : []) | ||
| ] | ||
| }); | ||
|
|
||
| const isLivestream = new URL(location).searchParams.has('livestream'); | ||
| const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
|
||
| run(async function () { | ||
| if (isFluentTheme) { | ||
| const { | ||
| React: { createElement }, | ||
| ReactDOM: { render }, | ||
| WebChat: { FluentThemeProvider, ReactWebChat } | ||
| } = window; // Imports in UMD fashion. | ||
| } = window; | ||
|
|
||
| const theme = | ||
| fluentTheme === 'dark' || window.matchMedia('(prefers-color-scheme: dark)').matches | ||
| ? webDarkTheme | ||
| : webLightTheme; | ||
|
|
||
| const root = createRoot(document.getElementById('webchat')); | ||
|
|
||
| root.render( | ||
| React.createElement( | ||
| FluentProvider, | ||
| { theme }, | ||
| React.createElement( | ||
| FluentThemeProvider, | ||
| variant ? { variant } : {}, | ||
| React.createElement(ReactWebChat, { directLine, store }) | ||
| ) | ||
| ) | ||
| ); | ||
| } else { | ||
| renderWebChat({ directLine, store }, document.getElementById('webchat')); | ||
| } | ||
|
|
||
| await host.sendDevToolsCommand('Emulation.setEmulatedMedia', { | ||
| features: [{ name: 'prefers-reduced-motion', value: 'reduce' }] | ||
| }); | ||
| await pageConditions.uiConnected(); | ||
|
|
||
| const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
| // WHEN: Receive a bot message. | ||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00001', | ||
| text: 'In minim amet culpa adipisicing aliqua culpa minim culpa officia culpa laboris non commodo. Velit nisi ut sit amet in sunt eu voluptate Lorem eu do sint proident aute. Nulla nisi commodo consectetur anim id non ut est anim veniam occaecat excepteur dolor nulla. Adipisicing et dolor ex cillum sit ipsum amet labore officia dolor non ad aliquip officia. Irure quis occaecat cupidatat ut commodo culpa eiusmod ipsum pariatur. Excepteur aliqua consectetur anim laborum enim ipsum tempor occaecat voluptate.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| renderWebChat( | ||
| { directLine, store }, | ||
| document.getElementById('webchat') | ||
| ); | ||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00002', | ||
| text: 'Ad minim fugiat sint et laboris consectetur eu ut in nisi fugiat cillum est labore. Et proident tempor veniam ex est incididunt Lorem. Culpa sit id eu voluptate.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| await pageConditions.uiConnected(); | ||
|
|
||
| // WHEN: Receive a bot message. | ||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00001', | ||
| text: 'In minim amet culpa adipisicing aliqua culpa minim culpa officia culpa laboris non commodo. Velit nisi ut sit amet in sunt eu voluptate Lorem eu do sint proident aute. Nulla nisi commodo consectetur anim id non ut est anim veniam occaecat excepteur dolor nulla. Adipisicing et dolor ex cillum sit ipsum amet labore officia dolor non ad aliquip officia. Irure quis occaecat cupidatat ut commodo culpa eiusmod ipsum pariatur. Excepteur aliqua consectetur anim laborum enim ipsum tempor occaecat voluptate.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00002', | ||
| text: 'Ad minim fugiat sint et laboris consectetur eu ut in nisi fugiat cillum est labore. Et proident tempor veniam ex est incididunt Lorem. Culpa sit id eu voluptate.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00003', | ||
| text: 'Est voluptate eiusmod ad Lorem irure amet sint ea aliqua labore eu do nostrud exercitation. Non adipisicing non amet laborum. Anim fugiat minim cupidatat consequat ipsum minim ex mollit commodo ut aliqua quis consequat dolore. Cupidatat tempor laborum consectetur eiusmod cillum do consequat ad pariatur amet magna aliquip occaecat officia.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| // WHEN: Bot send either a contentless livestream or typing activity. | ||
| await directLine.emulateIncomingActivity({ | ||
| ...(isLivestream | ||
| ? { | ||
| channelData: { | ||
| streamSequence: 1, | ||
| streamType: 'streaming' | ||
| } | ||
| } | ||
| : {}), | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00004', | ||
| type: 'typing' | ||
| }); | ||
|
|
||
| // THEN: Should show typing indicator. | ||
| await waitFor(() => expect(pageElements.typingIndicator()).toBeTruthy()); | ||
|
|
||
| // THEN: Should match snapshot. | ||
| await host.snapshot('local'); | ||
|
|
||
| // --- | ||
|
|
||
| // WHEN: Bot send either a contentless livestream or typing activity. | ||
| await directLine.emulateIncomingActivity({ | ||
| ...(isLivestream | ||
| ? { | ||
| channelData: { | ||
| streamId: 'a-00004', | ||
| streamType: 'final' | ||
| } | ||
| await directLine.emulateIncomingActivity({ | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00003', | ||
| text: 'Est voluptate eiusmod ad Lorem irure amet sint ea aliqua labore eu do nostrud exercitation. Non adipisicing non amet laborum. Anim fugiat minim cupidatat consequat ipsum minim ex mollit commodo ut aliqua quis consequat dolore. Cupidatat tempor laborum consectetur eiusmod cillum do consequat ad pariatur amet magna aliquip occaecat officia.', | ||
| type: 'message' | ||
| }); | ||
|
|
||
| // WHEN: Bot send either a contentless livestream or typing activity. | ||
| await directLine.emulateIncomingActivity({ | ||
| ...(isLivestream | ||
| ? { | ||
| channelData: { | ||
| streamSequence: 1, | ||
| streamType: 'streaming' | ||
| } | ||
| } | ||
| : {}), | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00004', | ||
| type: 'typing' | ||
| }); | ||
|
|
||
| // THEN: Should show typing indicator. | ||
| await waitFor(() => expect(pageElements.typingIndicator()).toBeTruthy()); | ||
|
|
||
| // THEN: Should match snapshot. | ||
| await host.snapshot('local'); | ||
|
|
||
| // --- | ||
|
|
||
| // WHEN: Bot send either a contentless livestream or typing activity. | ||
| await directLine.emulateIncomingActivity({ | ||
| ...(isLivestream | ||
| ? { | ||
| channelData: { | ||
| streamId: 'a-00004', | ||
| streamType: 'final' | ||
| } | ||
| } | ||
| : { | ||
| channelData: { | ||
| webChat: { | ||
| styleOptions: { typingAnimationDuration: 0 } | ||
| } | ||
| : { | ||
| channelData: { | ||
| webChat: { | ||
| styleOptions: { typingAnimationDuration: 0 } | ||
| } | ||
| } | ||
| }), | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00005', | ||
| type: 'typing' | ||
| }); | ||
|
|
||
| // THEN: Should hide typing indicator. | ||
| await waitFor(() => expect(pageElements.typingIndicator()).toBeFalsy()); | ||
|
|
||
| // THEN: Should match snapshot. | ||
| await host.snapshot('local'); | ||
| } | ||
| }), | ||
| from: { id: 'u-00001', name: 'Bot', role: 'bot' }, | ||
| id: 'a-00005', | ||
| type: 'typing' | ||
| }); | ||
| </script> | ||
| </body> | ||
| </html> | ||
|
|
||
| // THEN: Should hide typing indicator. | ||
| await waitFor(() => expect(pageElements.typingIndicator()).toBeFalsy()); | ||
|
|
||
| // THEN: Should match snapshot. | ||
| await host.snapshot('local'); | ||
| }); | ||
| </script> | ||
| </body> | ||
|
|
||
| </html> | ||
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| export type AssetName = 'sliding dots'; | ||
| export type AssetName = 'sliding dots' | 'sliding dots reduced-motion'; |
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.