feat: add folder picker for automatic project file loading

- Add "Load Project Folder" button with folder selection (webkitdirectory)
- Automatically load all project files (JSON, CSV, SVG, CSS) from selected folder
- Eliminate need to manually upload each file individually
- Show clear errors if referenced files are missing from folder
- Update all documentation to explain folder picker usage

This solves the browser security limitation where uploading a single
project.json doesn't allow automatic access to other files in the same
directory. Users can now select an entire project folder and all files
load automatically in one click.

Changes:
- index.html: Add folder input with webkitdirectory attribute and UI
- engine.js: Add folderInput event handler to process all files from folder
- README.md: Document folder picker as primary loading method
- WINDOWS_USAGE.md: Add folder picker as recommended Option 1
- TROUBLESHOOTING.md: Add section explaining project files not auto-loading
- CLAUDE.md: Document folder picker architecture for future instances
- Makefile: Update DIST_README.md template to mention folder picker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 16:34:35 +01:00
parent 39037587ba
commit cefbf96a82
7 changed files with 180 additions and 6 deletions

View File

@@ -115,9 +115,24 @@ You can open `index.html` directly in your browser, but due to CORS restrictions
### Loading Your Project
1. Start the application (using one of the options above)
2. Use the "Load Project" button to upload your `project.json`
3. Or manually upload individual CSV/CSS/SVG files
You have two options:
#### Option 1: Load Entire Project Folder (Recommended)
1. Click **"📂 Load Project Folder"**
2. Select your project folder (e.g., `example\` or your custom project folder)
3. All files (project.json, CSV, SVG, CSS) will be loaded automatically
4. Timeline generates immediately
This is the easiest method - one click loads everything!
#### Option 2: Load Files Individually
1. Click **"📁 Load"** next to "Project Configuration"
2. Select your `project.json` file
3. Manually upload CSV, CSS, and SVG files using the respective buttons
**Note:** Due to browser security, uploading just project.json won't automatically load the other files from the same directory. Use the folder picker (Option 1) for automatic loading.
## File Paths on Windows