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] Do not crash data panel on invalid KQL query #70712

Merged
merged 5 commits into from
Jul 9, 2020

Conversation

flash1293
Copy link
Contributor

Fixes #69734

So I think this should be handled within the query bar itself as well (maybe using the error state of the input to show something is off?). Also, the error message esaggs is emitting could be more user friendly. I will create a separate issue for the app arch team for this.

But for the specific case and in the interest of fixing this for 7.9 I think we should behave like the user has entered a query that didn't return any data:
behavior

This PR also removes the "field info" popover behavior for fields without data - it doesn't really make sense to show field info for an empty field (this simplifies the problem because otherwise we would need the same handling for the field item component).

@flash1293 flash1293 marked this pull request as ready for review July 3, 2020 15:21
@flash1293 flash1293 requested a review from a team July 3, 2020 15:21
@flash1293 flash1293 added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jul 3, 2020
@elasticmachine
Copy link
Contributor

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

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

Tested locally, and the workaround LGTM. The error message from esaggs would be useful if we showed it with line-breaks, but I don't think that's needed here.

@@ -198,10 +198,12 @@ export const InnerFieldItem = function InnerFieldItem(props: FieldItemProps) {
className={`lnsFieldItem__info ${infoIsOpen ? 'lnsFieldItem__info-isOpen' : ''}`}
data-test-subj={`lnsFieldListPanelField-${field.name}`}
onClick={() => {
togglePopover();
if (exists) {
togglePopover();
Copy link
Contributor

Choose a reason for hiding this comment

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

The previous behavior here was confusing, but actually sort of useful, where the click state could be used to debug issues with the exists logic. I don't think it needs to be changed here.

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@flash1293 flash1293 merged commit 269c62a into elastic:master Jul 9, 2020
flash1293 added a commit to flash1293/kibana that referenced this pull request Jul 9, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
flash1293 added a commit that referenced this pull request Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Datapanel disappears when typing invalid KQL syntax
4 participants