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

Support type hint and lint for metrics editor #4495

Merged
merged 3 commits into from
Apr 14, 2024

Conversation

djbarnwal
Copy link
Member

@djbarnwal djbarnwal commented Apr 3, 2024

Add type hints and lint for metrics editor. This PR also adds a JSON Schema for the metrics editor. In long term we would want to auto generate the schema from our Typescript types and doc strings. Since we are not there yet and not all types are consolidated, this JSON schema has be updated manually (along with docs and go validator) when we update our schema.

Future Improvements -

  • Auto completion based on enum
  • Add link and markdown support in tooltips/description

@ericpgreen2
Copy link
Contributor

I was confused when I first saw the error state. It looks like 1 popover (the error) is overlapping another popover (the documentation).
image

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

This is great! My one worry is the hardcoded JSON schema will be a PITA to continually synchronize with the source-of-truth on the backend. Maybe there's a way we can generate it programmatically? @begelundmuller, thoughts?

@djbarnwal djbarnwal merged commit 573f4aa into main Apr 14, 2024
4 checks passed
@djbarnwal djbarnwal deleted the code-editor-schema-support branch April 14, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants