From e66229a09b71bda1aaa3f22a60a377d82c5ff39b Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Fri, 15 May 2026 14:23:28 +0530 Subject: [PATCH 1/2] fix: wiki pdf download follow-ups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Keep the actions dropdown open while the PDF is being prepared so the loading spinner stays visible; close it after the download settles. - Read the route from window.location.pathname on every click instead of caching doc.route at Alpine init — SPA navigation updates the URL via history.pushState, so this stays in sync with the visible page. - Print format: show the full breadcrumb (space › group › subgroup) in the header eyebrow, not just the space name. - Style blockquotes in the PDF to match the public-facing prose: italic, thicker left rule, and open/close quote marks on the first/last paragraph. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../standard_wiki_document.html | 40 ++++++++++++++++--- wiki/templates/wiki/document.html | 8 ++-- wiki/templates/wiki/macros/buttons.html | 5 ++- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/wiki/frappe_wiki/print_format/standard_wiki_document/standard_wiki_document.html b/wiki/frappe_wiki/print_format/standard_wiki_document/standard_wiki_document.html index db413bef..bf457789 100644 --- a/wiki/frappe_wiki/print_format/standard_wiki_document/standard_wiki_document.html +++ b/wiki/frappe_wiki/print_format/standard_wiki_document/standard_wiki_document.html @@ -19,6 +19,11 @@ color: var(--gray-600); } + .wiki-document-eyebrow .sep { + margin: 0 0.4em; + color: var(--gray-400); + } + .wiki-document-title { margin: 0 0 1rem; } @@ -65,18 +70,41 @@ } .wiki-document-content blockquote { - margin: 1rem 0; - padding-left: 1rem; - border-left: 3px solid var(--gray-300); + margin: 1.6em 0; + padding-left: 1em; + border-left: 4px solid var(--gray-300); + font-style: italic; + font-weight: 500; + color: var(--gray-800); + } + + .wiki-document-content blockquote p { + margin: 0.5em 0; + } + + .wiki-document-content blockquote p:first-of-type::before { + content: open-quote; + } + + .wiki-document-content blockquote p:last-of-type::after { + content: close-quote; } -{% set wiki_space = doc.get_wiki_space() %} +{% set breadcrumbs = doc.get_breadcrumbs() %} +{% set space = breadcrumbs.space %} +{# Skip the first ancestor — it's the wiki space's root group, already represented by the space name. #} +{% set ancestors = breadcrumbs.ancestors[1:] if breadcrumbs.ancestors else [] %}
- {% if wiki_space %} -
{{ wiki_space.space_name }}
+ {% if space or ancestors %} +
+ {% if space %}{{ space.space_name }}{% endif %} + {% for ancestor in ancestors %} + {{ ancestor.title }} + {% endfor %} +
{% endif %}

{{ doc.title }}

diff --git a/wiki/templates/wiki/document.html b/wiki/templates/wiki/document.html index 74b3e188..6b2c6e09 100644 --- a/wiki/templates/wiki/document.html +++ b/wiki/templates/wiki/document.html @@ -140,7 +140,6 @@

{% endmacro %} -{# Dropdown row that triggers downloadPage() and reflects the downloadInProgress state. #} +{# Dropdown row that triggers downloadPage() and reflects the downloadInProgress state. + Keeps the dropdown open while preparing the PDF so the loading state stays visible. #} {% macro download_action_item() %} -