Skip to content

feat: add configurable progress bar to SVG output#9

Open
xav-ie wants to merge 1 commit intoagentstation:mainfrom
xav-ie:feat/svg-progress-bar
Open

feat: add configurable progress bar to SVG output#9
xav-ie wants to merge 1 commit intoagentstation:mainfrom
xav-ie:feat/svg-progress-bar

Conversation

@xav-ie
Copy link

@xav-ie xav-ie commented Feb 26, 2026

Summary

  • Add Set ProgressBar <color> command to tape files for an animated progress bar in SVG output
  • The 1px bar grows left to right over the animation duration, providing visual feedback during playback
  • Supports #RGB, #RRGGBB, and #RRGGBBAA hex colors (RGBA for semi-transparent bars)
  • Opt-in: no progress bar by default, only rendered when a color is explicitly set

Usage

Set ProgressBar "#9B79FF"

For a semi-transparent bar:

Set ProgressBar "#9B79FF80"

Implementation

  • Full tape command pipeline: token → lexer → parser (with color validation) → command execution → SVG generation
  • Bar is placed inside the inner SVG so CSS animation works in non-browser renderers (librsvg, Inkscape)
  • Animation duration and delay are synchronized with the main slide animation

Test plan

  • TestParseProgressBar — valid hex colors (#RGB, #RRGGBB, #RRGGBBAA) parse correctly; invalid colors produce errors
  • TestSVGGenerator_ProgressBar — no bar by default, renders with color, supports RGBA, bar is inside inner SVG, animation duration matches slide
  • Full test suite passes (go test ./...)

Add a "Set ProgressBar <color>" command that renders an animated 1px
bar at the bottom of the SVG that grows left to right over the
animation duration. Supports #RGB, #RRGGBB, and #RRGGBBAA hex colors.

The progress bar is opt-in — it only renders when a color is explicitly
set. The default (no setting) produces no progress bar, keeping
existing behavior unchanged.

The bar is placed inside the inner SVG element so its CSS animation
applies correctly in both browsers and non-browser renderers (librsvg,
Inkscape, etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant