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: Handle source column differences in embeddable as well #91987

Merged

Conversation

flash1293
Copy link
Contributor

Follow-up of #91815

The translation for _source vs document column wasn't called for the embeddable, but with changing settings or legacy saved objects, they can be in an inconsistent state. This PR pulls the same logic inside of the embeddable.

It also moves the call to getDisplayedColumns which is required by the data grid implementation into the datagrid itself so it's not only picked up in main discover, but in the embeddable as well.

To test, please consider the full matrix (all 24 combinations) of:

  • View: main discover, embedddable, context
  • UI: Data grid vs legacy table
  • Data fetching: fields vs source
  • Saved object state: configured _source column vs empty columns array

@flash1293 flash1293 added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v7.13.0 labels Feb 19, 2021
@flash1293 flash1293 marked this pull request as ready for review February 19, 2021 12:23
@flash1293 flash1293 requested a review from a team February 19, 2021 12:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293 flash1293 linked an issue Feb 19, 2021 that may be closed by this pull request
Copy link
Contributor

@majagrubic majagrubic left a comment

Choose a reason for hiding this comment

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

Tested this with various combinations of _source of fields API for both tables and works as expected.
Maybe we could add a functional test for this, as adding an embeddable of a saved search is quite a common pattern I believe.

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 396.9KB 397.0KB +185.0B

History

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

@flash1293 flash1293 merged commit fde2c84 into elastic:master Feb 22, 2021
flash1293 added a commit to flash1293/kibana that referenced this pull request Feb 22, 2021
flash1293 added a commit to flash1293/kibana that referenced this pull request Feb 22, 2021
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 22, 2021
* master: (36 commits)
  [Uptime] Thumbnail full screen view steps navigation fix (elastic#91895)
  Implement ScopedHistory.block (elastic#91099)
  [Lens] Fix overlowing content on a chart for charts and table (elastic#92006)
  handle source column differences in embeddable as well (elastic#91987)
  [Vega] [Map] disable map rotation using right right click /  touch rotation gesture (elastic#91996)
  [Lens] Load indexpatterns list from indexPattern Service (elastic#91984)
  [coverage] ingest data in parallel (elastic#92074)
  [Lens] Drag and drop performance improvements (elastic#91641)
  A few more environment uiFilters fixes (elastic#92044)
  Enabling Uptime and Dashboard a11y test (elastic#91017)
  [Security Solution][Detections] Adds more granular validation for nested fields (elastic#92041)
  [Security Solution] [Detections] add overflow-wrap for description (elastic#91945)
  [Security Solution] [Detections] do not truncate filename in value list table in modal (elastic#91952)
  Skip flaky apm test elastic#91673 (elastic#92065)
  [docker] Default server.name to hostname (elastic#90799)
  Use documentation link service for snapshot restore (elastic#91596)
  [Security Solution] Clearing up all jest errors and warnings (elastic#91740)
  Add `@kbn/analytics` to UI Shared Deps (elastic#91810)
  [7.12][Telemetry] Add missing fields for security telemetry (elastic#91920)
  [Security Solution] Adds cypress-pipe (elastic#91550)
  ...
flash1293 added a commit that referenced this pull request Feb 22, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
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.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discover: Source column in embeddable not shown correctly
4 participants