cloud-annotations / docusaurus-openapi

🦕 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
486 stars 80 forks source link

bug: hideable for sidebar is not fully supported #243

Open ernado opened 1 year ago

ernado commented 1 year ago

Having

docs: {
  sidebar: {
    hideable: true,
  }
},

image

The collapseSidebarButton is displayed incorrectly.

Also, after hiding sidebar, the "unhide" button is not available:

image

I'm installing docusaurus-openapi like plugin (but I've also tried preset with same results):

[
  'docusaurus-plugin-openapi',
  /** @type {import('docusaurus-plugin-openapi').Options} */
  ({
    id: 'api',
    path: 'openapi.yml',
    routeBasePath: '/api',
    sidebarCollapsible: false,
  }),
],

It looks like there is no way to disable hideable sidebar only for single plugin.

alexakreizinger commented 1 year ago

I'm having the same issue, via preset install: it seems like the collapseSidebarButton is transparent, which makes it so you can see the titles of sidebar items "inside" the button. Notably, this doesn't occur to the sidebar located at <website.com/docs>, only the sidebar located at <website.com/api> (generated by the plugin).

Similarly, the sidebar at <website.com/api> doesn't generate a scrollbar if the number of expanded categories exceeds the length of the page—the sidebar just keeps expanding and makes the page longer in the process. Again, this doesn't happen on <website.com/docs>.

Normal /docs sidebar (pardon the lorem ipsum, I'm building a docs site that's not yet public!): sidebar1

Incongruent /api sidebar, with (1) transparent button and (2) no scrollbar, even when one should be present: sidebar2