Skip to content

Conversation

@aditiohri
Copy link
Contributor

@aditiohri aditiohri commented Apr 5, 2022

Pull request description

  • Adds a check for window.isSecureContext signifying a secure HTTPS connection ensuring navigator.clipboard API will work correctly. Otherwise, throws an error.
  • Hides element using hidden attribute if an error is thrown as the element would be unusable in that state possibly confusing the end-user.
  • Hides element using the aria-disabled attribute if the element has been hidden.

tldr;

If the site is not secure, and the clipboard fallback cannot be used, an error is thrown and the element is hidden for all users.

Related issues

#1868 - [pfe-clipboard] If site isn't HTTPS copy functionality will not work.
#1873 - bug: pfe-clipboard does not have an accessible experience

Preview

  1. Check out to the branch fix/CPCORE-6611-pfeClipboard-httpsOnly
  2. Run npm start
  3. Go to https://deploy-preview-1981--patternfly-elements.netlify.app/components/clipboard/ or http://localhost:8000/demo/pfe-clipboard on your local

What has changed and why

  • pfe-clipboard.ts
    • add a private state variable, _secure, to check for window.isSecureContext value
    • add a _setCopyType function that sets copyType property depending on the value of _secure
    • uses copyType in copyTextToClipboard

Testing instructions

  • In a secure context
    1. Set up the branch locally
    2. Navigate to the pfe-clipboard
    3. User should be able to see and click on the element
    4. Screen reader should allow you to interact with the element
  • In an insecure context
    1. Set up the branch locally
    2. On line 111, set _secure to false
    3. Navigate to the pfe-clipboard
    4. User should not be able to see or click on the element
    5. Screen reader should not allow you to interact with the element

Browser requirements

Your component should work in all of the following environments:

  • Latest 2 versions of Edge
  • Latest 2 versions of Firefox (one on Mac OS, one of Windows OS)
  • Firefox 78 (or latest version for Red Hat Enterprise Linux distribution)
  • Latest 2 versions of Chrome (one on Mac OS, one of Windows OS)
  • Latest 2 versions of Safari
  • Android mobile device (such as the Galaxy S9)
  • Apple mobile device (such as the iPhone X)
  • Apple tablet device (such as the iPhone Pro)

Ready-for-merge Checklist

  • Expected files: all files in this pull request are related to one request or issue (no stragglers or scope-creep).
  • Tests have been updated to cover these changes.
  • Browser testing passed.
  • Changelog updated.
  • Documentation (README.md, WHY.md, etc.) updated or added.
  • Link to the demo recording:
  • Approved by designer.

Merging

Please squash when merging and ensure your commit message uses conventional commit formatting.

Be sure to share your updates with the patternfly-elements-contribute@redhat.com mailing list!

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2022

🦋 Changeset detected

Latest commit: d7b12c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/pfe-clipboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the functionality Functionality, typically pertaining to the JavaScript. label Apr 5, 2022
@netlify
Copy link

netlify bot commented Apr 5, 2022

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit d7b12c5
🔍 Latest deploy log https://app.netlify.com/sites/patternfly-elements/deploys/6258601f1dbb84000aca5dd5
😎 Deploy Preview https://deploy-preview-1981--patternfly-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the AT passed Automated testing has passed label Apr 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2022

🏮 Lighthouse report for the changes in this PR:

🔴 🟢 🟢 🟠 ⚪️ https://deploy-preview-1981--patternfly-elements.netlify.app/kitchen-sink/

🔦 Lighthouse Report for https://deploy-preview-1981--patternfly-elements.netlify.app/kitchen-sink/

🔬 View Detailed results 🧾

Category Score
🔴 Performance 19
🟢 Accessibility 92
🟢 Best practices 100
🟠 SEO 83

💥 Assertion Failures

Audit Result Docs
Reduce JavaScript execution time 0 (expected >=0.9) 📗
Background and foreground colors do not have a sufficient contrast ratio. 0 (expected >=0.9) 📗
Avoid an excessive DOM size 0.11 (expected >=0.9) 📗
First Contentful Paint 0.3 (expected >=0.9) 📗
First Meaningful Paint 0.03 (expected >=0.9) 📗
Image elements do not have [alt] attributes 0 (expected >=0.9) 📗
Largest Contentful Paint 0.02 (expected >=0.9) 📗
Minimize main-thread work 0 (expected >=0.9) 📗
Max Potential First Input Delay 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0 (expected >=0.9) 📗
Reduce unused JavaScript 1 (expected <=0) 📗
Uses efficient cache policy on static assets 2 (expected <=0) 📗
Document does not have a valid rel=canonical 0 (expected >=0.9) 📗
Time to Interactive 0.08 (expected >=0.9) 📗
undefined 0.92 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Styles

🔦 Lighthouse Report for Styles

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 90
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Background and foreground colors do not have a sufficient contrast ratio. 0 (expected >=0.9) 📗
First Contentful Paint 0.67 (expected >=0.9) 📗
First Meaningful Paint 0.84 (expected >=0.9) 📗
Heading elements are not in a sequentially-descending order 0 (expected >=0.9) 📗
Largest Contentful Paint 0.85 (expected >=0.9) 📗
Minimize main-thread work 0.82 (expected >=0.9) 📗
Max Potential First Input Delay 0.76 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Minify JavaScript 1 (expected <=0) 📗
undefined 0.9 (expected >=1) 📗
🟠 🟢 🟢 🟢 ⚪️ Accordion

🔦 Lighthouse Report for Accordion

🔬 View Detailed results 🧾

Category Score
🟠 Performance 64
🟢 Accessibility 97
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Reduce JavaScript execution time 0.74 (expected >=0.9) 📗
Background and foreground colors do not have a sufficient contrast ratio. 0 (expected >=0.9) 📗
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.73 (expected >=0.9) 📗
First Meaningful Paint 0.77 (expected >=0.9) 📗
Largest Contentful Paint 0.79 (expected >=0.9) 📗
Minimize main-thread work 0.56 (expected >=0.9) 📗
Max Potential First Input Delay 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.58 (expected >=0.9) 📗
Uses efficient cache policy on static assets 1 (expected <=0) 📗
undefined 0.97 (expected >=1) 📗
🟠 🟢 🟢 🟢 ⚪️ Autocomplete

🔦 Lighthouse Report for Autocomplete

🔬 View Detailed results 🧾

Category Score
🟠 Performance 89
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.67 (expected >=0.9) 📗
First Meaningful Paint 0.86 (expected >=0.9) 📗
Largest Contentful Paint 0.87 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.63 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Avatar

🔦 Lighthouse Report for Avatar

🔬 View Detailed results 🧾

Category Score
🟠 Performance 85
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.89 (expected >=0.9) 📗
Largest Contentful Paint 0.67 (expected >=0.9) 📗
Max Potential First Input Delay 0.88 (expected >=0.9) 📗
Serve images in next-gen formats 1 (expected <=0) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Preload Largest Contentful Paint image 0.53 (expected >=0.9) 📗
Speed Index 0.6 (expected >=0.9) 📗
Serve static assets with an efficient cache policy 1 (expected <=0) 📗
Efficiently encode images 1 (expected <=0) 📗
🟢 🟢 🟢 🟢 ⚪️ Badge

🔦 Lighthouse Report for Badge

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.87 (expected >=0.9) 📗
Largest Contentful Paint 0.88 (expected >=0.9) 📗
Max Potential First Input Delay 0.87 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.7 (expected >=0.9) 📗
Minify JavaScript 1 (expected <=0) 📗
🟠 🟢 🟢 🟢 ⚪️ Band

🔦 Lighthouse Report for Band

🔬 View Detailed results 🧾

Category Score
🟠 Performance 81
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.72 (expected >=0.9) 📗
First Meaningful Paint 0.89 (expected >=0.9) 📗
Heading elements are not in a sequentially-descending order 0 (expected >=0.9) 📗
Largest Contentful Paint 0.88 (expected >=0.9) 📗
Minimize main-thread work 0.89 (expected >=0.9) 📗
Max Potential First Input Delay 0.02 (expected >=0.9) 📗
Serve images in next-gen formats 1 (expected <=0) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Defer offscreen images 1 (expected <=0) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.72 (expected >=0.9) 📗
Efficiently encode images 1 (expected <=0) 📗
undefined 0.96 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Button

