Closed dagnelies closed 4 years ago
good suggestion, but you need to take into account that RapiDoc is a custom element and people can specify its width and height, therefore assuming that the entire viewport is used is little incorrect.
I am willing to work to make it little more user-friendly, one way I can think of is to expose the max-height as an attribute. Do you have any other suggestions?
Hi, sorry for the delay. Maybe some people do not show such doc/specs on the whole page ...maybe. But it is probably more the exception than the rule. ;)
In any case, 200px is a really low default. This is how my specs looks like: ;)
Alternatively, a great way of how specs could be customized is to simply allow adding a custom CSS stylesheet.
the screenshot you provided above, I can feel your pain. and yes, we must do something to address this.
RapiDoc isnt a website so we cannot provide a CSS Stylesheets that user can update or tweak. It is just like any other HTML element. and elements dont come with there own stylesheet.
The way we style it is with css vars I will address this issue in our next release
PS: Thanks for bringing it up
addressed it in release 7.1.1
set the default height to 300px
added a new prop response-area-height
refer https://mrin9.github.io/RapiDoc/api.html for more details
The code panel containing the json responses is rather small.
I suggest replacing the
https://github.com/mrin9/RapiDoc/blob/021dfc1bb520fb689bfa4cc7adb4c7210dc0bc0c/src/styles/font-styles.js#L27
by 2/3 of the viewport height: