Skip to content
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

Add Copy button to white label UX #5262

Merged
merged 17 commits into from
Aug 19, 2024
Merged

Add Copy button to white label UX #5262

merged 17 commits into from
Aug 19, 2024

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Aug 17, 2024

Changelog Entry

Added

  • Added "Copy" button to bot messages in Fluent UI if it contains keyword AllowCopy, in PR #5259 and #5262, by @compulim

Description

Ported the "Copy" button to both white-label and Fluent/Copilot theme.

Design

The "Copy" button would show up if:

  • An activity with type message, and;
  • the activity with a non-empty text field, and;
  • the activity has a Message thing in entities field with @id of empty string, and;
  • the Message thing has keywords containing "AllowCopy"

If the textFormat is unset or "markdown", both plain text and HTML text version of the message will be copied to the clipboard.

For example,

{
  "entities": [
    {
      "@context": "https://schema.org",
      "@id": "",
      "@type": "Message",
      "keywords": ["AllowCopy"],
      "type": "https://schema.org/Message"
    }
  ],
  "text": "Hello, World!",
  "type": "message"
}

Specific Changes

  • Port the Fluent version of "Copy" button to white-label
  • Reimplement Fluent/Copilot theme
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim changed the title Add Copy button to white label Add Copy button to white label UX Aug 17, 2024
@compulim compulim force-pushed the feat-white-label-copy-button branch from 6aa03b9 to 89a990b Compare August 17, 2024 03:24
@OEvgeny
Copy link
Collaborator

OEvgeny commented Aug 17, 2024

Solid work. It looks like it should be done this way 🚀

@compulim compulim marked this pull request as ready for review August 18, 2024 20:20
OEvgeny
OEvgeny previously approved these changes Aug 19, 2024
@compulim compulim merged commit c583510 into main Aug 19, 2024
25 checks passed
@compulim compulim deleted the feat-white-label-copy-button branch August 19, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants