[Lens] Allow a single operation to create multiple user-facing operations #77949
Labels
Feature:Lens
🧊 iceboxed
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
technical debt
Improvement of the software architecture and operational architecture
This is an issue describing a current limitation of the Lens architecture and outlining some approaches to fixing it.
Example use case
There are some types of functions that create key/value pairs, or that produce multiple columns of output instead of multiple rows. For example:
As a user, I would expect that I could follow the following user flow:
bytes
. This will set the X axis to the key, for example99%
.bytes
field.The end result of this configuration is that I only created the X axis manually, and the Y axis was assigned automatically.
Why is this currently not supported?
Because datasources can't unilaterally generate new columns and assign them to visual dimensions. The closest behavior that we have is when the user drops a field into the Lens editor, and then a suggestion is generated and applied.
Datasources can unilaterally generate columns, but because the IDs aren't known by the visualization, it won't be editable by the user. So the only requirements here are:
Implementation plan
Because the closest behavior is happening with suggestions, I propose that we create a new function that allows the Lens datasource to "push" suggestions, as opposed to having suggestions "pulled" from the datasource. Suggestions will be allowed to be pushed from the Dimension Editor, which is the component in the UI that manages operations. In this case, the expected flow is:
Essentially, this changes the interface of the dimension editor by adding a new
pushSuggestion
function:The suggestion will be taken by the editor frame, and gets applied to the state.
The text was updated successfully, but these errors were encountered: