Skip to content
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

Add support for Semantic Versioning to the Version Warning #4919

Closed
4 tasks done
SaltyAimbOtter opened this issue Jan 26, 2023 · 4 comments
Closed
4 tasks done

Add support for Semantic Versioning to the Version Warning #4919

SaltyAimbOtter opened this issue Jan 26, 2023 · 4 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@SaltyAimbOtter
Copy link
Contributor

SaltyAimbOtter commented Jan 26, 2023

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

The version warning should be able to correctly inform the user about outdated versions if the semantic versioning version format is used.

The current behaviour is like this:
Green = Correctly shows no warning (latest)
Red = Shows no warning although it should
Light Green = Correctly shows a warning
grafik

Mike does claim that it is made for two digit version only. However, it also claims that it is "flexible". In our project, we never had any problems using semantic versioning with mike. I'm sure it's a common use case considering that semantic versioning is quite popular.

In addition to that a dedicated banner for development versions would be useful:
We have one RELEASE (1.2.3) doc version and one DEV doc version (e.g. 2.0.0-DEV). Additionally there are many old docs versions (e.g. 1.2.2, 1.2.1 etc.).
We would like to show one variant of the warning banner in the docs of legacy versions and another in the development docs.
This could be attached to aliases:

Mike Alias Banner
latest No Banner
development Banner Variant 1
none Banner Variant 2

Where Banner Variant 1 would say something like: You are viewing the docs for the development version! Be careful or use the latest release!
And Banner Variant 2 would say something like: You are viewing outdated docs and will recieve no support! Update to the latest release!

The amount of version qualifiers might differ between projects though. So this should be customizable. I'm not sure if and how this could be implemented considering the current implementation works with theme overrides.

Use Cases

Many users probably release one documentation version together with a software release. Since semantic versioning is very popular this should affect a large part of the user base.

Screenshots / Mockups

No response

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Jan 26, 2023
@squidfunk
Copy link
Owner

Thanks for suggesting! This is a reasonable change request, but I'm not sure if it benefits a lot of users or is too specific to be included in core. It can definitely be pulled off with some JavaScript and theme extension (which is necessary for the announcement bar anyway). Let's let this suggestion sit here for a while and see if other users find it interesting as well 😊

@squidfunk squidfunk added needs user feedback Issue needs feedback by other users and removed needs investigation Issue must be investigated by the maintainers labels Jan 28, 2023
@SaltyAimbOtter
Copy link
Contributor Author

The members of my project had a discussion which changed our view about this topic. These are our conclusions:

When semantic versioning is followed correctly, there should never be a reason to change the docs for a patch release.
Therefore, two digit docs make sense even for projects with three digit versions. This also has a few beneficical side-effects:

  • Less visual clutter for the user as the version dropdown has less content.
  • Less versions on the gh-pages branch
    • Reduces cost if Git LFS / GitHub's paid service is in use.
    • Reduces time spend on up- / downloading doc-artifacts during GitHub Action runs (project specific).

As a result we have adjusted our workflow to only have two digit doc-versions.

So now our only additional requirement is that we don't want to show an "invalid" version warning in docs of the development branch . Therefore we have opened #4976 that introduces the ability to define multiple aliases that hide the version warning.

@squidfunk
Copy link
Owner

Fixed in b257235. Also see #4976 (comment).

@squidfunk squidfunk added change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open and removed needs user feedback Issue needs feedback by other users labels Feb 18, 2023
@squidfunk
Copy link
Owner

Released as part of 9.0.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants