Compare commits

..
4 Commits
Author SHA1 Message Date
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 36 additions and 16 deletions

No files matched your search

+19 -1
View File
@@ -4,10 +4,28 @@ Changelog
.. seealso:: :ref:`howto_upgrade`
.. |theme_version| replace:: 3.0.0rc2
.. |theme_version| replace:: 3.0.0rc4
.. _release-3.0.0rc1:
3.0.0rc4
========
Fixes
-----
* Trigger "Read the Docs Search addon" when focusing the "Search docs" input in the navbar.
3.0.0rc3
========
Fixes
-----
* Show hidden version in selector if it's the current active version
3.0.0rc2
========
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sphinx_rtd_theme",
"version": "3.0.0rc2",
"version": "3.0.0rc4",
"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.0rc4",
"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.0rc4
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.0rc4',
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.0rc4'
__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);
});
});