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

feat(Grid): Convert grid to typescript by jessiehuff · Pull Request #2443 · patternfly/patternfly-react · GitHub

feat(Grid): Convert grid to typescript - #2443

Merged
redallen merged 13 commits into
patternfly:masterfrom
jessiehuff:feat/gridTS
Jul 10, 2019
Merged

feat(Grid): Convert grid to typescript#2443
redallen merged 13 commits into
patternfly:masterfrom
jessiehuff:feat/gridTS

Conversation

jessiehuff commented Jul 3, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #2447

Copy link
Copy Markdown
Collaborator

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

tlabaj added Breaking change 💥 this change requires a major release and has API changes. Do Not Merge labels Jul 3, 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

We are missing demo and integration test here..

test(`${size} Title`, () => {
const view = shallow(
<Title size={size} headingLevel={TitleLevel.h1}>
<Title size={size as 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl'} headingLevel={TitleLevel.h1}>

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

does the Title.h1 work here? Or do we have to use the string?

jessiehuff Jul 8, 2019
edited
Loading

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

Yes, it should still work. :)

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

Okay, butwhy are we changing this as part of the Grid conversion?

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 was running into some errors with the tests, and this was my workaround at the time. I think I found a way that we can keep the previous code.

md: 'Md',
lg: 'Lg',
xl: 'Xl',
xl2: '_2xl'

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

Why did we change the definition of the const here?

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

This is to build the prop names from react-styles correctly.

tlabaj removed Breaking change 💥 this change requires a major release and has API changes. Do Not Merge labels Jul 8, 2019
test(`${size} Title`, () => {
const view = shallow(
<Title size={size} headingLevel={TitleLevel.h1}>
<Title size={size as 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl'} headingLevel={TitleLevel.h1}>

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

Okay, butwhy are we changing this as part of the Grid conversion?

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

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

Nice refactor.

redallen merged commit d4f8231 into patternfly:master Jul 10, 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 Grid to Typescript

4 participants


Back | FazBrowse Home | New Git URL