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

Consult the new version_selector property when using version control with Mike #6356

Closed
4 tasks done
gabrielbdornas opened this issue Nov 17, 2023 · 4 comments
Closed
4 tasks done
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@gabrielbdornas
Copy link

Context

Now, when using version control with Mike and Mkdocs it is possible to hide the version selector that is created when Mike is activated. To accomplish that, we must use the version_selector property set to false accordingly to the mike's configuration.

I asked this question in one of Mike's related issues and its maintainer said that as far as he knows, "Material theme doesn't consult the version_selector property". @squidfunk confirmed that and suggest the opening of this feature request.

Description

I would like to suggest material consult the new Mike's version_selector property, and if it is set to false hide the version selector within the header when version control is enable.

Related links

Use Cases

One business/use case that will benefit from it is when we need to use versions to monitor and share improvements of the document without letting end users explicitly see it.

Visuals

No response

Before submitting

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Nov 17, 2023
@squidfunk
Copy link
Owner

squidfunk commented Nov 17, 2023

Thanks for suggesting. Could I please ask you to provide a minimal reproduction, so we have something to iterate? This makes my life easier, as I don't have to first recreate the case you described. Thank you!

@squidfunk squidfunk added the needs input Issue needs further input by the reporter label Nov 17, 2023
@squidfunk
Copy link
Owner

Okay, I've managed to implement it without the reproduction. Added in c181a46. We now check if mike is configured, and if so, if the version selector is disabled. In that case, we don't add the version selector. In all other cases, we do.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open and removed needs input Issue needs further input by the reporter labels Nov 19, 2023
@squidfunk
Copy link
Owner

Released as part of 9.4.10.

@gabrielbdornas
Copy link
Author

Okay, I've managed to implement it without the reproduction. Added in c181a46. We now check if mike is configured, and if so, if the version selector is disabled. In that case, we don't add the version selector. In all other cases, we do.

That was impressive. Sorry to no provide the minimal reproduction in time. I'll try it now.

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