Skip to content

Latest commit

 

History

History
156 lines (139 loc) · 5.75 KB

File metadata and controls

156 lines (139 loc) · 5.75 KB

To-Do List for LeedPDF Enhancements

0. Page Thumbnails/Navigator ✅ COMPLETED

  • Description: Add a sidebar with mini-page previews for quick navigation.
  • Difficulty: Medium
  • Priority: High
  • Implementation:
    • ✅ Sidebar panel with 120x160px thumbnails
    • ✅ PDF.js thumbnail generation with proper scaling
    • ✅ Click-to-navigate functionality
    • ✅ Visual active page indication
    • ✅ Toggle button in toolbar (Layout icon)
    • ✅ T key keyboard shortcut
    • ✅ Loading indicators and async generation
    • ✅ Responsive layout with flex integration

1. Export Annotated PDF ✅ COMPLETED

  • Description: Enable users to save their annotated documents as a new PDF.
  • Difficulty: Medium
  • Priority: High
  • Implementation:
    • ✅ PDF-lib integration for PDF manipulation
    • ✅ Canvas merging system (PDF + drawings + shapes)
    • ✅ High-resolution export with device pixel ratio support
    • ✅ Automatic filename generation (_annotated.pdf suffix)
    • ✅ One-click export from toolbar
    • ✅ Full preservation of original PDF quality

2. Keyboard Shortcuts Overlay (Help) ✅ COMPLETED

  • Description: Provide an overlay with keyboard shortcuts.
  • Difficulty: Low
  • Priority: High
  • Implementation:
    • ✅ Beautiful modal component with organized categories
    • ✅ Comprehensive shortcuts documentation
    • ✅ Multiple triggers: ?, F1, and help button
    • ✅ Responsive design with backdrop blur
    • ✅ ESC to close, click outside to close

3. Recent Files List

  • Description: Show recently opened files on start screen.
  • Difficulty: Low
  • Priority: High
  • Steps:
    1. Store recent files in localStorage.
    2. Update welcome screen to show list.

X. Drawing Tools & Shape Support ✅ COMPLETED

  • Description: Complete drawing system with multiple tools.
  • Implementation:
    • ✅ Hybrid drawing system (Canvas + overlays)
    • ✅ Pencil tool with custom SVG cursor
    • ✅ Eraser tool with custom SVG cursor and shape erasure
    • ✅ Text tool with inline editing and auto-cleanup
    • ✅ Rectangle tool with real-time preview
    • ✅ Circle tool with real-time preview
    • ✅ Arrow tool with proper intersection detection
    • ✅ Full undo/redo system for all tools
    • ✅ Keyboard shortcuts (1-6 keys) for tool switching

X. Custom Cursors ✅ COMPLETED

  • Description: Tool-specific cursors for better UX.
  • Implementation:
    • ✅ Custom SVG pencil cursor with proper hotspot
    • ✅ Custom SVG eraser cursor with visual feedback
    • ✅ Fallback cursor support for compatibility
    • ✅ Cursor files stored in /static/cursors/
    • ✅ Dynamic cursor switching based on active tool

X. Progressive Web App (PWA) ✅ COMPLETED

  • Description: Make LeedPDF installable as a native app.
  • Implementation:
    • ✅ @vite-pwa/sveltekit integration
    • ✅ Web app manifest with LeedPDF branding
    • ✅ Service worker with Workbox caching
    • ✅ Offline functionality after first visit
    • ✅ Auto-updating service worker
    • ✅ Installable on mobile and desktop
    • ✅ Standalone display mode
    • ✅ File handling for PDF files

X. Keyboard Shortcuts System ✅ COMPLETED

  • Description: Comprehensive keyboard navigation.
  • Implementation:
    • ✅ Tool shortcuts (1-6 for tools)
    • ✅ Navigation shortcuts (arrows, W/H for fit)
    • ✅ Zoom shortcuts (Ctrl+/-, Ctrl+0, Ctrl+scroll)
    • ✅ Action shortcuts (Ctrl+Z/Y for undo/redo)
    • ✅ Upload shortcut (U key)
    • ✅ Help shortcut (? and F1)
    • ✅ Fullscreen shortcut (F11)
    • ✅ Thumbnails toggle (T key)

X. Auto-fit to Height ✅ COMPLETED

  • Description: Automatically fit PDF to viewport height on load.
  • Implementation:
    • ✅ Automatic fit-to-height when PDF first loads
    • ✅ Better initial viewing experience
    • ✅ Responsive scaling for all screen sizes

4. Auto-save Drawings to Browser ✅ COMPLETED

  • Description: Keep drawings in localStorage to prevent data loss.
  • Difficulty: Low
  • Priority: High
  • Implementation:
    • ✅ PDF-specific storage using fileName + fileSize as unique key
    • ✅ Auto-save drawings to localStorage on every change
    • ✅ Auto-restore drawings when reopening same PDF
    • ✅ Visual "Saved ✓" indicator in toolbar
    • ✅ Clear drawings function for new PDFs

5. Fit to Width/Height Buttons ✅ COMPLETED

  • Description: Allow users to fit PDF to viewport width/height.
  • Difficulty: Very Low
  • Priority: High
  • Implementation:
    • ✅ Added "Fit W" and "Fit H" buttons to toolbar
    • ✅ Implemented fitToWidth() and fitToHeight() methods
    • ✅ Auto-calculates optimal scale for viewport
    • ✅ Centers view and resets pan position

6. Dark Mode Toggle

  • Description: Provide a toggle to switch the app to dark mode.
  • Difficulty: Low
  • Priority: Medium

7. Touch/Mobile Optimization

  • Description: Improve usability on mobile/tablets.
  • Difficulty: Low-Medium
  • Priority: Medium

8. Drawing Smoothing/Pressure

  • Description: Implement smoother lines and pressure sensitivity.
  • Difficulty: Low
  • Priority: Medium

9. Fullscreen Mode ✅ COMPLETED

  • Description: Allow users to hide UI and enter fullscreen.
  • Difficulty: Low
  • Priority: Medium
  • Implementation:
    • ✅ F11 key toggles fullscreen mode
    • ✅ ESC key exits fullscreen
    • ✅ Cross-browser fullscreen API support
    • ✅ Automatic state tracking
    • ✅ Distraction-free PDF viewing experience

10. Text Highlighting Tool

  • Description: Add a tool to highlight text in documents.
  • Difficulty: Medium-High
  • Priority: Low

11. Search in PDF

  • Description: Allow users to search text within PDFs.
  • Difficulty: Medium-High
  • Priority: Low