Integrating EuiDataGrid into Discover#51531
Integrating EuiDataGrid into Discover#51531myasonik wants to merge 32 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
420b50c to
7abb1b1
Compare
💔 Build Failed
|
💔 Build Failed
|
|
For the cell popover with the 2 filter options, here is a screenshot from this prototype: I will work on the flyout portion in Figma to see about cleaning up some of it. |
src/legacy/core_plugins/kibana/public/discover/angular/directives/table.tsx
Outdated
Show resolved
Hide resolved
src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts
Outdated
Show resolved
Hide resolved
|
@myasonik nice progress on the data grid
*The expanded view always to only shows the expanded view without the ability to use the main Discover screen. The existing discover allows users to open and interact with discover, expanding multiple documents at once. I understand it is difficult to replicate it, however, we should at least let users see the discover main view while looking at the expanded document. This view also can use less of the screen with a smaller width
Happy tp play with it again whenever it makes sense, I know there is a lot of work thank you @myasonik |
💔 Build Failed
History
To update your PR or re-run it, just comment with: |
5440b05 to
e6671e5
Compare
…discover-data-grid
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
💔 Build FailedTest FailuresKibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/discover·ts.Discover main viewStandard OutStack TraceKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_discover_navigation·js.context app context link in discover "before all" hook for "should open the context view with the selected document as anchor"Standard OutStack TraceKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_discover_navigation·js.context app context link in discover "before all" hook for "should open the context view with the selected document as anchor"Standard OutStack Traceand 5 more failures, only showing the first 3. History
To update your PR or re-run it, just comment with: |
| } else { | ||
| setVisibleColumns(dataGridColumns.map(obj => obj.id)); | ||
| } | ||
| }, [dataGridColumns.length]); // eslint-disable-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
So, when adding the first column, there is no change in length of columns, it switches between ['_source'] and ['myLovelyFirstColumn'], so the visible columns aren't set. The following code should fix this (using isEqual of lodash)
useEffect(() => {
// every time a column is added, make it visible
if (!mounted.current) {
mounted.current = true;
} else {
const newColumns = dataGridColumns.map(obj => obj.id);
if (!isEqual(newColumns, visibleColumns)) {
setVisibleColumns(newColumns);
}
}
}, [dataGridColumns, visibleColumns]);|
classing in favor of #67259 |





Summary
Gets
EuiDataGridinto Discover! 🎉Resolves #737
Resolves #38982
Resolves #58204
Resolves #56529
Resolves #54345
Resolves #696
Resolves #8706
Part of #38646
TODO
🐲 There be dragons here still!
EuiFlyoutintable.tsxshould probably be broken out into its own file_scorewhich isn't automatically added to the table. We either need to show that in the UI somehow or add_scoreto be automatically added and show the sort as normal. (Related Discover: Sort automatically by _score if it makes sense #54362) [Adding it to the UI is a nightmare. Instead, rolling with a simpler change of removing_scoresort when a new sort is added.]Pain points with EUI
Tracked in elastic/projects/323
To further investigate
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers