FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(ClipboardCopy): Convert clipboard copy to typescript by jessiehuff · Pull Request #2131 · patternfly/patternfly-react · GitHub

feat(ClipboardCopy): Convert clipboard copy to typescript - #2131

Merged
dlabaj merged 14 commits into
patternfly:masterfrom
jessiehuff:feat/clipboardTS
Jun 27, 2019
Merged

feat(ClipboardCopy): Convert clipboard copy to typescript#2131
dlabaj merged 14 commits into
patternfly:masterfrom
jessiehuff:feat/clipboardTS

Conversation

Copy link
Copy Markdown
Contributor

Fixes #2130

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://2131-pr-patternfly-react-patternfly.surge.sh

codecov-io commented May 31, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@a5d571e). Click here to learn what that means.
The diff coverage is 74.46%.

@@            Coverage Diff            @@
##             master    #2131   +/-   ##
=========================================
  Coverage          ?   80.54%           
=========================================
  Files             ?      666           
  Lines             ?     8470           
  Branches          ?      729           
=========================================
  Hits              ?     6822           
  Misses            ?     1281           
  Partials          ?      367
Flag Coverage Δ
#patternfly3 85.23% <ø> (?)
#patternfly4 76.09% <74.46%> (?)
#patternflymisc 95.79% <ø> (?)
Impacted Files Coverage Δ
...c/components/ClipboardCopy/ClipboardCopyButton.tsx 66.66% <66.66%> (ø)
...components/ClipboardCopy/ClipboardCopyExpanded.tsx 75% <75%> (ø)
...c/components/ClipboardCopy/ClipboardCopyToggle.tsx 84.61% <84.61%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5d571e...1b34124. Read the comment docs.

redallen previously approved these changes Jun 3, 2019

redallen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you! 🎖️

zIndex?: number;
/** Size of the tooltip */
maxWidth?: '12.5rem';
maxWidth?: string;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good catch!

redallen previously approved these changes Jun 7, 2019
/** Flag to show if the input is read only. */
isReadOnly?: boolean;
/** Adds Clipboard Copy variant styles. */
variant?: typeof ClipboardCopyVariant | 'inline' | 'expansion';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I thought we decided to just have the union of the values here and not the "Typeof"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I believe that we need the typeof for the older consumers using the enum.

it('Verify content expands', () => {
cy.get('.pf-c-clipboard-copy__group-toggle').click();
cy.get('.pf-c-clipboard-copy').should('have.class', 'pf-m-expanded');
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think we should add more verification steps here. We dod not verify that the copy actually works and I think we need to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do you know of a good way to test the copy paste feature? I tried this:

it('Verify copy to clipboard works', () => {
    const form = cy.get('.pf-c-form-control');
    form.clear().type('Hi'); 
    cy.get('.pf-c-clipboard-copy__group-copy').click(); 
    cy.get('.pf-c-form-control').clear().type('{cmd}v');
    form.should('have.value', 'Hi'); 
  });

But it always ends up typing "v" instead of doing a paste. I've been looking into it, but I'm not sure what the solution would be: cypress-io/cypress#3316

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2131.surge.sh

redallen previously approved these changes Jun 18, 2019

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

dlabaj merged commit 44168dd into patternfly:master Jun 27, 2019
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
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.

Convert ClipboardCopy to Typescript

7 participants


Back | FazBrowse Home | New Git URL