2.5 KiB
2.5 KiB
Project Overview: Bread Screenshot System
Goal
Add a maintainable, automated system to generate high-quality screenshots/renders of all major UI views across the Bread ecosystem. This will dramatically speed up UI development, visual regression testing, documentation, and marketing.
Scope
In Scope:
- Automated screenshot generation for all major GUI components
- Support for different themes (pywal accents, light/dark if added later)
- Consistent naming and output structure
- Easy-to-run command (
bread capture --allor similar) - Integration with development workflow and CI (optional)
Out of Scope (Phase 1):
- Video/GIF capture
- Full automated visual diffing (can be Phase 2)
Target Apps / Views
-
breadbar
- Main bar (all placements)
- Control panel (full + sections)
- WiFi popover, media popover, etc.
- Notifications
-
breadman
- All sidebar views (All, Upcoming, Todo, Reminder, etc.)
- Note cards in different states
- Editor / create flow
-
breadbox
- Main launcher view
- Different contexts
-
bos-settings
- All major panels
-
breadpad (capture popup)
-
breadlock (lock screen states)
-
Widgets (test module that renders many widget examples)
Technical Approach (Most Idiomatic)
Core Components:
-
Shared Library (
bread-screenshotscrate in bread-ecosystem)- Common screenshot utilities
- Window finding / targeting logic (using
gtkorgrim) - Theme forcing
-
Per-App Screenshot Mode
- Add
--screenshot <view>flag to each GTK app - Special runtime mode that opens the desired view and calls capture after render
- Add
-
Orchestrator
- A small Rust binary (
bread-capture) or bash + Rust hybrid - Launches each app with proper flags, waits, captures, saves
- A small Rust binary (
-
Output Structure
screenshots/ ├── v0.8.0/ │ ├── breadbar-main.png │ ├── breadbar-control.png │ ├── breadman-all.png │ ├── breadman-todo.png │ └── ... └── latest/ (symlinks)
Recommended Implementation Steps
- Create
bread-screenshotscrate in bread-ecosystem - Add screenshot support to the most important apps first (breadman + breadbar)
- Build the orchestrator tool
- Add
bread capturesubcommand to the CLI - Document usage + add to CONTRIBUTING.md
Benefits
- Much faster UI iteration
- Visual regression testing
- Always up-to-date marketing/docs screenshots
- Easier contributor onboarding for UI work
- Professional polish for the project