elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.22k stars 24.85k forks source link

[DOCS] Implement collapsible sections for nested objects in Elasticsearch APIs #54667

Closed lcawl closed 4 years ago

lcawl commented 4 years ago

We have created a stylesheet to make it easier to delineate nested objects in the API reference pages: https://github.com/elastic/docs/pull/1786

We have already implemented it in machine learning APIs like https://www.elastic.co/guide/en/elasticsearch/reference/master/get-dfanalytics-stats.html and https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-put-job.html

It involves setting [role="child_attributes"] on the section that contains nested objects, then putting the objects in collabsible sections, which default to open for search purposes.

The following APIs contain nested objects and would likely benefit from this layout too:

P.S. The child_attributes stylesheet is not set in stone either. If there are better colours or padding, input is welcome on https://github.com/elastic/docs/blob/master/resources/web/style/child_attributes.pcss

elasticmachine commented 4 years ago

Pinging @elastic/es-docs (>docs)

patelvp commented 4 years ago

Working on cluster reroute and explore. Hope nobody is looking into it.