agent icon indicating copy to clipboard operation
agent copied to clipboard

Add section in docs for Operator API

Open marctc opened this issue 2 years ago • 7 comments

PR Description

This PR introduces https://github.com/ahmetb/gen-crd-api-reference-docs tool to generate automatically API documentation for Agent Operator. The new doc changes are generated when running make generate-crd.

This is how it looks:

Screenshot 2022-09-16 at 16-53-48 API Reference

Which issue(s) this PR fixes

Closes #2115

PR Checklist

  • [ ] CHANGELOG updated
  • [ ] Documentation added
  • [ ] Tests updated

marctc avatar Sep 16 '22 16:09 marctc

I love it!

captncraig avatar Sep 16 '22 16:09 captncraig

I can't speak to the style or layout for the generated docs or how it fits into our general theme, but I do think this is a much needed addition.

captncraig avatar Sep 16 '22 16:09 captncraig

Oh my, this might not display very well for some people:

image

I'm not sure what we should do about that. We might have to wait for @jdbaldry to come back before we get some options here, since the horizontal scroll bar doesn't appear for me and the overflow content gets hidden.

rfratto avatar Sep 16 '22 16:09 rfratto

My one nit would be maybe we should call this the CRD reference instead of API reference so it doesn't get confused with the other API page.

But I think this is a great idea, we might just have to take it a little slow to figure out how we can fix the formatting.

rfratto avatar Sep 16 '22 16:09 rfratto

@rfratto is this site displayed for your properly?

marctc avatar Sep 16 '22 16:09 marctc

@rfratto is this site displayed for your properly?

Yeah, on that one I can horizontally scroll. For some reason, with our Hugo theme, I can scroll to the right but then I can't ever scroll back to the left.

rfratto avatar Sep 16 '22 16:09 rfratto

Oh my, this might not display very well for some people:

image

I'm not sure what we should do about that. We might have to wait for @jdbaldry to come back before we get some options here, since the horizontal scroll bar doesn't appear for me and the overflow content gets hidden.

Yeah, hopefully that can be fixed. This is great given that it's a generated file. It seems weird that the field types don't have their own column, but beggars can't be choosers when you're getting generated docs for free.

karengermond avatar Sep 16 '22 19:09 karengermond

I've not yet looked into the website styling of tables and how we can handle them more responsively. Would you like me to take this to the website squad and see what I can find out?

jdbaldry avatar Oct 12 '22 14:10 jdbaldry

I've not yet looked into the website styling of tables and how we can handle them more responsively. Would you like me to take this to the website squad and see what I can find out?

Yes please :) Aside from tables not having horizontal scroll bars, I would also love if we had a little bit of control over the styling so code-formatted text looked consistent between rows rather than how it looks now:

image

rfratto avatar Oct 12 '22 15:10 rfratto

I will merge this as it is and create a follow-up issue to fix visualizations issues

marctc avatar Oct 26 '22 13:10 marctc