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

[Vega] Improve the error when schema is messed up #113899

Closed
stratoula opened this issue Oct 5, 2021 · 4 comments · Fixed by #114459
Closed

[Vega] Improve the error when schema is messed up #113899

stratoula opened this issue Oct 5, 2021 · 4 comments · Fixed by #114459
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Vega Vega visualizations 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 :VisEditors:fix-it-week

Comments

@stratoula
Copy link
Contributor

Describe the feature:
There are cases that the schema of the vega spec can be messed up:
Examples:

  1. Mess up with the title
    image

  2. Add chars after the .json
    image

This generates an error which is not so easy to understand. The fix is easy, ensure that your schema is correct. but we should ensure that the error is easier to understand. Something like:
Ensure that vega schema is set correctly or something like that. We can work on this with the @elastic/kibana-docs team

@stratoula stratoula added Feature:Vega Vega visualizations enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure :VisEditors:fix-it-week labels Oct 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

@stratoula stratoula added bug Fixes for quality problems that affect the customer experience and removed enhancement New value added to drive a business result labels Oct 5, 2021
@stratoula stratoula added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Oct 5, 2021
@stratoula
Copy link
Contributor Author

Btw vega online editor handles it correctly
image

@stratoula stratoula added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Oct 5, 2021
@KOTungseth
Copy link
Contributor

Would it make sense to include exactly what users should include? For example:

The URL for the JSON "$schema" is incorrect.
If you are using Vega, use https://vega.github.io/schema/vega/v5.json.
If you are using Vega-Lite, use https://vega.github.io/schema/vega-lite/v5.json.

If we don't want to include the schema strings, about how:

The URL for the JSON "$schema" is incorrect. Correct the URL, then click Update.

@stratoula
Copy link
Contributor Author

stratoula commented Oct 6, 2021

Thanx Kaarina! I prefer the shorter version

The URL for the JSON "$schema" is incorrect. Correct the URL, then click Update.

I am not sure if we can identify the vega library used. If we can we could go with:

The URL for the JSON "$schema" is incorrect. Use `https://vega.github.io/schema/vega-lite/v5.json`, then click Update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Vega Vega visualizations 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 :VisEditors:fix-it-week
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants