rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.71k stars 285 forks source link

Suggestion : Collapsible groups #127

Closed K3UL closed 4 years ago

K3UL commented 4 years ago

Hi,

I would like to suggest doing the same as asked in #28, collapsible groups when grouping by tags. That issue was closed but IMO the response given was a little beside the point.

This works really well in a case (such as mine) where you have a log of different paths (paths, not just operations) and that they are usually tagged accordingly to the department that uses/reviews them.

Our users currently use Swagger UI on the legacy apps and they are used to come to a fully-collapsed view, open the one group they need, and have a view of what is of interest for them.

I personally prefer RapiDoc for various reasons (thank you for a great tool !), among which the fact it's so easily hackable. Pretty neat. But I see the lack of collapsible groups as a big usability issue.

So I would suggest an option to turn that on. Personally I would even make it collapsible by default.

And again, thank you for such a nice-to-use tool !

mrin9 commented 4 years ago

well, I am not just talking about supporting collapsible groups. The problem that we all are trying to address here is how to make a large doc easy to navigate and collapsible-groups may be one such feature that can take away some pain.

We have made few prototypes in the past to address this but none of them was up to our liking except one. That was to group all the paths by method. Released in version 5.3.0 but had to discontinue its support due to poor user feedback. Now we are again out of ideas :(

whats the problem with collapsible-groups ? well, there are few cases that needs to be addressed in a way thats not confusing to the user

Having said all that, If I can get a basic pull request implementing collapsible-groups that addresses some of the above concerns we will work towards it to get it into the product.

We rely heavily on user contributions, and is one of our primary reason to keep our codebase small and simple. If any one is interested, please give it a try, IMHO any average developer will be in a position to contribute !!!

happy hacking

mrin9 commented 4 years ago

this feature contributed by @fbacker addresses the issue of collapsible groups here is a test case / demo for it https://mrin9.github.io/RapiDoc/examples/collapsable.html