Skip to content
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

De-angularize discover kbnTableHeader #41259

Merged
merged 19 commits into from
Jul 25, 2019

Conversation

kertal
Copy link
Member

@kertal kertal commented Jul 16, 2019

Summary

Rewrite doc_table table header (kbnTableHeader directive) in React, focused on removing React. EUIfication when all parts of the table are written in React.

Bildschirmfoto 2019-07-17 um 11 15 58

Part of #38646

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal kertal force-pushed the kertal-pr-doc_table_header branch from a7d7aaa to baa5057 Compare July 17, 2019 11:29
@kertal kertal self-assigned this Jul 17, 2019
@kertal kertal added the Feature:Discover Discover Application label Jul 17, 2019
@kertal kertal changed the title De-angularize kbnTableHeader De-angularize discover kbnTableHeader Jul 17, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal added the review label Jul 22, 2019
@kertal kertal requested a review from a team as a code owner July 22, 2019 05:23
if (!this.fields || !this.fields.byName) return;
return this.fields.byName[name];
}

Copy link
Member Author

@kertal kertal Jul 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the new function to satisfy typescript, also I think it's a better way to access field settings


return (
<tr data-test-subj="docTableHeader" className="kbnDocTableHeader">
<th style={{ width: '24px' }}></th>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the original angular template this was 1%, of course this should be removed generally when the whole table is reactified + EUItified

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a TODO or a ticket here so future people know what's up with this (even though there's a good chance the future people are you, seems like good practice)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't survive EUIfication, which will follow. It's just to keep the old way for a while, a bit more improved. There's no way this is kept, so I think in this case it's ok not to add a TODO here.

@kertal kertal added v7.4.0 and removed v7.0.0 labels Jul 22, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal requested a review from flash1293 July 24, 2019 08:17
@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal
Copy link
Member Author

kertal commented Jul 24, 2019

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal requested a review from cchaos July 24, 2019 12:30
Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SASS is good, thx!

Copy link
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


return (
<tr data-test-subj="docTableHeader" className="kbnDocTableHeader">
<th style={{ width: '24px' }}></th>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a TODO or a ticket here so future people know what's up with this (even though there's a good chance the future people are you, seems like good practice)

@kertal kertal merged commit 81e7d48 into elastic:master Jul 25, 2019
kertal added a commit to kertal/kibana that referenced this pull request Jul 25, 2019
* Add TableHeader + TableHeaderColumn react components

* Migration of kbnTableHeader to use react component

* Disable mocha tests

* Add jest tests
@elasticmachine
Copy link
Contributor

💔 Build Failed

kertal added a commit that referenced this pull request Jul 25, 2019
* Add TableHeader + TableHeaderColumn react components

* Migration of kbnTableHeader to use react component

* Disable mocha tests

* Add jest tests
Bargs added a commit to Bargs/kibana that referenced this pull request Jul 26, 2019
…elastic#42026)

Prior to elastic#41259 we intentionally did not show the sort, move, and remove column buttons in the doc table in the Context app. Context doesn't pass in handlers for these actions and in the old angular directive we conditionally showed the buttons depending on whether those handlers were passed in. So in this PR I've simply mimicked that behavior in the new React component.
Bargs added a commit that referenced this pull request Jul 26, 2019
…#42026)

Prior to #41259 we intentionally did not show the sort, move, and remove column buttons in the doc table in the Context app. Context doesn't pass in handlers for these actions and in the old angular directive we conditionally showed the buttons depending on whether those handlers were passed in. So in this PR I've simply mimicked that behavior in the new React component.
Bargs added a commit that referenced this pull request Jul 26, 2019
…#42026) (#42082)

Prior to #41259 we intentionally did not show the sort, move, and remove column buttons in the doc table in the Context app. Context doesn't pass in handlers for these actions and in the old angular directive we conditionally showed the buttons depending on whether those handlers were passed in. So in this PR I've simply mimicked that behavior in the new React component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes review Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants