Skip to content

docs: add since badge #2189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

docs: add since badge #2189

wants to merge 3 commits into from

Conversation

vmaerten
Copy link
Member

@vmaerten vmaerten commented Apr 21, 2025

It's a proposal to indicate the version from which a feature is available.

I've added to some feature ! I also apply it to versionned_docs to have it right now :)

NOTE: I used custom alias to ensure this will work when doing a release (all paths will remain the same)

@vmaerten vmaerten marked this pull request as ready for review April 21, 2025 15:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new AvailableSince badge component for documentation to indicate the version from which a feature is available. The component includes multiple style proposals for different badge variations.

  • Introduces the AvailableSince component with version property.
  • Provides five design proposals via distinct style objects.
  • Implements conditional styling based on color mode.
Files not reviewed (2)
  • website/docs/usage.mdx: Language not supported
  • website/package.json: Language not supported
Comments suppressed due to low confidence (1)

website/src/components/AvailableSince.tsx:69

  • [nitpick] Consider renaming 'styleBadgeTaskColor2' to a more descriptive name that better reflects its variant or intended use. This will improve clarity when reviewing the different badge styles.
const styleBadgeTaskColor2 = {

@andreynering
Copy link
Member

I loved the idea! I vote for option 5.

@pd93
Copy link
Member

pd93 commented Apr 22, 2025

Agreed. 5 Looks good to me.

@vmaerten vmaerten force-pushed the docs/add-since-badge branch from f4b69ed to 31fc45d Compare April 22, 2025 11:59
@vmaerten
Copy link
Member Author

I asked to my UI / UX design. she said it's good (regarding colors and margin)

@pd93
Copy link
Member

pd93 commented Apr 27, 2025

Happy with this. However, I do have one question regarding its usage: How far back are we supporting these badges? Is the intention to go through all the docs and add version stamps? (this seems like a lot of work and might lead to very crowded docs in some places where many changes have been made). If not, how far back do we plan to label things and should things become unlabelled after a given period of time or number of versions (this could probably be automated).

For example, we have labelled that map variables are available since v3.43.1, but actually all variable types (except strings) have only been available since v3.37.0.

Another way to do this is to snapshot our docs on each release and have a drop down. Food for thought.

@vmaerten
Copy link
Member Author

I like the idea of versionning our docs. We can use docusaurus to do that!
@andreynering what is your thought about this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants