|
| 1 | +# Future Work & Roadmap for Bleedy.py |
| 2 | + |
| 3 | +This document outlines planned enhancements, refactoring tasks, and feature ideas for the Bleedy.py application. It consolidates items from previous analysis, `TODO.md`, and user requests. |
| 4 | + |
| 5 | +## Phase 1 Completion Notes |
| 6 | + |
| 7 | +Phase 1 focused on initial stabilization: |
| 8 | + |
| 9 | +- PyScript modernized to `2025.5.1`, Pyodide pinned to `0.26.1`. |
| 10 | +- PyScript loading splashscreen added. |
| 11 | +- Placeholder for PyScript version check hook created. |
| 12 | +- JS-PyScript communication refactored (event-based, no DOM polling for results). |
| 13 | +- Basic code cleanup (default bleed, removed dead components/deps). |
| 14 | +- Initial plan for sketchy UI library overhaul documented in `TODO.md`. |
| 15 | +- CI pipeline now runs lint, format check, type check, and build. |
| 16 | +- Local ESLint config updated to flat config, Prettier config corrected. |
| 17 | + |
| 18 | +## I. Core Infrastructure & Stability |
| 19 | + |
| 20 | +### 1. Sketchy UI Libraries Overhaul (High Priority) |
| 21 | + |
| 22 | +- **Objective:** Stabilize or replace the aging sketchy UI libraries to ensure long-term maintainability and remove current patching needs. |
| 23 | +- **Tasks (details in `TODO.md`):** |
| 24 | + - **Fork `wired-elements`:** Create an internal, maintained fork (`bleedy-wired-elements`). |
| 25 | + - Apply existing patch: `patches/wired-elements@3.0.0-rc.6.patch`. |
| 26 | + - Audit and refactor components to use `Rough.js 4.6.6+` API correctly. |
| 27 | + - Goal: Eliminate the need for `patches/roughjs@4.6.6.patch`. |
| 28 | + - Review and update Lit/LitElement dependencies if outdated. |
| 29 | + - **Address `DoodleCSS` and `paper-css`:** |
| 30 | + - Manually verify current maintenance status. |
| 31 | + - If unmaintained/problematic: Absorb styles into project, find alternatives, or replicate effects. |
| 32 | + - **Ultimate Goal:** Remove all files from `patches/` and the `npm.patchedDependencies` section in `package.json`. |
| 33 | + |
| 34 | +### 2. PyScript Enhancements |
| 35 | + |
| 36 | +- **Full Pre-commit Hook:** Implement and test `scripts/check-pyscript-version.sh` with Husky for robust PyScript version management. |
| 37 | +- **Zipping in Python:** Research and potentially implement image zipping using Python within PyScript (`zipfile` module) if it offers significant advantages over client-side JS `jszip` (e.g., performance, bundle size reduction). |
| 38 | + |
| 39 | +### 3. Comprehensive Testing Strategy (Very High Priority) |
| 40 | + |
| 41 | +- **Objective:** Achieve robust test coverage to ensure code quality and prevent regressions. |
| 42 | +- **Tasks:** |
| 43 | + - **Unit Testing (Vitest):** |
| 44 | + - Write comprehensive unit tests for all Vue components (props, events, slots, logic). |
| 45 | + - Test all composables (`useImageDownload`, any new ones). |
| 46 | + - Test utility functions and configurations. |
| 47 | + - Configure and enforce code coverage reporting in CI. |
| 48 | + - **Integration Testing (Vitest):** Test interactions between key components (e.g., `ImageProcessor` and its steps, JS-PyScript interop mocks). |
| 49 | + - **E2E Testing (Playwright or Cypress - select one):** |
| 50 | + - Set up the chosen framework. |
| 51 | + - Create E2E tests for all critical user flows. |
| 52 | + - **Python Code Testing:** |
| 53 | + - Research and implement best practices for testing PyScript's Python code (e.g., `add_bleed` function). This might involve extracting logic or using Pyodide's testing utilities if available. |
| 54 | + - **Visual Regression Testing:** Implement tools (e.g., Percy, Applitools, or Playwright-based) to catch unintended UI changes, especially important for the sketchy aesthetic. |
| 55 | + - **CI Integration:** Ensure all test suites run in CI (`ci.yml`) and fail the build on test failures. |
| 56 | + |
| 57 | +## II. Documentation & Developer Experience |
| 58 | + |
| 59 | +### 1. Enhanced Project Documentation |
| 60 | + |
| 61 | +- **Themed README.md:** |
| 62 | + - Rebuild `README.md` using `othneildrew/Best-README-Template` as a structural base. |
| 63 | + - Apply hand-drawn/sketchy styling using embedded HTML/CSS (if feasible and renders well on GitHub). |
| 64 | + - Content: Detailed project description, features, full tech stack overview, File System Access API usage (privacy benefits), PyScript interaction model, clear setup/build/run/test instructions, license. |
| 65 | +- **`ARCHITECTURE.md`:** Create a detailed document (or merge into README) covering: |
| 66 | + - Vue component hierarchy and data flow. |
| 67 | + - PyScript integration details (event system, `bleedy_interop.js`). |
| 68 | + - Strategy and current status of sketchy UI libraries. |
| 69 | +- **`LICENSE`:** Ensure MIT license file is present and correctly referenced. |
| 70 | +- **`CONTRIBUTING.md`:** Generate and customize guidelines for contributions. |
| 71 | +- **Inline Comments:** Continue to enhance comments for complex logic, public APIs of components/modules. |
| 72 | + |
| 73 | +## III. UI/UX Refinements & Features |
| 74 | + |
| 75 | +### 1. UI Consistency & Bug Fixing |
| 76 | + |
| 77 | +- Address any identified UI bugs, quirks, or inconsistencies (e.g., stepper button states, visual harmony between Element Plus and sketchy elements after sketchy library overhaul). |
| 78 | +- Ensure all interactive elements are highly responsive and provide clear feedback. |
| 79 | + |
| 80 | +### 2. Accessibility (A11y) |
| 81 | + |
| 82 | +- Conduct a full A11y audit against WCAG guidelines. |
| 83 | +- Remediate all identified issues: keyboard navigation, focus states, ARIA attributes, color contrast, screen reader compatibility for all components, including custom/sketchy ones. |
| 84 | + |
| 85 | +### 3. PWA (Progressive Web App) |
| 86 | + |
| 87 | +- Investigate feasibility and implement basic PWA features: |
| 88 | + - Web App Manifest. |
| 89 | + - Service Worker for caching assets and basic offline capabilities (app shell). |
| 90 | + - Refer to PyScript documentation on offline usage. |
| 91 | + |
| 92 | +### 4. User-Facing Error Handling |
| 93 | + |
| 94 | +- Implement a system for clear, user-friendly, and thematically styled error messages for: |
| 95 | + - PyScript initialization failures. |
| 96 | + - Python processing errors. |
| 97 | + - File validation issues. |
| 98 | + - Network issues (if any parts become network-dependent). |
| 99 | + |
| 100 | +### 5. File Handling Enhancements |
| 101 | + |
| 102 | +- **Image Previews:** Verify and enhance image previews in the `ImageSelection.vue` step. |
| 103 | +- **Advanced File Validation:** |
| 104 | + - Client-side: Prevent selection of non-image files more robustly. |
| 105 | + - Client-side: Detect and warn about animated GIFs (which might process unexpectedly). |
| 106 | + - Client-side: Warn about excessively large file sizes or too many files, suggesting potential performance issues. |
| 107 | +- **Session Persistence:** |
| 108 | + - Use File System Access API and IndexedDB to store `FileSystemFileHandle` objects of selected files. |
| 109 | + - Allow users to resume previous sessions or quickly re-select files. |
| 110 | + |
| 111 | +### 6. Processing Enhancements |
| 112 | + |
| 113 | +- **Cancel Processing:** Implement a robust cancellation mechanism for ongoing image processing. |
| 114 | + - Define behavior: Cancel current image and continue? Cancel all remaining? |
| 115 | + - Ensure progress is correctly updated and potentially allow retry for skipped/failed images. |
| 116 | + |
| 117 | +## IV. Future Feature Exploration (Longer Term) |
| 118 | + |
| 119 | +These items require more research and design before implementation. |
| 120 | + |
| 121 | +- **Advanced Bleed Options:** |
| 122 | + - Different bleed generation techniques (e.g., pixel stretch, content-aware fill via AI APIs, solid color). |
| 123 | + - Per-edge bleed amounts. |
| 124 | + - Intuitive unit conversions for bleed (mm, inches, pixels) based on target DPI. |
| 125 | +- **Image Transformations:** Pre-bleed options like resize, crop. |
| 126 | +- **Image Management:** |
| 127 | + - Deduplication of selected images. |
| 128 | + - OCR on filenames or image content for pattern recognition and auto-sorting/batching. |
| 129 | +- **Technology Watch:** |
| 130 | + - Keep updated on new PyScript versions and features. |
| 131 | + - Monitor for new/better sketchy UI libraries or techniques. |
| 132 | + - Explore potential for AI-assisted image manipulation (e.g., generative fill for bleed). |
| 133 | + - Investigate further uses of the File System Access API (e.g., saving back to original file handle with permissions). |
| 134 | + |
| 135 | +This list will be reviewed and prioritized as the project evolves. |
0 commit comments