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

[Lens] allow rendering despite invalid dimensions/layers #144906

Open
drewdaemon opened this issue Nov 9, 2022 · 2 comments
Open

[Lens] allow rendering despite invalid dimensions/layers #144906

drewdaemon opened this issue Nov 9, 2022 · 2 comments
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:x-large Extra Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure usability

Comments

@drewdaemon
Copy link
Contributor

drewdaemon commented Nov 9, 2022

Describe the feature

Today in many cases Lens will not render a chart because of a single invalid dimension or layer. The rest of the chart configuration may be perfectly valid and if the problematic portion of the configuration were ignored, we could still show the user a partial chart while still signaling the problem with this dimension-local pattern we use for reference lines:

Screen Shot 2022-11-09 at 9 52 47 AM

This would make for a better user experience than we have today since

  • It doesn't throw up a hard roadblock—it's more beneficial since they can still visualize the things that are working
  • More localized error messaging which is more clearly actionable because they know exactly where to make the change

We could also make the error icon mutually exclusive with the existing swatch/collapsed/palette dimension icon.

Specific use cases

  • partial subsequent data layer on XY (could just exclude that layer and still render the first)
  • extra bucket dimensions on partition chart
  • counter rate and remove date histogram
  • partially configured cumulative sum
  • incorrect formula
  • required dimensions (i.e. we may have a dimension marked as required, but technically be able to render something even when it isn't there)
  • annotation layer's data view missing

Questions

  • Saving behavior with invalid configuration

Related questions

Technical thinking

This change would involve allowing the visualization class to mark certain dimensions as invalid for all purposes (including data fetching) except display to the user.

One idea from @dej611 could be creating a validation pipeline that is applied to the datasource and/or visualization state before that state is used for anything but displaying the dimension configurations.

const validState = getValidState(datasourceState, datasource, visualization)

// none of the invalid dimensions will be fetched because they weren't used when building the expression
const expression = datasource.toExpression(validState);
@drewdaemon drewdaemon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Nov 9, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@drewdaemon drewdaemon added the enhancement New value added to drive a business result label Nov 9, 2022
@drewdaemon drewdaemon added the impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. label Dec 22, 2022
@timductive timductive added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:weeks and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Feb 8, 2023
@lukasolson lukasolson added loe:x-large Extra Large Level of Effort and removed loe:weeks labels Feb 21, 2023
@drewdaemon
Copy link
Contributor Author

drewdaemon commented Sep 26, 2023

With the right (wrong?) data view, pre-ingest integration dashboards can still look awful, even after #149262. This issue should fix this because it will prevent invalid configurations from making it to the renderer.

#149262 was basically a "let-it-fail" solution. Works okay in many scenarios, but just how many was never tracked or studied.

The following dashboard contains many visualizations using the same data view. They are all (but one) failing for lack of field data while the renderer builds the elasticsearch request (esaggs has its own set of validation checks).

Dashboard errors - Screenshot 2023-09-25 at 14-31-42 Dashboards - Elastic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:x-large Extra Large Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure usability
Projects
None yet
Development

No branches or pull requests

5 participants