🔦 Lighthouse Report for Button

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Background and foreground colors do not have a sufficient contrast ratio. 0 (expected >=0.9) 📗
First Contentful Paint 0.72 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Max Potential First Input Delay 0.89 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.66 (expected >=0.9) 📗
undefined 0.96 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Card

🔦 Lighthouse Report for Card

🔬 View Detailed results 🧾

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟢 Best practices 93
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Browser errors were logged to the console 0 (expected >=0.9) 📗
First Contentful Paint 0.74 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Defer offscreen images 2 (expected <=0) 📗
Speed Index 0.69 (expected >=0.9) 📗
Image elements do not have explicit width and height 0 (expected >=0.9) 📗
Properly size images 2 (expected <=0) 📗
🟠 🟢 🟢 🟢 ⚪️ Clipboard

🔦 Lighthouse Report for Clipboard

🔬 View Detailed results 🧾

Category Score
🟠 Performance 83
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.67 (expected >=0.9) 📗
First Meaningful Paint 0.86 (expected >=0.9) 📗
Largest Contentful Paint 0.87 (expected >=0.9) 📗
Max Potential First Input Delay 0.19 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.67 (expected >=0.9) 📗
Uses efficient cache policy on static assets 1 (expected <=0) 📗
🟠 🟢 🟢 🟢 ⚪️ Codeblock

🔦 Lighthouse Report for Codeblock

🔬 View Detailed results 🧾

Category Score
🟠 Performance 88
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Avoid an excessive DOM size 0.53 (expected >=0.9) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.86 (expected >=0.9) 📗
Largest Contentful Paint 0.87 (expected >=0.9) 📗
Max Potential First Input Delay 0.54 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.7 (expected >=0.9) 📗
Minify JavaScript 1 (expected <=0) 📗
🟢 🟢 🟢 🟢 ⚪️ Collapse

🔦 Lighthouse Report for Collapse

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.7 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Cta

🔦 Lighthouse Report for Cta

🔬 View Detailed results 🧾

Category Score
🟠 Performance 76
🟢 Accessibility 96
🟢 Best practices 93
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Background and foreground colors do not have a sufficient contrast ratio. 0 (expected >=0.9) 📗
Browser errors were logged to the console 0 (expected >=0.9) 📗
First Contentful Paint 0.74 (expected >=0.9) 📗
First Meaningful Paint 0.84 (expected >=0.9) 📗
Largest Contentful Paint 0.87 (expected >=0.9) 📗
Minimize main-thread work 0.82 (expected >=0.9) 📗
Max Potential First Input Delay 0.03 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.66 (expected >=0.9) 📗
undefined 0.96 (expected >=1) 📗
🟠 🟢 🟢 🟢 ⚪️ Datetime

🔦 Lighthouse Report for Datetime

🔬 View Detailed results 🧾

Category Score
🟠 Performance 51
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Reduce JavaScript execution time 0.29 (expected >=0.9) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.57 (expected >=0.9) 📗
Largest Contentful Paint 0.57 (expected >=0.9) 📗
Minimize main-thread work 0.18 (expected >=0.9) 📗
Max Potential First Input Delay 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.51 (expected >=0.9) 📗
Time to Interactive 0.76 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Dropdown

🔦 Lighthouse Report for Dropdown

🔬 View Detailed results 🧾

Category Score
🟢 Performance 90
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.67 (expected >=0.9) 📗
First Meaningful Paint 0.85 (expected >=0.9) 📗
Largest Contentful Paint 0.86 (expected >=0.9) 📗
Max Potential First Input Delay 0.84 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.7 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Health Index

🔦 Lighthouse Report for Health Index

🔬 View Detailed results 🧾

Category Score
🟠 Performance 89
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.7 (expected >=0.9) 📗
First Meaningful Paint 0.86 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Max Potential First Input Delay 0.57 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.68 (expected >=0.9) 📗
🔴 🟢 🟠 🟢 ⚪️ Icon

🔦 Lighthouse Report for Icon

🔬 View Detailed results 🧾

Category Score
🔴 Performance 46
🟢 Accessibility 100
🟠 Best practices 87
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Reduce JavaScript execution time 0 (expected >=0.9) 📗
Avoid an excessive DOM size 0 (expected >=0.9) 📗
Browser errors were logged to the console 0 (expected >=0.9) 📗
First Contentful Paint 0.7 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Issues were logged in the Issues panel in Chrome Devtools 0 (expected >=0.9) 📗
Minimize main-thread work 0 (expected >=0.9) 📗
Max Potential First Input Delay 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0 (expected >=0.9) 📗
Serve static assets with an efficient cache policy 475 (expected <=0) 📗
Time to Interactive 0.14 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Icon Panel

🔦 Lighthouse Report for Icon Panel

🔬 View Detailed results 🧾

Category Score
🟠 Performance 87
🟢 Accessibility 95
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.7 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Heading elements are not in a sequentially-descending order 0 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Max Potential First Input Delay 0.42 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.69 (expected >=0.9) 📗
Uses efficient cache policy on static assets 6 (expected <=0) 📗
undefined 0.95 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Jump Links

🔦 Lighthouse Report for Jump Links

🔬 View Detailed results 🧾

Category Score
🟢 Performance 92
🟢 Accessibility 96
🟢 Best practices 93
🟢 SEO 91

💥 Assertion Failures

Audit Result Docs
Browser errors were logged to the console 0 (expected >=0.9) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.89 (expected >=0.9) 📗
Heading elements are not in a sequentially-descending order 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Defer offscreen images 1 (expected <=0) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.73 (expected >=0.9) 📗
Tap targets are not sized appropriately 0.03 (expected >=0.9) 📗
Image elements do not have explicit width and height 0 (expected >=0.9) 📗
Uses efficient cache policy on static assets 1 (expected <=0) 📗
undefined 0.96 (expected >=1) 📗
🟠 🟢 🟢 🟢 ⚪️ Label

🔦 Lighthouse Report for Label

🔬 View Detailed results 🧾

Category Score
🟠 Performance 73
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.7 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Largest Contentful Paint 0.88 (expected >=0.9) 📗
Minimize main-thread work 0.88 (expected >=0.9) 📗
Max Potential First Input Delay 0.01 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.68 (expected >=0.9) 📗
Minify JavaScript 1 (expected <=0) 📗
Uses efficient cache policy on static assets 9 (expected <=0) 📗
🟢 🟢 🟢 🟢 ⚪️ Markdown

🔦 Lighthouse Report for Markdown

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.87 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Max Potential First Input Delay 0.84 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.69 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Modal

🔦 Lighthouse Report for Modal

🔬 View Detailed results 🧾

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.74 (expected >=0.9) 📗
First Meaningful Paint 0.89 (expected >=0.9) 📗
Max Potential First Input Delay 0.86 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.69 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Number

🔦 Lighthouse Report for Number

🔬 View Detailed results 🧾

Category Score
🟢 Performance 93
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.76 (expected >=0.9) 📗
Max Potential First Input Delay 0.88 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.74 (expected >=0.9) 📗
Minify JavaScript 1 (expected <=0) 📗
🟢 🟢 🟢 🟢 ⚪️ Page Status

🔦 Lighthouse Report for Page Status

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.69 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Primary Detail

🔦 Lighthouse Report for Primary Detail

🔬 View Detailed results 🧾

Category Score
🟢 Performance 93
🟢 Accessibility 92
🟢 Best practices 93
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
ARIA IDs are not unique 0 (expected >=0.9) 📗
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
Browser errors were logged to the console 0 (expected >=0.9) 📗
First Contentful Paint 0.74 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.73 (expected >=0.9) 📗
undefined 0.92 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Progress Indicator

🔦 Lighthouse Report for Progress Indicator

🔬 View Detailed results 🧾

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.72 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Speed Index 0.7 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Progress Steps

🔦 Lighthouse Report for Progress Steps

🔬 View Detailed results 🧾

Category Score
🟠 Performance 75
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 98

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.82 (expected >=0.9) 📗
Largest Contentful Paint 0.84 (expected >=0.9) 📗
Minimize main-thread work 0.7 (expected >=0.9) 📗
Max Potential First Input Delay 0.03 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.69 (expected >=0.9) 📗
Tap targets are not sized appropriately 0.83 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Readtime

🔦 Lighthouse Report for Readtime

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.7 (expected >=0.9) 📗
First Meaningful Paint 0.87 (expected >=0.9) 📗
Largest Contentful Paint 0.88 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.7 (expected >=0.9) 📗
🟢 🟢 🟢 🟢 ⚪️ Select

🔦 Lighthouse Report for Select

🔬 View Detailed results 🧾

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
First Contentful Paint 0.72 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.72 (expected >=0.9) 📗
🟠 🟢 🟢 🟢 ⚪️ Tabs

🔦 Lighthouse Report for Tabs

🔬 View Detailed results 🧾

Category Score
🟠 Performance 70
🟢 Accessibility 92
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Reduce JavaScript execution time 0.81 (expected >=0.9) 📗
ARIA IDs are not unique 0 (expected >=0.9) 📗
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.75 (expected >=0.9) 📗
First Meaningful Paint 0.81 (expected >=0.9) 📗
Heading elements are not in a sequentially-descending order 0 (expected >=0.9) 📗
Largest Contentful Paint 0.84 (expected >=0.9) 📗
Minimize main-thread work 0.51 (expected >=0.9) 📗
Max Potential First Input Delay 0 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.7 (expected >=0.9) 📗
Uses efficient cache policy on static assets 3 (expected <=0) 📗
undefined 0.92 (expected >=1) 📗
🟢 🟢 🟢 🟢 ⚪️ Toast

🔦 Lighthouse Report for Toast

🔬 View Detailed results 🧾

Category Score
🟢 Performance 91
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100

💥 Assertion Failures

Audit Result Docs
Remove duplicate modules in JavaScript bundles 1 (expected <=0) 📗
First Contentful Paint 0.71 (expected >=0.9) 📗
First Meaningful Paint 0.88 (expected >=0.9) 📗
Largest Contentful Paint 0.89 (expected >=0.9) 📗
Avoid non-composited animations 0 (expected >=0.9) 📗
Eliminate render-blocking resources 1 (expected <=0) 📗
Speed Index 0.71 (expected >=0.9) 📗

@wesruv
Copy link
Contributor

wesruv commented Apr 6, 2022

Logging Gophers Take Mopeds! (looks good to me)

Copy link
Member

@bennypowers bennypowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes please, otherwise LGTM

@zeroedin
Copy link
Contributor

zeroedin commented Apr 14, 2022

@aditiohri to keep you in the loop after we had a chance to review this PR, we decided to make some adjustments.

The intention of this component, which was also a mistake on my first attempt, was that the component should always failover to execCommand copy functionality if navigator.clipboard isn't available and not on a secure HTTPS connection. While navigator.clipboard does work on localhost without HTTPS for local dev, we decided this at the moment was an ok exception within the updated logic. But, it definitely can be open for debate and another issue/pr opened to correct/cleanup.

The other big change was the removal of the @property decorator on the copyType property. We decided that this was best left as private property rather than exposing a public API there. Setting that value as an attribute on the component tag would get overwritten in the prior logic following the component upgrade lifecycle. If there is a need and intention to have a settable property for copyType please do open another issue, and we will revisit how to implement that.

Other smaller changes amounted to some cleanup on decorators that were extraneous. Please let me know if you have any questions about those changes and I can review them with you. Thank you for your help we appreciate it.

Copy link
Contributor

@heyMP heyMP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's Go Thursday Managers 👍

@heyMP heyMP merged commit 6883aa3 into main Apr 14, 2022
@heyMP heyMP deleted the CPCORE-6611-pfeClipboard-httpsOnly branch April 14, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed functionality Functionality, typically pertaining to the JavaScript. ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants