Document Creator 0.2.1: Delete to a Drive folder and choose your folders
Document Creator 0.2.1 lets admins delete templates and documents from the admin, without losing them, and choose which Google Drive folders the module works in.
A trash icon on each card and list row asks for confirmation, warning that the file will be moved to the deleted folder, and then moves the file into a deleted folder in Drive, with separate places for templates and documents, instead of removing it. The page confirms with “Moved to deleted folder”.
The settings page gets a Drive Folders section with Templates, Documents and Deleted. Each has a path, chosen with a folder browser (Select Folder) that walks the Drive with breadcrumbs, and a folder name. Missing folders along the path are created.
Also fixed: thumbnails failed to load with newer versions of the Req HTTP library, and placeholders now show a spinner while a thumbnail loads. Folder lookups run in parallel and the folder browser no longer blocks the page.
Full release notes: Document Creator 0.2.1
0.2.1 · 30 March 2026
Added
- Add soft delete for documents and templates — files move to deleted folders instead of permanent removal
- Add configurable folder paths and names with Google Drive folder browser
- Add
ensure_folder_path/2— walks nested Drive paths, creating folders as needed - Add
move_file/2to GoogleDocsClient (Drive API PATCH with addParents/removeParents) - Add
list_subfolders/1for the Drive folder browser - Add
validate_file_id/1to prevent URL path injection in Drive API calls - Add
get_folder_config/0for reading folder path + name settings - Add loading spinner for thumbnail placeholders
- Add delete button (trash icon) on card and list views with confirmation dialog
- Add flash feedback on successful delete
- Add folder browser modal with breadcrumb navigation to settings page
- Add tests for
validate_file_id/1andmove_file/2input validation
Changed
- Parallelize folder discovery with
Task.async+Task.await_many(was sequential) - Make folder browser loading async via
Task.start(no longer blocks LiveView) - Whitelist
browser_fieldvalues to prevent atom exhaustion - Guard
browser_backagainst invalid index - Strip charset from content-type header in
extract_content_type - Update modal template cards to match main page card styling (border, shadow, flex layout)
Fixed
- Fix
FunctionClauseErrorin thumbnail loading — handle map header format from Req >= 0.5
Removed
- Remove orphaned
editor_scripts.ex(dead code from GrapesJS removal)
Document Creator 0.2.1. Install or update: {:phoenix_kit_document_creator, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.