-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Fluent] Add copy button #5259
Merged
Merged
[Fluent] Add copy button #5259
Conversation
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
OEvgeny
reviewed
Aug 10, 2024
compulim
force-pushed
the
feat-fluent-copy-button
branch
from
August 14, 2024 00:55
36b72a2
to
e4f0e1b
Compare
compulim
commented
Aug 15, 2024
packages/fluent-theme/src/components/preChatActivity/StarterPromptsCardAction.module.css
Outdated
Show resolved
Hide resolved
compulim
requested review from
a-b-r-o-w-n,
cwhitten,
srinaath,
tdurnford and
beyackle2
as code owners
August 15, 2024 19:53
OEvgeny
reviewed
Aug 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking for dark mode test and enabling this in some side-by-side
tests for copilot variant, so we see how all this combines.
packages/fluent-theme/src/components/activityToolbox/Button.module.css
Outdated
Show resolved
Hide resolved
packages/fluent-theme/src/components/preChatActivity/StarterPromptsCardAction.module.css
Outdated
Show resolved
Hide resolved
packages/fluent-theme/src/components/activityToolbox/Button.module.css
Outdated
Show resolved
Hide resolved
packages/fluent-theme/src/components/activityToolbox/Button.module.css
Outdated
Show resolved
Hide resolved
packages/fluent-theme/src/components/activityToolbox/CopyButton.module.css
Outdated
Show resolved
Hide resolved
OEvgeny
reviewed
Aug 15, 2024
OEvgeny
previously approved these changes
Aug 15, 2024
OEvgeny
reviewed
Aug 15, 2024
packages/fluent-theme/src/components/activityToolbox/ActivityToolbox.module.css
Outdated
Show resolved
Hide resolved
OEvgeny
approved these changes
Aug 15, 2024
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changelog Entry
Added
AllowCopy
, in PR #5259, by @compulimDescription
If the bot message has
AllowCopy
keyword in its Message entity, a "Copy" button will appear below the text and above all attachments. Clicking on the button will copy the text as both plain text and rich text (if the bot message is a Markdown).Design
New
getMessageEntity
helper functionAdded new
getMessageEntity
helper function to obtain the Message schema.org object associated with the message itself.When the base package is ready, we should move this helper function there.
New web server for hosting test pages
To allow
navigator.clipboard
, the page must be run under secure context and enabled via CDPBrowser.setPermission
with permission ofclipboard-write
.Previously, browser in Docker was using http://webchat2. In this PR, we introduced a self-signed certificate for https://webchat2. The certificate is generated randomly on container start.
This does not affect running the tests locally as it will be tested against http://localhost:5001 instead.
Specific Changes
getMessageEntity
helper functionwithEmoji.5.html
to grant clipboard permission as we are now running under secure context and havenavigator.clipboard
enabledCHANGELOG.md
Review Checklist
z-index
)Documents reviewed (docs, samples, live demo)Internationalization reviewed (strings, unit formatting)package.json
andpackage-lock.json
reviewed