Skip to content

fix: wiki pdf download misc fixes#625

Merged
NagariaHussain merged 2 commits into
frappe:developfrom
NagariaHussain:fix/wiki-pdf-followups
May 15, 2026
Merged

fix: wiki pdf download misc fixes#625
NagariaHussain merged 2 commits into
frappe:developfrom
NagariaHussain:fix/wiki-pdf-followups

Conversation

@NagariaHussain
Copy link
Copy Markdown
Collaborator

@NagariaHussain NagariaHussain commented May 15, 2026

Summary

Follow-ups to #624:

  • Dropdown stays open while downloading. The action item now closes the dropdown only after the download settles, so the loading spinner is actually visible.
  • Route is read on each click. SPA navigation updates the URL via history.pushState but the cached pageRoute on the Alpine component was stale, so clicking download on page B would download page A. Now reads window.location.pathname at click time.
  • Breadcrumb in the PDF header. Eyebrow now shows the full path Space › Group › Subgroup instead of just the space name.
  • Blockquote styling matches the public wiki. Italic, thicker left rule, open/close quote marks on the first/last paragraph.

Test plan

  • Open a page in a space, click the actions dropdown → Download. Spinner stays visible until the file lands; dropdown closes after.
  • Open page A, SPA-navigate to page B (sidebar click), click Download. Downloaded PDF is for page B, not A.
  • PDF header shows breadcrumb trail when the page is nested under a group.
  • PDF blockquotes look italic with a vertical bar and curly quotes around the text.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style

    • Enhanced wiki PDF print format with improved breadcrumb separator styling, colors, margins, and refined blockquote appearance with better borders, padding, and typography.
  • Bug Fixes

    • Fixed PDF download functionality to correctly derive the download file location from the current page pathname.
    • Download dropdown menu now remains open while file downloads complete for improved user feedback.

Review Change Stack

NagariaHussain and others added 2 commits May 15, 2026 14:23
- 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) <noreply@anthropic.com>
Frappe's print CSS pulls in Bootstrap, which sets `blockquote { padding:
10px 20px; font-size: 17.5px }` and `@media print { blockquote { border:
1px solid #999 } }`. Our `border-left` shorthand only overrode the left
side, so the top/right/bottom borders and extra padding leaked through —
the PDF showed a fully-boxed quote with vertical air around the text
instead of the public site's simple left-rule treatment.

Explicitly zero the border and padding before re-applying the left rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Walkthrough

This PR improves the wiki PDF download feature by making the download route dynamic and enhancing the user experience. The download URL is now derived from the current page path at click time instead of stored component state. The download action dropdown remains open while the PDF generation completes, providing better visual feedback. The print format template and styling have been updated with improved breadcrumb rendering that displays space hierarchy through ancestor traversal and refined blockquote styling for PDF output.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: wiki pdf download misc fixes' is vague and generic, using the non-specific term 'misc fixes' that does not convey meaningful information about the specific changes. Replace 'misc fixes' with specific summary of key changes, such as 'fix: wiki pdf download with breadcrumb and blockquote styling updates' or similar descriptive phrasing.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NagariaHussain NagariaHussain changed the title fix: wiki pdf download follow-ups fix: wiki pdf download misc fixes May 15, 2026
@NagariaHussain NagariaHussain merged commit d4bc0e9 into frappe:develop May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant