Compare commits

...
5 Commits
Author SHA1 Message Date
Manuel Kaufmann a1c2147b17 Release 3.0.0 2024-10-07 09:12:19 +02:00
Manuel Kaufmann 814686ee1f Release 3.0.0rc4 2024-10-02 13:54:28 +02:00
Manuel Kaufmann 5b181b89fb Trigger search modal on "Search docs" input focus (#1610)
This is a regression introduced in
https://github.com/readthedocs/sphinx_rtd_theme/pull/1601

This PR triggers the search modal when clicking on the "Search docs" input from
- inside the flyout if present
- the top left navbar
2024-10-02 13:51:57 +02:00
Manuel Kaufmann 7deb68fe16 Release 3.0.0rc3 2024-09-26 13:52:32 +02:00
Manuel Kaufmann 036a3b2231 Show hidden version in selector if it's the current active version (#1609)
Closes #1608
2024-09-25 16:38:47 +02:00
7 changed files with 47 additions and 17 deletions

No files matched your search

+30 -2
View File
@@ -4,9 +4,36 @@ Changelog
.. seealso:: :ref:`howto_upgrade`
.. |theme_version| replace:: 3.0.0rc2
.. |theme_version| replace:: 3.0.0
.. _release-3.0.0rc1:
.. _release-3.0.0:
3.0.0
=====
Final version.
.. _release-3.0.0rc4:
3.0.0rc4
========
Fixes
-----
* Trigger "Read the Docs Search addon" when focusing the "Search docs" input in the navbar.
.. _release-3.0.0rc3:
3.0.0rc3
========
Fixes
-----
* Show hidden version in selector if it's the current active version
.. _release-3.0.0rc2:
3.0.0rc2
========
@@ -17,6 +44,7 @@ Added
* Render version and language selectors below the documentation's title (top left).
This can be controlled via the new theme options ``version_selector`` and ``language_selector``.
.. _release-3.0.0rc1:
3.0.0rc1
========
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sphinx_rtd_theme",
"version": "3.0.0rc2",
"version": "3.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "sphinx_rtd_theme",
"main": "js/theme.js",
"version": "3.0.0rc2",
"version": "3.0.0",
"scripts": {
"dev": "webpack-dev-server --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js",
+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.0rc2
current_version = 3.0.0
commit = false
tag = false
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<dev>\d+))?
+1 -1
View File
@@ -86,7 +86,7 @@ class TransifexCommand(distutils.cmd.Command):
setup(
version='3.0.0rc2',
version='3.0.0',
cmdclass={
'update_translations': UpdateTranslationsCommand,
'transifex': TransifexCommand,
+1 -1
View File
@@ -13,7 +13,7 @@ from sphinx.locale import _
from sphinx.util.logging import getLogger
__version__ = '3.0.0rc2'
__version__ = '3.0.0'
__version_full__ = __version__
logger = getLogger(__name__)
+12 -10
View File
@@ -132,15 +132,7 @@ if (themeFlyoutDisplay === "attached") {
const event = new CustomEvent("readthedocs-search-show");
document.dispatchEvent(event);
});
// Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
document
.querySelector("[role='search'] input")
.addEventListener("focusin", () => {
const event = new CustomEvent("readthedocs-search-show");
document.dispatchEvent(event);
});
});
})
}
if (themeLanguageSelector || themeVersionSelector) {
@@ -158,7 +150,7 @@ if (themeLanguageSelector || themeVersionSelector) {
);
if (themeVersionSelector) {
let versions = config.versions.active;
if (config.versions.current.type === "external") {
if (config.versions.current.hidden || config.versions.current.type === "external") {
versions.unshift(config.versions.current);
}
const versionSelect = `
@@ -220,3 +212,13 @@ if (themeLanguageSelector || themeVersionSelector) {
}
});
}
document.addEventListener("readthedocs-addons-data-ready", function (event) {
// Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
document
.querySelector("[role='search'] input")
.addEventListener("focusin", () => {
const event = new CustomEvent("readthedocs-search-show");
document.dispatchEvent(event);
});
});