feat: GIF quality and compression preset#598
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR adds a three-tier GIF quality preset system (high, balanced, small) enabling users to reduce exported GIF file size at export time. The change integrates quality preset selection across type definitions, encoder configuration, editor state persistence, export resolution, component state management, and UI controls. ChangesGIF Quality Preset Feature
Sequence DiagramsequenceDiagram
participant UI as ExportSettingsMenu
participant Editor as VideoEditor State
participant Settings as resolveExportStartSettings
participant Encoder as GifExporter
participant Quality as getGifQuality
UI->>UI: User selects quality preset
UI->>Editor: onGifQualityPresetChange(preset)
Editor->>Editor: Update gifQualityPreset state
Editor->>Editor: Persist to localStorage
Note over Editor: Export initiated
Editor->>Settings: resolveExportStartSettings({..., gifQualityPreset})
Settings->>Settings: Build gifConfig with qualityPreset
Settings-->>Editor: ExportSettings with gifConfig.qualityPreset
Editor->>Encoder: Create GifExporter({ qualityPreset })
Encoder->>Quality: getGifQuality(qualityPreset)
Quality->>Quality: Validate against GIF_QUALITY_PRESETS
Quality-->>Encoder: Numeric quality value
Encoder->>Encoder: Initialize gif.js with quality
Encoder-->>Editor: GIF encoding with applied quality
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
low(fast, small file),balanced(default - current behavior),high(slow, larger file).src/lib/exporter/types.tsfor the typed preset, the ExportSettingsMenu UI, and VideoEditor's invocation path.balanced.cc @meiiie - picking up your 2026-05-09 re-up invitation. Happy to adjust the preset boundaries or naming if you'd prefer different defaults.
Closes #336.
AI was used for assistance.
Summary by CodeRabbit
New Features
Tests