feat: Add smart density defaults based on material type (#2)
Some checks failed
CI / style (push) Has been cancelled
CI / build-client (push) Has been cancelled
CI / build-amd64 (push) Has been cancelled
CI / build-tester (push) Has been cancelled
CI / test (cockroachdb) (push) Has been cancelled
CI / test (mariadb) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / test (sqlite) (push) Has been cancelled
CI / build-arm64 (push) Has been cancelled
CI / build-armv7 (push) Has been cancelled
CI / publish-images (push) Has been cancelled
CI / publish-release (push) Has been cancelled

Auto-fill density when entering material type in filament forms:
- Add materialDefaults.ts with standard densities for common materials
  (PLA, ABS, PETG, TPU, PC, etc.)
- Material field now uses AutoComplete with suggestions
- Density auto-fills on material select or blur (fuzzy matching)
- New filaments default to 1.75mm diameter and 1.24 g/cm³ (PLA)
- Applied to both full filament create page and quick create modal

Reduces tedious data entry for common materials while still allowing
custom values for specialty filaments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-14 19:54:30 -06:00
parent 27d85eb479
commit 478806dcc8
4 changed files with 162 additions and 11 deletions

View File

@@ -263,7 +263,8 @@
"import_external_description": "Select a filament in the list to automatically populate its details in the filament creation form. This will overwrite any data you have entered in the form.<br><br>A Manufacturer object will be created automatically when you click Ok, if necessary.",
"created_success": "Created filament \"{{name}}\"",
"vendor_placeholder": "Select a manufacturer",
"name_placeholder": "E.g. Matte Black"
"name_placeholder": "E.g. Matte Black",
"material_placeholder": "PLA, PETG, ABS, etc."
},
"buttons": {
"add_spool": "Add Spool"