-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScriptified basic_table. #2428
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Thank you very much for this effort! I'll start reviewing soon.
We have an |
sorting?: SortingType; | ||
} | ||
|
||
export type Props = CommonProps & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we export this as EuiBasicTableProps
? I believe we've been moving in that direction recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I renamed this to EuiBasicTableProps
in my branch of your branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, I'll do that in that way.
Make it possible to type-check the props of EuiBasicTable and EuiInMemoryTable more effectively by making their props generic, and using the generic parameter throughout the tables' types.
Thanks for the PR @sainthkh! I'll go through these changes shortly, but first I raised a PR against your branch: These changes introduce a generic parameters to the basic table props, and threads that parameter through the types. The generic parameter makes it possible to get rid of some of the
|
@@ -1007,7 +1004,7 @@ exports[`EuiInMemoryTable with pagination and selection 1`] = ` | |||
responsive={true} | |||
selection={ | |||
Object { | |||
"onSelectionChanged": [Function], | |||
"onSelectionChange": [Function], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been renamed? I think it should be done as a separate PR, assuming it's actually necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
items: [], | ||
pagination: false, | ||
sorting: false, | ||
responsive: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to have lost this prop completely. It supposed to be passed on to EuiBasicTable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good overall - @chandlerprall what do you think of also adding in generic support?
Co-Authored-By: Chandler Prall <[email protected]>
Co-Authored-By: Chandler Prall <[email protected]>
Co-Authored-By: Chandler Prall <[email protected]>
Co-Authored-By: Chandler Prall <[email protected]>
…n't exist anymore.
@sainthkh I'm done with my passes, I've got a handful of changes to add to your branch, if you would please update again with master I'll set up that PR. The i18ntokens.json conflict can be resolved by taking "their" side, any pending changes will be regenerated by the next build. |
@chandlerprall Sorry, I misunderstood your comment and was waiting for your PR against my forked repo. I've merged your branch first to my branch and merged again to the master branch. |
No worries! Everything looks good to me, and with the American Thanksgiving holiday this week I'd like to hold off merging this until next week, as we'll be less able to respond to any unintended consequences and it'd be more difficult to get Kibana upgraded. Early next week I'll do another Kibana pass to make sure I have a clean branch there ready to go, and then we'll merge and release these changes. Thank you, once again, for working through this conversion! |
Update: Took longer to update my Kibana branch against changes in master than expected, now planning to merging this on Monday the 9th. |
@chandlerprall I agree. Kibana changes really fast. If there's anything to do on my side, please tell me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; lots of local digging & testing.
Thanks again @sainthkh for working on this and putting up with the back-and-forth communication & waiting!
Summary
Related to #1557.
Closes #2523
TypeScriptified basic_table dir. In other words, EuiBasicTable and EuiInMemoryTable are now TypeScript!
Note
Omit
but Eui uses 3.3.3. So, I commented the code out.Checklist