-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discuss] Living documentation in Kibana #51506
Comments
I totally like and support that idea. I wonder how you see the correlation towards actual JSDoc, API documentation? For me it would make sense to have this in that same system so that you could also just click on any method call in the code and see the API documentation for that directly. I would at some point maybe even suggest enabling that
I think it could make sense having them living beside. Maybe the demos themselves are not linked in the navigation on the right, but you can have a link in each of the tutorials to "Full example (app)" which links you to the demo application (which would then also be the one tested via functional tests?). |
I've gone round and round on this. I started to investigate writing the tutorials in the API documentation but I don't think this is the right place for the tutorials. A step by step tutorial would be structured totally different than the API documentation, so I think we could create a UI that works best for each. It's also a bit awkward where each tutorial would be in the API Docs (if built as part of that) -- there is only one As far as how to connect the api docs and the tutorial docs, I think they should link to each other. Tutorial docs would have something like "learn more about this apis The tutorial docs could also theoretically be hosted online somewhere, even in asciidoc. But I don't want it to be written in asciidoc, but parsed into asciidoc, so we can continue to use the real code snippets. Right now, the shortest path to getting something up and running is to do all this in Kibana, but ultimately it'd be nice to parse this information into a json like the api-extractor has
Yea, the one issue with having the demos hosted inside the tutorial documentation is that it actually changes the reference code - e.g. if the demo is hosted in an app it gets stuff from AppMountContext, if it's a section inside the demo tutorials, it'll be retrieved differently. |
You can now run these examples via |
Tested Demos & Tutorials in Kibana
Proposal
Working, interactive, tested demos of services and extension points, with tutorials, using real extracted code snippets.
Goals
Details
I've gone around in circles on whether these tutorials should be built inside Kibana, or rather integrated with the api-extractor. Where I am at the moment is that it would be a much larger effort to integrate into the api-extractor, and also that these are really different types of documentation. One is documenting the public apis, another is step by step tutorials.
So, while I could swing back the other way, right now I'm planning to move forward with tutorial documentation inside Kibana, which can be linked to by the api-extracted documentation.
Steps
How can we break this down into small steps?
A single command to run all demo plugins in Kibana:
yarn start --run-demos
which just adds all the various--plugin-paths
and--no-base-path
.Sdd ability to extract code references.
Add a pluggable tutorial app in
plugin_functional
that has these tutorials. The demos can optionally live side by side these tutorials, or they can use links to navigate the user to the working demo. The benefit of having the demo outside the tutorial is that the code snippets are likely more real-life scenarios - e.g. the extension points will be available on AppMountContext, not passed through a custom context that the tutorial app is using.Build tutorials with code snippets and demos either linked or embedded.
Related links
The text was updated successfully, but these errors were encountered: