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

KQL Parse error look incorrect due to text wrapping in toast notification #49377

Open
Bargs opened this issue Oct 25, 2019 · 18 comments
Open

KQL Parse error look incorrect due to text wrapping in toast notification #49377

Bargs opened this issue Oct 25, 2019 · 18 comments
Labels
enhancement New value added to drive a business result Feature:Lens Feature:Maps impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@Bargs
Copy link
Contributor

Bargs commented Oct 25, 2019

Kibana version: master, haven't checked if it was introduced earlier

KQL parse errors were originally developed to be displayed in the old notification area at the top of the application. This was important because the arrow pointing at the location of the error depended on the text not wrapping. At some point those errors were updated to be displayed in a toast, and now they look broken:

image

Per the toast guidelines in the EUI docs we should probably display an abbreviated error message in the toast with a button to display the full message including the arrow in a larger modal.

@Bargs Bargs added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:KQL KQL labels Oct 25, 2019
@elasticmachine
Copy link
Contributor

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

@Bargs Bargs added the bug Fixes for quality problems that affect the customer experience label Oct 25, 2019
@timroes timroes added Team:AppArch and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@github-actions github-actions bot added this to To triage in kibana-app-arch Feb 20, 2020
@flash1293
Copy link
Contributor

I think I fixed that as part of a different PR, will check and report back.

@ppisljar ppisljar moved this from To triage to Medium Horizon in kibana-app-arch Apr 7, 2020
@lukasolson lukasolson added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 23, 2020
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Jun 2, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Jan 4, 2022
@lukasolson
Copy link
Member

Just checked, this is still an issue.

@petrklapka petrklapka added Feature:Search Querying infrastructure in Kibana Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) and removed Team:AppServicesSv labels Nov 23, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal
Copy link
Member

kertal commented Apr 26, 2023

Works as expected in Discover
Bildschirmfoto 2023-04-26 um 11 19 16
Seems it could be improved in Lens
Bildschirmfoto 2023-04-26 um 11 21 14
Seems it could need improvement on a Dashboard (Lens and saved searches displayed here)

Bildschirmfoto 2023-04-26 um 11 25 01

@kertal kertal removed this from Medium Horizon in kibana-app-arch Apr 26, 2023
@kertal
Copy link
Member

kertal commented Apr 26, 2023

I checked if it's an easy fix, but I think just enabling newlines in the markdown component doesn't make this error message More useful

Image

Also the used Markdown renderer is marked to be deprecated:

/** @deprecated use Markdown from @kbn/shared-ux-markdown */

Removing from @elastic/kibana-data-discovery ownership since it needs work on the embeddable rendering, that's not just a little fix

@kertal kertal added Feature:Dashboard Dashboard related features and removed :DataDiscovery/fix-it-week labels Apr 26, 2023
@kibanamachine kibanamachine added this to Inbox in Dashboard Apr 26, 2023
@kertal kertal added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) labels Apr 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@kibanamachine kibanamachine removed this from Inbox in Discover Apr 26, 2023
@kertal kertal added Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Apr 26, 2023
@elasticmachine
Copy link
Contributor

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

@kibanamachine kibanamachine added this to Long-term goals in Lens Apr 26, 2023
@kertal kertal removed Feature:Search Querying infrastructure in Kibana Feature:KQL KQL labels Apr 26, 2023
@kertal
Copy link
Member

kertal commented Apr 26, 2023

removing Feature:Search & Feature:KQL tags, because it's about how multi line errors are rendered

@davismcphee
Copy link
Contributor

fyi, this is how we make it work in the Discover error:

white-space: break-spaces;
font-family: ${euiTheme.font.familyCode};

@stratoula
Copy link
Contributor

@kertal can you help me with this? I see this in main, it should be displayed differently?

image

@kertal
Copy link
Member

kertal commented May 5, 2023

@stratoula I can't see if there's a newline in this example ... like here

Since the text align is left, and the newline is rendered, the last part of the error, this ascii arrow makes sense. it wouldn't if it was als rendered without newlines, and centered

@davismcphee
Copy link
Contributor

@stratoula @kertal It's also necessary to use font-family: ${euiTheme.font.familyCode}; on the text to enable a monospace font, or the arrow still won't line up.

Misaligned
//()dfdsfsdf
--^

Aligned

//()dfdsfsdf
--^

@stratoula stratoula added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels May 5, 2023
@ThomThomson
Copy link
Contributor

I'm not sure that this is an issue that we could fix on the Dashboard side. Aren't the errors there are surfaced on the Dashboard arising from the Lens / Saved search Embeddables?

@stratoula
Copy link
Contributor

@ThomThomson have you checked maps?

@ThomThomson ThomThomson added Feature:Maps and removed Feature:Dashboard Dashboard related features labels May 10, 2023
@kibanamachine kibanamachine removed this from Inbox in Dashboard May 10, 2023
@ThomThomson
Copy link
Contributor

Ah hah, good call! I will swap this from feature:dashboard to feature:maps. Should be an easy fix

Screen Shot 2023-05-10 at 9 03 53 AM

@davismcphee
Copy link
Contributor

@ThomThomson This might not be related to Dashboard directly, but it does seem to be related to embeddables. The issue isn't with the errors themselves, it's the component displaying them which seems to be src/plugins/embeddable/public/lib/panel/embeddable_panel_error.tsx. If that component used the CSS linked in my comment, it should fix the issue on the embeddables side.

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 Feature:Maps impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

No branches or pull requests