Complete Story 3.3: Preset Import & Export

Implements FR-19: Preset import/export as JSON

New Files:
- src/core/PresetImportExportManager.js - Core logic for export/import with merge/replace
- src/ui/gm/PresetExportDialog.js - Export dialog with file download
- src/ui/gm/PresetImportDialog.js - Import dialog with file picker, preview, merge/replace
- templates/preset-export.hbs - Export dialog template
- templates/preset-import.hbs - Import dialog template
- styles/components/_preset-import-export.less - Dialog styles
- tests/unit/core/PresetImportExportManager.test.js - 38 unit tests
- _bmad-output/implementation-artifacts/3-3-preset-import-and-export.md - Story file

Modified Files:
- src/ui/gm/DirectorsBoard.js - Added export/import button handlers
- templates/directors-board.hbs - Added Export/Import buttons to footer
- styles/scrying-pool.less - Added stylesheet import
- lang/en.json - Added localization strings for new UI
- _bmad-output/implementation-artifacts/sprint-status.yaml - Story status: review

Features:
- Export all presets from current scene as JSON file
- Import presets with merge (add new, skip duplicates) or replace (overwrite all) modes
- Preview of presets before import with validation status
- Confirmation dialog for replace mode to prevent data loss
- Comprehensive error handling and validation
- All ACs satisfied (AC-9 deferred for README docs)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-05-23 16:28:53 +02:00
parent e31badf865
commit d175f92806
13 changed files with 2357 additions and 79 deletions
+8 -2
View File
@@ -36,10 +36,16 @@
</div>
<footer class="directors-board__footer">
<button type="button" disabled>
<button type="button" class="directors-board__footer-btn" data-action="save-preset">
{{localize "video-view-manager.directorsBoard.footer.savePreset"}}
</button>
<button type="button" disabled>
<button type="button" class="directors-board__footer-btn" data-action="load-preset" {{#unless hasPresets}}disabled{{/unless}}>
{{localize "video-view-manager.directorsBoard.footer.loadPreset"}}
</button>
<button type="button" class="directors-board__footer-btn" data-action="export-presets">
{{localize "video-view-manager.directorsBoard.footer.exportPresets"}}
</button>
<button type="button" class="directors-board__footer-btn" data-action="import-presets">
{{localize "video-view-manager.directorsBoard.footer.importPresets"}}
</button>
</footer>