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

docs: Improve preview via API documentation #1948

Merged
merged 12 commits into from
Jan 8, 2025

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Jan 7, 2025

Closes #1583

This PR:

  • extracts chart adjusters and utils from config-types.ts to separate files, so that we actually only have types and simple type checks in config-types.ts (e.g. isMapChart),
  • adds generate-json-schema script that can be run manually via CLI or automatically on build, which generates JSON Schema files for configurator state and chart config types,
  • improves preview via API documentation to point to new JSON Schema files, that can be used as a help when wanting to adjust the configs via VS Code autocomplete.

Autocomplete could be tested by opening the example files in VS Code, once this PR is deployed to PROD (as the schema ids point to PROD instance for simplicity).

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 8:47am

Copy link
Contributor

@noahonyejese noahonyejese left a comment

Choose a reason for hiding this comment

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

Nice stuff, thanks @bprusinowski 🎉

@bprusinowski bprusinowski force-pushed the docs/better-preview-via-api-docs branch from 572f8aa to 217194a Compare January 8, 2025 08:42
@bprusinowski bprusinowski merged commit ef1ec7a into main Jan 8, 2025
3 of 4 checks passed
@bprusinowski bprusinowski deleted the docs/better-preview-via-api-docs branch January 8, 2025 08:42
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.

Improve calling charts via API documentation
2 participants