Skip to content

feat: outfits screen with create, select, delete#5

Merged
jvsena42 merged 13 commits into
mainfrom
feat/outfits
Mar 23, 2026
Merged

feat: outfits screen with create, select, delete#5
jvsena42 merged 13 commits into
mainfrom
feat/outfits

Conversation

@jvsena42
Copy link
Copy Markdown
Owner

Summary

Add the Outfits tab as the second screen in the app. Users can create outfits by combining wardrobe items, view them in a card list with category-aware thumbnails, and select/delete outfits. Deleting a wardrobe item now cascade-deletes all outfits that contain it.

Changes

  • OutfitViewModel (MVI): new shared ViewModel with intents for loading outfits, creating outfits (with item selection + category filtering), toggling selection, and deleting. Loads itemCategories map at init for thumbnail icons.
  • OutfitRepository: updated interface and implementation to use Result<T> pattern with runCatching, consistent with WardrobeRepository.
  • OutfitsScreen (Android + iOS): full screen with normal header (+ Create button), selection mode (delete button + cancel), empty state (CTA opens create sheet), responsive tablet layout, and 5 previews per platform.
  • OutfitCard (Android + iOS): 170dp card with item thumbnail row (category-specific icons from CategoryDropdown drawables/SF Symbols), colored count badge, outfit name, date, and chevron.
  • CreateOutfitSheet (Android + iOS): bottom sheet / navigation sheet with outfit name field, category filter chips, item selection grid with photo thumbnails and checkboxes, and gradient save button.
  • Tab navigation: wired bottom bar so WARDROBE and OUTFITS tabs switch screens on both platforms.
  • Cascade delete: deleting a wardrobe item now removes all outfits containing that item (via getOutfitIdsForItem SQL query + transaction in WardrobeRepositoryImpl).
  • Outfits refresh: outfits screen reloads on appear to reflect wardrobe changes.
  • Koin DI: registered OutfitRepository and OutfitViewModel in shared module.
  • Tests: 14 unit tests for OutfitViewModel (init, load, filter, select, create success/failure, delete success/failure) + updated WardrobeRepositoryImplTest for cascade delete.

Test plan

  • Create an outfit from the outfits screen (empty state CTA or header + Create button)
  • Verify item thumbnails show correct category icons in outfit cards
  • Long-press to select outfits, delete them via confirmation dialog
  • Delete a wardrobe item and verify its outfits are removed when switching to Outfits tab
  • Filter items by category in the create outfit sheet
  • Verify tablet layout renders correctly on both screens
  • Run ./gradlew :shared:allTests — all 22 tests pass
  • Run ./gradlew detekt — clean

Checklist

  • ./gradlew detekt passes
  • Tested on Android
  • Tested on iOS
  • Updated documentation (if applicable)

🤖 Generated with Claude Code

@jvsena42 jvsena42 self-assigned this Mar 23, 2026
@jvsena42 jvsena42 enabled auto-merge March 23, 2026 23:20
@jvsena42 jvsena42 merged commit 8e1a72f into main Mar 23, 2026
1 check passed
@jvsena42 jvsena42 deleted the feat/outfits branch March 23, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant