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

Version selector appears even with 'version_selector': False #1620

Closed
Hyrla opened this issue Oct 14, 2024 · 3 comments · Fixed by #1626
Closed

Version selector appears even with 'version_selector': False #1620

Hyrla opened this issue Oct 14, 2024 · 3 comments · Fixed by #1626
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@Hyrla
Copy link

Hyrla commented Oct 14, 2024

Problem

The version selector appears on the top left even if there is only one version and version_selector is set to False in html_theme_options.

Reproducible Project

Project documentation: https://esieabot.readthedocs.io/en/latest/
Project documentation conf.py file: https://gitlab.esiea.fr/esieabot/esieabot-docs/rtd/-/blob/main/docs/source/conf.py

Error Logs/Results

image

Expected Results

It think it was expected that the version selector shouldn't be there at all?

Environment Info

  • Python Version: 3.12
  • Sphinx Version: 8.3.1
  • RTD Theme Version: latest (3.0.1)
@Hyrla Hyrla added Bug A bug Needed: replication Bug replication is required labels Oct 14, 2024
@humitos
Copy link
Member

humitos commented Oct 14, 2024

Hrm, this is due this code:

const themeVersionSelector = "{{ theme_version_selector }}";
const themeLanguageSelector = "{{ theme_language_selector }}";

which renders as:

const themeVersionSelector = "False";
const themeLanguageSelector = "True";

We should update it to use a filter to make True -> true and remove the quotes.

@humitos humitos added Accepted Accepted issue on our roadmap and removed Needed: replication Bug replication is required labels Oct 14, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Oct 14, 2024
@humitos humitos self-assigned this Oct 14, 2024
humitos added a commit that referenced this issue Oct 31, 2024
There was a bug with how we render a Python bool value into JavaScript.
This PR fixes that issue.

Closes #1620
@humitos humitos moved this from Planned to In progress in 📍Roadmap Oct 31, 2024
@humitos humitos moved this from In progress to Needs review in 📍Roadmap Oct 31, 2024
@humitos humitos closed this as completed in 5db7796 Nov 4, 2024
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Nov 4, 2024
@humitos
Copy link
Member

humitos commented Nov 13, 2024

I just released v3.0.2 that includes this fix. Please let us know if it works as expected.

@Hyrla
Copy link
Author

Hyrla commented Nov 13, 2024

I just released v3.0.2 that includes this fix. Please let us know if it works as expected.

Yes issue has been fixed, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants