Implement Google Docs badge insertion system with markdown filtering for wikiGDrive indicators#588
Implement Google Docs badge insertion system with markdown filtering for wikiGDrive indicators#588
Conversation
|
@horner 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: horner <6094599+horner@users.noreply.github.com>
Co-authored-by: horner <6094599+horner@users.noreply.github.com>
|
@copilot it looks like you entirely missed the point of the ticket. The badges should be inserted into the Google Document for the benefit of the editor acting in Google Doc. |
|
The badges should absolutely not show up in the markdown. Only in the google doc. I feel like you need to start over. @copilot |
Co-authored-by: horner <6094599+horner@users.noreply.github.com>
You're absolutely right - I completely misunderstood the requirement. I've now implemented the proper solution that inserts badges directly into Google Documents using the Google Docs API. Key changes in commit d066123: New Implementation:
User Experience:
Removed: Previous incorrect implementation that only added badges to markdown output The badges are now inserted directly into Google Documents where editors can see and interact with them, exactly as specified in issue #587. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: horner <6094599+horner@users.noreply.github.com>
You're absolutely right! I've now fixed the implementation to ensure badges only appear in Google Docs and are completely filtered out of the markdown output. The Issue: Badges were being inserted into Google Documents, but then appearing in the markdown because the ODT conversion naturally included them. The Solution (commit 6d2f7e9):
The workflow now works exactly as requested:
This gives editors the visual indicators they need in Google Docs while keeping the markdown output focused purely on content. |
This PR introduces a comprehensive badge system that inserts unobtrusive indicators directly into Google Documents processed by wikiGDrive. The badges behave like GitHub README shields: lightweight visual tokens containing links or status indicators that authors can reposition anywhere in their documents. Badges are automatically filtered out during markdown conversion to ensure they only appear in Google Docs and never in the final wiki output.
Key Features
Google Docs Integration: Badges are inserted directly into Google Documents using the Google Docs API, allowing editors to see and interact with them while working in Google Docs.
Four Initial Badge Types:
Author-Friendly: The entire badge container can be cut/pasted to any location in the document without breaking functionality. Badges are deterministic - they update existing badges rather than creating duplicates during reprocessing.
Clean Markdown Output: Badges are automatically filtered out during ODT to markdown conversion, ensuring the final wiki output contains only content without any badge artifacts.
Technical Implementation
The badge system integrates at the document fetch stage in
TaskFetchDocument.ts, using the Google Docs API to insert badges directly into Google Documents before they are downloaded as ODT files. A postprocessing filter automatically removes badge markers during markdown conversion to prevent badges from appearing in the final output.Core Components:
TaskFetchDocumentbefore ODT download, badge removal inpostProcess.tsConfiguration Options:
Badge Format in Google Docs:
The markers (
📍 WikiGDrive Badges:and📍 End Badges) help the system identify and update existing badges without creating duplicates, while allowing users to reposition the entire badge block anywhere in their document. These markers are automatically detected and removed during markdown conversion.The implementation includes comprehensive documentation (
docs/google-docs-badge-system.md) explaining the user workflow and technical architecture.Fixes #587.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.