Redocly / redocly-cli

⚒️ Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more.
https://redocly.com/docs/cli/
MIT License
955 stars 148 forks source link

Generate meaningful class names #914

Closed MilanLund closed 1 year ago

MilanLund commented 2 years ago

Is your feature request related to a problem? Please describe. The problem is that supported styling/theming options are insufficient for our needs. To extend the range of elements we can style, we inject a custom CSS file in the Redocly output. Regrettably, elements generated by Redocly do not have meaningful class names and therefore we are not able to come up with reliable CSS selectors to style the majority of elements.

Describe the solution you'd like My request is to add an option in the Redocly configuration file that would ensure meaningful class names are generated in the output.

Additional context Our current solution is based on a fork of Redoc CE. We were able to modify it to make the output generate meaningful class names. Here is how we modified it: https://github.com/Kontent-ai-Learn/kontent-ai-learn-redoc/commit/1a10ced2ee8c7c19ed30a98b5023dbe112106f68 Here is the current solution. Inspect the DOM to check the class names: https://kontent.ai/learn/reference/delivery-api/

Now, we are switching to the Redocly API Registry and we are really missing this.

adamaltman commented 2 years ago

We have this feature in our next major product.

MilanLund commented 2 years ago

Hi @adamaltman, thanks for your response. Could you be more specific? What product? Is it going to be part of the Redocly API registry? When are you planning to release it? Do you have any roadmap you could share?

adamaltman commented 2 years ago

Hi @MilanLund , our products are made of various components. We are planning to release a new developer portal (it's a complete rewrite). One of the features it has is CSS variables as styles. It uses a component which renders the API docs (we call it API docs or reference docs), and that component has been rewritten and that also includes support for CSS variables as styles. The current plan is to release it in Q2'23 (hopefully May 5th). I will publish a web page with a form for early access request within the next month. Some early adopters get early access. The web page will explain the roadmap too.

MilanLund commented 2 years ago

Thank you for your efforts, @adamaltman. My understanding is that this new feature will be:

I hope the above-stated points are understandable. IMO my feature request is still valid as the new feature does not cover the proposed use case and will be available in a different product that we are using.

lornajane commented 1 year ago

As Adam says, this is coming in a future version of the docs tools that will replace the current documentation generated by the CLI. Since there's nothing to do in the CLI project, I'll close this issue and ask you to look out for new releases (I don't want to sound like a marketing person, but the newsletter would keep you updated about releases including the open source releases once we have them - so just sharing that in case it's interesting.)