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

[Discover] Enable EuiDataGrid as default document table #89264

Merged

Conversation

kertal
Copy link
Member

@kertal kertal commented Jan 26, 2021

Summary

This PR enables the new EuiDataGrid in Discover as a default grid in Discover and Dashboard saved searches.

Bildschirmfoto 2021-04-26 um 16 59 33

Here’s a quick summary of the improvements:

  • Changeable column widths
  • Sortable columns with drag and drop
  • Full screen mode
  • Much better way to sort
  • Expand documents in a flyout
  • Navigate to previous / next document in the flyout
  • Document selection, view only selection, export to clipboard
Performance (Outdated part) With the merge of #89648 performance, the biggest pain point will be fine, in my latest testing (production build version of #89648), legacy grid mounting was very slow, so I will search for a recent regression here.

So in my latest test I was rendering Discover in Chrome on a MacBookPro 2018. Been using the browser's performance tools to compare the time for initial rendering, adding columns, expanding documents. That was the setup:

Bildschirmfoto 2021-02-05 um 06 57 11

And those are the numbers how long rendering takes until the user sees a result:

  • Initital rendering: ~3.1s (Legacy, needs to be investigated) vs. ~1.5s (EuiDataGrid)
  • Adding a column: ~770ms (Legacy) vs. 400ms (EuiDataGrid)
  • Expanding a doc: ~ 470ms (Legacy) vs. 620ms (EuiDataGrid)

It's no big surprise that "Expanding a doc" is slower now, because there's a flyout displayed. Numbers may vary depending on screen size and setup, but all in all I can say: performance is fine. Will retry next week the #89648 was merged, have a look at angular world, and there's another performance improving PR in the pipeline, which should reduce re-renderings #89543.

Performance (latest, using #97276)

Tests using Chrome performance tools, start of scripting until the grid + data is displayed, settings pagination to 100

  • Initital rendering: ~2.3s (Legacy) vs. ~2s (EuiDataGrid)
Bildschirmfoto 2021-04-20 um 14 03 40 Bildschirmfoto 2021-04-20 um 14 04 58
  • Adding a column: ~670ms (Legacy) vs. 550ms (EuiDataGrid)
Bildschirmfoto 2021-04-20 um 14 12 24 Bildschirmfoto 2021-04-20 um 14 14 58
  • Expanding a doc: ~600ms (Legacy) vs. ~1200ms (EuiDataGrid - about 1000ms if you measure till the animation starts)
Bildschirmfoto 2021-04-20 um 14 18 07 Bildschirmfoto 2021-04-20 um 14 19 31

Summary: In the given test EuiDataGrid is a bit faster than the legacy grid, except when expanding a document, here is further potential to improve.

Fixes #12417

Checklist

@kertal kertal added the Feature:Discover Discover Application label Jan 26, 2021
@kertal kertal self-assigned this Jan 26, 2021
@kertal kertal changed the title [Discover] Enable EuiDataGrid by default [Discover] Enable EuiDataGrid Feb 5, 2021
@kertal
Copy link
Member Author

kertal commented Feb 5, 2021

@elasticmachine merge upstream

@kertal
Copy link
Member Author

kertal commented Feb 5, 2021

10 days ago no test failed ... well, some cleanup work ahead

@kertal
Copy link
Member Author

kertal commented Feb 8, 2021

@elasticmachine merge upstream

@kertal
Copy link
Member Author

kertal commented Feb 10, 2021

@elasticmachine merge upstream

@kertal
Copy link
Member Author

kertal commented Feb 11, 2021

@elasticmachine merge upstream

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Code review only - covered the dashboard functional test updates. Presentation team changes LGTM.

@kertal kertal requested a review from flash1293 April 14, 2021 15:51
Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

In a previous version of this the page sizes got increased (50,100,500 or something like this). This PR leaves them as 25/50/100, is this on purpose?

I'm not sure whether the EUI update fixing this went in already, but changing the page size too 100 is still relatively slow for me - not a blocker, it works fine, but takes a few seconds.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Approving as I think we can merge this for 7.13

@kertal
Copy link
Member Author

kertal commented Apr 19, 2021

In a previous version of this the page sizes got increased (50,100,500 or something like this). This PR leaves them as 25/50/100, is this on purpose?

Yes, because the EUI update with fixes is incoming:

#97276

That's why I didn't increase numbers

I'm not sure whether the EUI update fixing this went in already, but changing the page size too 100 is still relatively slow for me - not a blocker, it works fine, but takes a few seconds.

What takes a few seconds? I've tested in locally and changing pagination size was fast? thx!

@flash1293
Copy link
Contributor

What takes a few seconds? I've tested in locally and changing pagination size was fast? thx!

Changing from 25 to 100 rows with a full 500 docs loaded. But if the fix for this on EUI side isn't in yet, that would explain it. I think we can move forward with this PR>

@kertal
Copy link
Member Author

kertal commented Apr 20, 2021

@elasticmachine merge upstream

@kertal kertal merged commit 2ecbca0 into elastic:master Apr 20, 2021
kertal added a commit to kertal/kibana that referenced this pull request Apr 20, 2021
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
# Conflicts:
#	test/functional/apps/discover/_discover.ts
#	x-pack/test/functional/apps/security/doc_level_security_roles.js
#	x-pack/test/functional/apps/security/field_level_security.js
kertal added a commit that referenced this pull request Apr 20, 2021
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kertal

@kertal kertal changed the title [Discover] Enable EuiDataGrid [Discover] Enable EuiDataGrid as default document table Apr 21, 2021
@mshustov mshustov mentioned this pull request Apr 25, 2021
2 tasks
@kertal kertal added release_note:skip Skip the PR/issue when compiling release notes and removed release highlight release_note:feature Makes this part of the condensed release notes labels Apr 27, 2021
madirey pushed a commit to madirey/kibana that referenced this pull request May 11, 2021
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection 

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
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 Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make doc table header static
8 participants