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

feat(LoginPage): Convert LoginPage to typescript, add integration tests, and demo by jeff-phillips-18 · Pull Request #1967 · patternfly/patternfly-react · GitHub

feat(LoginPage): Convert LoginPage to typescript, add integration tests, and demo - #1967

Merged
tlabaj merged 3 commits into
patternfly:masterfrom
jeff-phillips-18:login-page-ts
May 17, 2019
Merged

feat(LoginPage): Convert LoginPage to typescript, add integration tests, and demo#1967
tlabaj merged 3 commits into
patternfly:masterfrom
jeff-phillips-18:login-page-ts

Conversation

jeff-phillips-18 commented May 10, 2019
edited
Loading

Copy link
Copy Markdown
Member

What:

  • Convert LoginPage components to typescript
  • Add LoginPage to demo app
  • Add integration tests for LoginPage

fixes #1995

codecov-io commented May 10, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #1967 into master will decrease coverage by 0.42%.
The diff coverage is 65.32%.

@@            Coverage Diff            @@
##           master   #1967      +/-   ##
=========================================
- Coverage   82.33%   81.9%   -0.43%     
=========================================
  Files         628     628              
  Lines        6980    7053      +73     
  Branches      136     201      +65     
=========================================
+ Hits         5747    5777      +30     
- Misses       1161    1167       +6     
- Partials       72     109      +37
Flag Coverage Δ
#patternfly3 84.88% <ø> (ø) ⬆️
#patternfly4 77.86% <65.32%> (-0.88%) ⬇️
#patternflymisc 95.68% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...-core/src/components/LoginPage/LoginFooterItem.tsx 100% <100%> (ø)
.../components/LoginPage/LoginMainFooterLinksItem.tsx 100% <100%> (ø)
...c/components/LoginPage/LoginMainFooterBandItem.tsx 100% <100%> (ø)
.../react-core/src/components/LoginPage/LoginForm.tsx 55.17% <40.9%> (ø)
...eact-core/src/components/LoginPage/LoginHeader.tsx 44.44% <44.44%> (ø)
.../react-core/src/components/LoginPage/LoginPage.tsx 63.63% <45%> (ø)
...ly-4/react-core/src/components/LoginPage/Login.tsx 60% <50%> (ø)
...eact-core/src/components/LoginPage/LoginFooter.tsx 50% <50%> (ø)
...-core/src/components/LoginPage/LoginMainFooter.tsx 53.84% <50%> (ø)
...ct-core/src/components/LoginPage/LoginMainBody.tsx 87.5% <87.5%> (ø)
... and 10 more

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 4972cc3...fb2e632. Read the comment docs.

Copy link
Copy Markdown
Collaborator

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

footer = null,
header = null,
...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

Change to }: LoginProps) => (

Login.propTypes = propTypes;
Login.defaultProps = defaultProps;

export default Login;

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

Remove all default exports.

className = '',
children = null,
...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

Change to }: LoginFooterProps) => (

href = '#',
target = '_blank',
...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

Change to }: LoginFooterItemProps) => {

onChangeRememberMe = () => undefined,
rememberMeAriaLabel = '',
...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

Change to }: LoginFormProps) => ( and ditch the return.

children = null,
className = '',
...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

Change to }: LoginMainFooterBandItemProps) => (

target = '',
className = '',
...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

Change to }: LoginMainFooterLinksItemProps) => (

title = '',
subtitle = '',
...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

Change to }: LoginMainHeaderProps) => (

forgotCredentials = null,
socialMediaLoginContent = null,
...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

Change to }: LoginPageProps) => {

.then(userNameInput => expect(userNameInput.text()).to.equal(''));
cy.get('input[name="pf-login-password-id"]')
.then(passwordInput => expect(passwordInput.text()).to.equal(''));
cy.get('#pf-login-remember-me-id')

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 tests again. Thanks.

@@ -7,6 +7,6 @@ import LinkPreview from '@content/../LinkPreview';
import RawSimpleLoginPage from '!!raw-loader!./examples/SimpleLoginPage';

Copy link
Copy Markdown
Member

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 need: typescript: true to show the TS badge?

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

Yep!

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

Can you please link the related issue here

jeff-phillips-18 force-pushed the login-page-ts branch 2 times, most recently from 28a3144 to ba9d441 Compare May 16, 2019 18:40
filter: PropTypes.string
})
]),
backgroundImgSrc?: string | BackgroundImageSrcMap;

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 am not sure this will work for documentation due to the string in the union. We should update this to use the string values for BackgroundImageSrcMap.

Copy link
Copy Markdown
Member 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

@tlabaj My assumption, based on the code in BackgroundImage, is that there are potentially other strings that might be valid as wel (otherwise, why have the string | ?). I can change the BackgroundImageSrcMap part to list the options, but with any string being valid it will still show as union in the docs, correct?

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

Ye, that is my understanding as well.

Copy link
Copy Markdown
Member 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

so is it worth listing the values here? If it's going to say union anyhow, might as well use the enum here (I assume we would be using the enums everywhere if the docs worked correctly).

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

dtaylor113 previously approved these changes May 17, 2019
dlabaj previously approved these changes May 17, 2019

dlabaj commented May 17, 2019

Copy link
Copy Markdown
Contributor

@jeff-phillips-18 Looks good but there's a few conflicts now.

Copy link
Copy Markdown
Member Author

Rebased

dlabaj requested a review from redallen May 17, 2019 14:36
dlabaj dismissed redallen’s stale review May 17, 2019 14:36

Rerequesting review after updates.

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 4657da1 into patternfly:master May 17, 2019
jeff-phillips-18 deleted the login-page-ts branch May 12, 2022 12:00
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 Login Page to TypeScript

7 participants


Back | FazBrowse Home | New Git URL