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

Allow to modify versions listed in the selector #7732

Closed
doctorcolinsmith opened this issue Dec 7, 2020 · 6 comments · Fixed by #11069
Closed

Allow to modify versions listed in the selector #7732

doctorcolinsmith opened this issue Dec 7, 2020 · 6 comments · Fixed by #11069
Labels
Feature New feature Needed: design decision A core team decision is required

Comments

@doctorcolinsmith
Copy link

I would like to define my own orderings for versions. Currently, if the branch names contain letters, they sort alphabetically.

For example, if I have branches foo-2.8.0, foo-2.9.0, and foo-2.10.0, they appear in the side bar as foo-2.9.0, foo-2.8.0, foo-2.10.0. That is, the most recent release branch appears last.

Ideally, it would be great if we could supply a regex and set the orderings on the regex groups.

For a live example, please see the side bar on https://rocfft.readthedocs.io/en/latest/

@stsewd stsewd added Feature New feature Needed: design decision A core team decision is required labels Dec 7, 2020
@stsewd
Copy link
Member

stsewd commented Dec 10, 2020

I think this is better implemented having the footer api returning a json instead of a html block, that way users can use their own order/style to display the versions. We are discussing this feature internally, but I think @ericholscher was about to create a public issue, we can close this one that one is created.

@stsewd stsewd changed the title Feature Request: Custom Version Ordering Allow to modify versions listed in the selector Dec 10, 2020
@doctorcolinsmith
Copy link
Author

I think that is a reasonable proposal @stsewd. I have not yet tried to do any customization with the footer API, but I can look at that more.

@humitos
Copy link
Member

humitos commented Jul 24, 2023

This is going to be supported by our new Flyout Addon we are working on at https://github.com/readthedocs/addons/ where people would be able to use the exact same data we will use to build our flyout to build their own.

See readthedocs/addons#13

@humitos humitos removed this from ✨ Addons Feb 14, 2024
@humitos
Copy link
Member

humitos commented Feb 14, 2024

I worked on an implementation to be able to define the sorting algorithm in #11069. This allow users to choose different approaches or define their own pattern. @doctorcolinsmith would that approach solve your issue? I'd appreciate your feedback.

@doctorcolinsmith
Copy link
Author

Thanks @humitos. On first review, this looks like a good solution. I will pass this on to our doc team.

@humitos
Copy link
Member

humitos commented Mar 12, 2024

A feature to sort versions in the beta addons flyout was released today. To enable this feature, you will need to activate the new beta addons in your project first, and then edit the sorting from the project's setting using the new beta dashboard from https://beta.readthedocs.org/. Please, let me know any feedback you may have 🙏🏼

Screenshot_2024-03-12_16-36-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants