Add new page feature#52
Conversation
Added a add page button feature
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis PR adds the ability to append pages from template PDFs to existing PDF documents in an Obsidian plugin. It introduces the pdf-lib dependency, configures Rollup to handle JSON, creates two UI modals for user interaction (template and PDF selection), implements PDF manipulation utilities, and integrates the new feature into the plugin's toolbar and commands. ChangesPDF Page Append Feature
Sequence DiagramsequenceDiagram
participant User
participant AddPageButton as "Add Page Button"
participant TemplateModal as "TemplateSelectModal"
participant AppendLogic as "appendPageToPdf<br/>(pdf-lib)"
participant Vault as "Vault Storage"
User->>AddPageButton: Click "Add Page"
AddPageButton->>TemplateModal: Open modal
User->>TemplateModal: Select template
TemplateModal-->>AddPageButton: Return template path
AddPageButton->>AppendLogic: Validate & call appendPageToPdf
AppendLogic->>Vault: Read template PDF
AppendLogic->>Vault: Read existing PDF
AppendLogic->>AppendLogic: Load PDFs with pdf-lib
AppendLogic->>AppendLogic: Copy template's first page
AppendLogic->>AppendLogic: Append to existing PDF
AppendLogic->>Vault: Write modified PDF back
AppendLogic-->>AddPageButton: Complete / Error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
I have added a '+' option to add new page to existing hand-written notes pdf.
Summary by CodeRabbit
New Features
Chores