Surface Collection Item appearances in Filament: typed pivot model, shared helpers, and new relation managers (#1286)
Commit: f0890d528137176c436d86eed0e477e8c4005792
Date: 2026-05-13 04:41:36 +0000
Author: Copilot
Commit Message
Surface Collection Item appearances in Filament: typed pivot model, shared helpers, and new relation managers (#1286)
* Initial plan
* Add typed CollectionItem pivot model and Filament collection appearances support
- Add App\Models\CollectionItem typed pivot model with contextual description and source provenance helpers
- Update Collection::attachedItems() and Item::attachedToCollections() to use ->using(CollectionItem::class)
- Add App\Filament\Support\CollectionItemAppearance with shared display order column, contextual text preview column, language keys column, and view appearance text action
- Update CollectionResource ItemsRelationManager with display order sorting, contextual text columns, and view appearance action
- Replace DisplayedInCollectionsRelationManager with CollectionAppearancesRelationManager on ItemResource
- Add 16 unit tests for CollectionItem model and 8 Filament tests for appearance visibility
Agent-Logs-Url: https://github.com/metanull/inventory-app/sessions/9a59f5c8-9d0f-431d-a9b5-17ed498b2e49
Co-authored-by: metanull <20630081+metanull@users.noreply.github.com>
* Address code review feedback: null-safety, variable naming, and test comments
Agent-Logs-Url: https://github.com/metanull/inventory-app/sessions/9a59f5c8-9d0f-431d-a9b5-17ed498b2e49
Co-authored-by: metanull <20630081+metanull@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: metanull <20630081+metanull@users.noreply.github.com>
---------
Fixes #1280
Fixes #1281
Fixes #1282
Fixes #1283
Fixes #1284
Files Changed
- 📝 Modified:
app/Filament/Resources/CollectionResource/RelationManagers/ItemsRelationManager.php - 📝 Modified:
app/Filament/Resources/ItemResource.php - 🔄 Renamed:
app/Filament/Resources/ItemResource/RelationManagers/DisplayedInCollectionsRelationManager.php app/Filament/Resources/ItemResource/RelationManagers/CollectionAppearancesRelationManager.php - ✅ Added:
app/Filament/Support/CollectionItemAppearance.php - 📝 Modified:
app/Models/Collection.php - ✅ Added:
app/Models/CollectionItem.php - 📝 Modified:
app/Models/Item.php - ✅ Added:
tests/Filament/Resources/CollectionItemAppearanceTest.php - 📝 Modified:
tests/Filament/Resources/ItemResourceTest.php - ✅ Added:
tests/Unit/Models/CollectionItemTest.php
Links
This documentation was automatically generated from Git commit data.