-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Duplicated datatable available as inspector data for Heatmap chart #126786
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Checked this PR and it fixes also #126886 👍 |
5f41118
to
1ffec98
Compare
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
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.
app services code LGTM
@elasticmachine merge upstream |
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.
Tested and didn't manage to break it. Left one thing that should be addressed before merging - approving as I don't think it needs another round of review
|
||
dispatchLens( | ||
onActiveDataChange( | ||
Object.entries(adapters.tables?.tables).reduce<Record<string, Datatable>>( |
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.
Note to @andrewctate We need to do something similar on your PR which brings "show underlying data" to the dashboard as a panel action - otherwise it won't have the required active data around in all cases
} | ||
}, | ||
[dispatchLens] | ||
[datasourceLayers, dispatchLens] |
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 will cause a lot of re-evaluations of this callback as datasourceLayers
changes often. Let's move the default layer id calculation (const [defaultLayerId] = Object.keys(datasourceLayers);
) into the component itself and pass defaultLayerId
into the hook as a dependency instead.
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @alexwizp |
…hart (elastic#126786) * [Lens] Duplicated datatable available as inspector data for Heatmap chart Close: elastic#123176 * update workspace_panel * revert allowCsvExport * fix CI * fix PR comments * apply pr comments Co-authored-by: Kibana Machine <[email protected]>
Closes: #123176, Closes: #126886
Summary
[Lens] Duplicated datatable available as inspector data for Heatmap chart
Describe the bug:
Since #120239 PR the Heatmap visualization has been unified between Lens, Visualize and Canvas.
The new shared function contains an inspector code to record the datatable with the default id, but because in Lens the inspector registers the data within the mergeTables expression function (executed earlier on) using the layer generated uuid, the result is a duplicated datatable in the Inspector (or in the CSV download).
Screen:
Screen.Recording.2022-03-14.at.10.45.37.AM.mov
[Lens] Datatables are not cleared on layer removal
Describe the bug:
Internal datatables are not cleaned up on layer removal in the configuration, appending any new table to the same multitable data structure.
To reproduce create a Lens visualization, then add a new layer and configure it, then remove it. Open the Inspect panel and see that there are 2 tables available to inspect.
Same issues applies also for reference layers.
Screen:
Screen.Recording.2022-03-14.at.10.44.52.AM.mov