-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
💔 Build Failed |
a7d7aaa
to
baa5057
Compare
💔 Build Failed |
💔 Build Failed |
- makes more sense than that 1% relict
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
if (!this.fields || !this.fields.byName) return; | ||
return this.fields.byName[name]; | ||
} | ||
|
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 the new function to satisfy typescript, also I think it's a better way to access field settings
src/legacy/core_plugins/kibana/public/discover/doc_table/components/_table_header.scss
Show resolved
Hide resolved
|
||
return ( | ||
<tr data-test-subj="docTableHeader" className="kbnDocTableHeader"> | ||
<th style={{ width: '24px' }}></th> |
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.
In the original angular template this was 1%
, of course this should be removed generally when the whole table is reactified + EUItified
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.
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)
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.
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.
💚 Build Succeeded |
💔 Build Failed |
jenkins test this |
💚 Build Succeeded |
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.
SASS is good, thx!
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!
|
||
return ( | ||
<tr data-test-subj="docTableHeader" className="kbnDocTableHeader"> | ||
<th style={{ width: '24px' }}></th> |
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.
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)
* Add TableHeader + TableHeaderColumn react components * Migration of kbnTableHeader to use react component * Disable mocha tests * Add jest tests
💔 Build Failed |
…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.
…#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.
…#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.
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.Part of #38646
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] [Unit or functional tests] (https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor 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