Compare commits

..
3 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
7 changed files with 37 additions and 16 deletions

No files matched your search

+21 -2
View File
@@ -4,9 +4,26 @@ Changelog
.. seealso:: :ref:`howto_upgrade`
.. |theme_version| replace:: 3.0.0rc3
.. |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
========
@@ -16,6 +33,7 @@ Fixes
* Show hidden version in selector if it's the current active version
.. _release-3.0.0rc2:
3.0.0rc2
========
@@ -26,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.0rc3",
"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.0rc3",
"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.0rc3
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.0rc3',
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.0rc3'
__version__ = '3.0.0'
__version_full__ = __version__
logger = getLogger(__name__)
+11 -9
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) {
@@ -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);
});
});