Redoc: Add an option to disable the side menu?

Created on 27 May 2020  路  4Comments  路  Source: Redocly/redoc

Hi, what do you think about adding an option to disable the side menu (not rendering it to the DOM)?

Rationale:

  • Give users the option to opt out
  • More performant
  • Less issues with scrolling

In my use case, I've been using CSS to hide the side menu as I have other sidebar to show.
And recently, I've bumped into an issue with the scroll (similar to https://github.com/Redocly/redoc/issues/1177), I ended up adding a callback to remove the side menu as it turns out to be the quick-fix:

Redoc.init(spec, {
  disableSearch: true
},
document.querySelector("redoc"),
function() {
  document.querySelector(".menu-content").remove();
});

If we get a greenlight on this, maybe we can work on a PR to make it happen 馃檪
Thanks!

feature under consideration

Most helpful comment

@RomanHotsiy thanks, good to confirm that 馃檪

Our use case is that we have our own sidebar that contains hand-crafted links like API guideline, changelog, and top-level grouped API pages, etc. For each ReDoc API page, we also have a custom table of contents links aboe of the API doc, so we don't need the default ReDoc side menu (been hiding them via css).

All 4 comments

I think this option can be added. Could you elaborate on your use case though?

@RomanHotsiy thanks, good to confirm that 馃檪

Our use case is that we have our own sidebar that contains hand-crafted links like API guideline, changelog, and top-level grouped API pages, etc. For each ReDoc API page, we also have a custom table of contents links aboe of the API doc, so we don't need the default ReDoc side menu (been hiding them via css).

I support this option. We use ReDoc exclusively for our COVID API docs, and would love to remove the right side bar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bmarwell picture bmarwell  路  3Comments

dvh picture dvh  路  3Comments

typekpb picture typekpb  路  4Comments

JFCote picture JFCote  路  3Comments

gauravmokhasi picture gauravmokhasi  路  4Comments