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

feat(TextInput): Convert text input to TypeScript by rebeccaalpert · Pull Request #1914 · patternfly/patternfly-react · GitHub

feat(TextInput): Convert text input to TypeScript - #1914

Merged
tlabaj merged 7 commits into
patternfly:masterfrom
rebeccaalpert:textinput-typescript
Jun 5, 2019
Merged

feat(TextInput): Convert text input to TypeScript#1914
tlabaj merged 7 commits into
patternfly:masterfrom
rebeccaalpert:textinput-typescript

Conversation

Copy link
Copy Markdown
Member

Fixes #1908.

Copy link
Copy Markdown
Collaborator

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

codecov-io commented May 2, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #1914 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1914      +/-   ##
==========================================
+ Coverage   81.09%   81.14%   +0.04%     
==========================================
  Files         643      644       +1     
  Lines        7706     7721      +15     
  Branches      451      453       +2     
==========================================
+ Hits         6249     6265      +16     
+ Misses       1257     1256       -1     
  Partials      200      200
Flag Coverage Δ
#patternfly3 84.88% <ø> (ø) ⬆️
#patternfly4 77.01% <100%> (+0.11%) ⬆️
#patternflymisc 95.68% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...fly-4/react-core/src/components/TextInput/index.ts 100% <100%> (ø)
.../react-core/src/components/TextInput/TextInput.tsx 100% <100%> (ø)

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 6c04803...d70a2a2. Read the comment docs.

Copy link
Copy Markdown
Contributor

@rebeccaalpert can you also add integration tests for this component as outlined on this README?

Copy link
Copy Markdown
Member Author

Added demo and tests.

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member Author

Updated enum typing as discussed in meeting.

rebeccaalpert requested review from dlabaj and tlabaj May 16, 2019 14:42

dlabaj 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

A few comments. Let me know if you have any questions.

dlabaj self-assigned this May 17, 2019
dlabaj previously approved these changes May 17, 2019

dlabaj 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

Great job! Thanks @rebeccaalpert !

dlabaj dismissed redallen’s stale review May 17, 2019 18:47

Re requesting review

dlabaj requested a review from redallen May 17, 2019 18:47

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

Jest Test are failing.

dlabaj previously approved these changes May 28, 2019

dlabaj 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

tlabaj previously approved these changes May 29, 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

jschuler previously approved these changes May 29, 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

Really close, thanks for your work!

@@ -1,6 +1,6 @@
import React from 'react';

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

Change the extension on this file to .tsx

/** A callback for when the input value changes. */
onChange?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
/** Type that the input accepts. */
type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url';

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

To allow use of the enum, I believe you need to add | TextInputTypes

const { className, type, value, onChange, isValid, isReadOnly, isRequired, isDisabled, ...props } = this.props;
return (
<input
{...props}

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

Let's spread the props at the end to be consistent across components.

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

tlabaj merged commit 1707236 into patternfly:master Jun 5, 2019
rebeccaalpert deleted the textinput-typescript branch June 6, 2019 13:50
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 TextInput to TypeScript

9 participants


Back | FazBrowse Home | New Git URL