Skip to content

Introduce extensible badge system for wikiGDrive indicators in Google Docs #587

@horner

Description

@horner

Summary

Implement a badge system that displays unobtrusive indicators (badges) inside Google Docs processed by wikiGDrive. Badges behave like GitHub README shields: lightweight visual tokens containing links or status indicators.

  • Authors can cut/paste badges to reposition them anywhere in the document.
  • The system is extensible to support multiple badge types.
  • Initial badge set includes:
    • Last processed badge: shows timestamp of last wikiGDrive processing
    • Preview link badge: links directly to the rendered wiki page
    • Table of contents badge: links to the collection/TOC entry
    • Duplicate alert badge: indicates if the document is duplicated elsewhere

Problem / Motivation

The current plan to inject a simple indicator is useful but not flexible. A badge system provides:

  • Consistency: badges follow a predictable format across docs
  • Flexibility: authors can rearrange badges to preferred locations
  • Extensibility: new badges (e.g., linting warnings, metadata) can be introduced without redesigning the system
  • Clarity: badges are recognizable, compact, and low-noise

User Story

As a doc author or reviewer
I want wikiGDrive badges inside my Google Doc
So that I can see document status, jump to wiki views, and navigate collections quickly in a consistent, unobtrusive way


Scope (In)

  • Badge design: consistent, shield-like visual tokens (inline text or small colored boxes)
  • Badges should support:
    • Text label
    • Optional icon (emoji or minimal symbol)
    • Hyperlink
    • (Optionally) status value (e.g. ✅ Fresh / ⚠️ Stale)
  • Badges are deterministic so they can be updated, not duplicated
  • Author can cut/paste badges anywhere in the doc without breaking functionality
  • Badges should not trigger re-processing loops
  • meta-data/Front matter would correlate in the markdown

Scope (Out)

  • Full widget UI (stickers, banners, etc.)
  • External badge rendering frameworks (keep native to Google Docs formatting)
  • Dynamic updating inside Google Docs (badges update only when wikiGDrive reprocesses)

Acceptance Criteria

  • Badge style is standardized (inline box, color, text, hyperlink)
  • Authors can reposition badges without breaking wikiGDrive updates
  • Last processed badge displays correct timestamp (UTC or configurable)
  • Preview badge links to canonical wiki page
  • TOC badge links to parent collection entry (if any)
  • Duplicate alert badge appears only if duplicate condition is detected
  • New badges can be added with minimal code changes (extensibility proven)
  • Badges never duplicate themselves during reprocessing

Notes / Implementation Considerations

  • Format:
    • Could be a styled table, inline styled text, or special marker (e.g. [badge:processed:2025-09-06]) replaced by wikiGDrive during processing.
  • Extensibility:
    • Use a declarative schema for badges (type, label, url, status, style).
  • Author Control:
    • Badge block is movable but system should recognize badges anywhere in doc.
  • Visual Noise:
    • Minimal colors/icons (GitHub shield aesthetic).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions