cloud-annotations / docusaurus-openapi

πŸ¦• OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
498 stars 82 forks source link

feat(openapi): redesigned params table #212

Closed sean-perkins closed 1 year ago

sean-perkins commented 2 years ago

This PR builds on https://github.com/cloud-annotations/docusaurus-openapi/pull/211, we should likely review that first and then subsequent PRs.

What's new

Screen Shot 2022-10-05 at 10 58 12 PM
netlify[bot] commented 2 years ago

Deploy Preview for docusaurus-openapi ready!

Name Link
Latest commit 7b2b516a8017ce30af84622914a2eda1df605a4c
Latest deploy log https://app.netlify.com/sites/docusaurus-openapi/deploys/63142f4a573c1f0008fe3d7e
Deploy Preview https://deploy-preview-212--docusaurus-openapi.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

bourdakos1 commented 2 years ago

This looks really nice, but I would rather keep the default theme to look as close to the default Docusaurus theme as possible (even if it doesn’t look as good), but provide an easy way for people to customize the look and feel to match this if they wanted. We could also provide a second theme that looks like this, but will also change the look and feel of the rest of Docusaurus to match?

sean-perkins commented 2 years ago

I think the only constraint with an additional theme, is that a lot of the logic responsibility is coupled with the theme and the components within it. An additional theme would increase the complexity and maintenance scope of this library.

If the desired goal is to align the appearance with Docusaurus, I would suggest the styling is updated to match the stock experience more closely, but offer CSS variables, static CSS selectors, or another mechanism for developers to customize the look further.

Before starting this work, I would want to verify you are still ok with the changes of moving the rendering into JSX like I have demonstrated in these various PRs; while maintaining support for rich markdown support for the various description fields.

If not, I think the work effort may be more appropriate as a fork based on the level of customizations required.

bourdakos1 commented 2 years ago

Yep, I love what you're doing with the JSX rendering. I'm also good with the structural UI changes (like moving things around, adding features, etc...). I'd just prefer to keep the overall look and feel as close to the default Docusaurus theme as we can. Things like color, rounded corner size, borders, shadows etc...

sean-perkins commented 2 years ago

This and the parent work for the header section has been updated to remove a lot of custom opinionated styling.

For areas where developers or myself need to theme the experience further, we can probably follow the styling convention that Docusaurus already exhibits:


#__docusaurus {
  [class*="docPage_"] {
    [class*="paramItem_"] {
      /* custom styles */
    }
  }
}