From 3483f0cdabefe64effa68e744b7439c86974d8fb Mon Sep 17 00:00:00 2001 From: Coderambling <159031875+Coderambling@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:25:45 +0100 Subject: [PATCH 001/209] Update apply_css.md : tutorial states that two sliders are created, but in fact three sliders are created. (#7692) Tutorial states that two sliders are created, but in fact three sliders are created (near the end of the tutorial). --- doc/how_to/styling/apply_css.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/how_to/styling/apply_css.md b/doc/how_to/styling/apply_css.md index 570e76f272..7760c9e9b9 100644 --- a/doc/how_to/styling/apply_css.md +++ b/doc/how_to/styling/apply_css.md @@ -119,7 +119,7 @@ pn.widgets.FloatSlider( ### CSS Classes -When building complex stylesheets you will sometimes want to have multiple styles for one component. While it is possible to include a separate stylesheet for each you can also use CSS classes to distinguish between different components. The `css_classes` parameter will apply the CSS class to the shadow root (or container). Let us create two sliders with different CSS classes: +When building complex stylesheets you will sometimes want to have multiple styles for one component. While it is possible to include a separate stylesheet for each you can also use CSS classes to distinguish between different components. The `css_classes` parameter will apply the CSS class to the shadow root (or container). Let us create three sliders with different CSS classes: ```{pyodide} color_stylesheet = """ From 4e895ebb6614ce8aa75e93b3bd1245ea596e5609 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 11 Feb 2025 11:37:45 +0100 Subject: [PATCH 002/209] Correctly resolve esm path during compilation (#7698) --- panel/command/compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/command/compile.py b/panel/command/compile.py index a5780552e9..bade70b5ca 100644 --- a/panel/command/compile.py +++ b/panel/command/compile.py @@ -136,7 +136,7 @@ def invoke(self, args): mod = sys.modules[component.__module__] mod_path = pathlib.Path(mod.__file__) paths_to_watch.add(mod_path) - paths_to_watch.add(mod_path.parent / component._esm_path(compiled=False)) + paths_to_watch.add(mod_path.parent / component._esm_path(compiled='compiling')) for _changes in watch(*paths_to_watch): errors = run_compile( bundles, args.build_dir, args.unminified, args.skip_npm, args.file_loaders, args.verbose From a880b7323e072d2b3845e1b6843e436d2abb0c21 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 11 Feb 2025 11:38:31 +0100 Subject: [PATCH 003/209] Documentation fixes 1.6.1 (#7664) * Remove toggle.js * Minor fixes --- doc/_static/toggle.js | 97 --------------------------- doc/conf.py | 1 - doc/how_to/authentication/pam.md | 5 +- doc/how_to/editor/vscode_configure.md | 2 + 4 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 doc/_static/toggle.js diff --git a/doc/_static/toggle.js b/doc/_static/toggle.js deleted file mode 100644 index d49442cf13..0000000000 --- a/doc/_static/toggle.js +++ /dev/null @@ -1,97 +0,0 @@ -function clone(node) { - var new_element = node.cloneNode(true); - node.parentNode.replaceChild(new_element, node); - return new_element -} - -function documentReady(callback) { - if (document.readyState != "loading") callback(); - else document.addEventListener("DOMContentLoaded", callback); -} - -let loaded = false - -function setupMobileSidebarKeyboardHandlers() { - if (loaded) { - return - } - loaded = true - - // These are hidden checkboxes at the top of the page whose :checked property - // allows the mobile sidebars to be hidden or revealed via CSS. - const primaryToggle = document.getElementById("pst-primary-sidebar-checkbox"); - const secondaryToggle = document.getElementById( - "pst-secondary-sidebar-checkbox", - ); - const primarySidebar = document.querySelector(".bd-sidebar-primary"); - const secondarySidebar = document.querySelector(".bd-sidebar-secondary"); - - // Toggle buttons - - // - // These are the hamburger-style buttons in the header nav bar. When the user - // clicks, the button transmits the click to the hidden checkboxes used by the - // CSS to control whether the sidebar is open or closed. - const primaryClickTransmitter = document.querySelector(".primary-toggle"); - const secondaryClickTransmitter = document.querySelector(".secondary-toggle"); - [ - [primaryClickTransmitter, primaryToggle, primarySidebar], - [secondaryClickTransmitter, secondaryToggle, secondarySidebar], - ].forEach(([clickTransmitter, toggle, sidebar]) => { - if (!clickTransmitter) { - return; - } - const cloned = clone(clickTransmitter) - cloned.addEventListener("click", (event) => { - event.preventDefault(); - event.stopPropagation(); - toggle.checked = !toggle.checked; - - // If we are opening the sidebar, move focus to the first focusable item - // in the sidebar - if (toggle.checked) { - // Note: this selector is not exhaustive, and we may need to update it - // in the future - const tabStop = sidebar.querySelector("a, button"); - // use setTimeout because you cannot move focus synchronously during a - // click in the handler for the click event - setTimeout(() => tabStop.focus(), 100); - } - }); - }); - - // Escape key - - // - // When sidebar is open, user should be able to press escape key to close the - // sidebar. - [ - [primarySidebar, primaryToggle, primaryClickTransmitter], - [secondarySidebar, secondaryToggle, secondaryClickTransmitter], - ].forEach(([sidebar, toggle, transmitter]) => { - if (!sidebar) { - return; - } - sidebar.addEventListener("keydown", (event) => { - if (event.key === "Escape") { - event.preventDefault(); - event.stopPropagation(); - toggle.checked = false; - transmitter.focus(); - } - }); - }); - - // When the