| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
|
cc: @jenny-s51 - please feel free to begin converting tests in react-table to typescript if you have time! I'm trying to tackle the remaining components now... thanks for the help here! |
Sorry, something went wrong.
|
cc: @mturley - will definitely try to review this w/ you once through w/ first pass! |
Sorry, something went wrong.
|
Absolutely @priley86 ! At first glance this looks awesome, but I'll dig a little deeper and get back to you. Maybe early next week we can step through it together on a call. This is probably outside the scope of this PR, but I notice you're pulling in tslint.. do you have any opinion on moving to eslint-typescript in the future? or at least enabling the prettier plugin for tslint? currently we're not enforcing code formatting in our CI: #2362 It might be nice to resolve that either before or shortly after we add a bunch of new code like this, so we don't have as much churn later on. |
Sorry, something went wrong.
|
On 7/19/2019 3:13 PM, Mike Turley wrote:
Absolutely @priley86 <https://github.com/priley86> ! At first glance
this looks awesome, but I'll dig a little deeper and get back to you.
Maybe early next week we can step through it together on a call.
This is probably outside the scope of this PR, but I notice you're
pulling in tslint.. do you have any opinion on moving to
eslint-typescript in the future? or at least enabling the prettier
plugin for tslint? currently we're not enforcing code formatting in
our CI: #2362 <#2362>
It might be nice to resolve that either before or shortly after we add
a bunch of new code like this, so we don't have as much churn later on.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2360?email_source=notifications&email_token=AAD32QQZV2IDQPAWAQREBILQAIG5ZA5CNFSM4H3SPW6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2MQGRQ#issuecomment-513344326>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD32QRVYBKHLGWSWR3FKULQAIG5ZANCNFSM4H3SPW6A>.
FWIW, Keycloak is using eslint with the @typescript-eslint/eslint-plugin
and @typescript-eslint/parser.
I chose this because the TypeScript team is embracing eslint over
tslint: https://eslint.org/blog/2019/01/future-typescript-eslint
|
Sorry, something went wrong.
|
heh ;) - you guys read my mind, I am actually in full support of this move to @typescript-eslint/eslint-plugin and had brought this up in previous emails as well... I chose to follow @patternfly/react-core, but I'm perfectly fine with making the shift off of tslint if others are. I don't know if this is something we want to start exploring here. This probably needs further discussion, but it's very important! cc: @dgutride thoughts on this topic? |
Sorry, something went wrong.
|
I realize there was some existing history and this move off of tslint will take some time... |
Sorry, something went wrong.
|
@priley86 it sounds like it's outside the scope of this PR, but let's at least make sure we run Prettier on this code so it has a good start formatting-wise :) It might be worth getting Prettier to run as part of our tslint usage as a first step before we move to eslint.. I'm less concerned about which linter we have and more about just the fact that we have style rules disabled. As for the rest of this PR, I'll be mostly buried in meetings the next two days, so I hope to start a more thorough review on Wednesday. |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
Yea, i believe it should be a different PR, but I'm glad others support this move to @typescript-eslint/eslint-plugin too.
added tslint and some tslint fixes: I've disabled these tslint rules since they will currently be breaking changes: "interface-name": false,
"no-empty-interface": false,
"ban-types": [true, {"Function": false}],
This is more or less just to conform to the existing standards in @patternfly/react-core |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
|
(still probably out of scope, sorry to clutter this thread, but one last thing) I see you added tslint-config-prettier, but just fyi that brings us to the same problem we have in react-core. tslint-config-prettier disables tslint rules that would conflict with prettier, but it doesn't run prettier. we should also add tslint-plugin-prettier in both places (or set up Prettier CLI to be run as part of CI) #2362 |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
agreed! It does not look like it's functioning correctly. I'll give this a go after other changes are complete! |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2360.surge.sh |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Nice work! I pulled the simple example into the seed project and while it seems to render just fine, I get the following runtime warning;
Warning: Failed prop type: Invalid prop rows[1] supplied to Table.
FWIW I only see this when running in development mode, it isn't reported in production builds.
I don't see this with the other examples. The only other thing I noticed is that the "Table with headers that wrap" example also uses the CompactTable component name, I assume it's just from copy/pasta but could be confusing. Maybe give that example a more relevant name like WrappableHeadersTable or something of the sort?
Sorry, something went wrong.
There was a problem hiding this comment.
@priley86 this was an insane amount of work, kudos! It will be really nice to have this all typesafe as a good foundation for evolving the table API.
I just have a few minor comments here and there (and some might be dumb questions, I'm still getting the hang of TypeScript). I apologize that it took me so long to find time to review this! I'll admit it was a little intimidating 😆
Sorry, something went wrong.
There was a problem hiding this comment.
Oops, accidentally ticked the approve box on my last review.
Sorry, something went wrong.
That warning is interesting (and technically correct). Our SimpleTable example is using the shorthand to pass the cells array without declaring that prop. This technically works b/c Reactabular will still merge those props, however I think we should make all examples consistent w/ our typings. This will probably also lead to more downstream consistency... so I've updated the example code to match typings to resolve this. Consumers can still use the shorthand, but I think the warning is appropriate... Re: "WrappableHeadersTable" - updated! |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks great! Awesome job.
Sorry, something went wrong.
|
@dlabrecq and @karelhala, you guys will need to re-approve, sorry for the churn! |
Sorry, something went wrong.
|
thanks for the extensive review @mturley and @seanforyou23 ! Tried to capture all follow-ups in #2673. I believe all breaking changes related to types can come in that future PR... for now, just trying to keep existing consumers unaffected w/ this change. |
Sorry, something went wrong.
There was a problem hiding this comment.
👍
Sorry, something went wrong.
|
@dlabrecq @karelhala If you find anything wrong, please open a follow-up issue! |
Sorry, something went wrong.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What:
Closes #1950 #2504 - React-Table TypeScript conversion.
Additional issues: