Add an option to disable the side menu?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Redoc.init configuration shown in the issue and trace how the side menu represented by .menu-content is rendered. Define an option that prevents it from being added to the DOM, while preserving the existing menu behavior when the option is not enabled; verify the resulting rendering and scrolling behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100