Skip to content

User profiles, settings sheet, and detail view fixes

jedmund requested to merge feature/user-profiles into main

Created by: jedmund

Summary

  • User profiles: Rewrites ProfileView from a static info screen into a full profile with avatar, bio, stats, and a masonry grid of the user's illustrations. Current user sees a Works/Bookmarks segmented picker; bookmark visibility (public/private) is a toolbar filter menu. Other users' profiles show works only.
  • Settings sheet: Moves R-18 toggle and sign-out into a SettingsSheet presented from a gear toolbar button. Adds portrait/landscape grid column pickers (2–6 range) that MasonryFeed reads via @AppStorage.
  • Cross-user navigation: ProfileDestination registered on every tab's NavigationStack so tapping an artist name in the detail view or any feed pushes to their profile.
  • Detail carousel fix: Multi-page illusts now render each page at its own natural aspect ratio (.fit) instead of forcing all pages into the first page's ratio and clipping.

New files

  • PixivUserDetail.swift — DTO for /v1/user/detail
  • ProfileHeaderView.swift — avatar, name, handle, bio, stat counts
  • SettingsSheet.swift — account info, R-18 toggle, column settings, sign-out
  • ProfileDestination.swiftHashable value for navigation path

Modified files

  • PixivEndpoint.swift.userIllusts, .userBookmarks + BookmarkRestrict
  • ProfileView.swift — full rewrite with masonry feeds
  • MainTabView.swift — passes userID/api to ProfileView, .profileNavigation() modifier
  • IllustDetailView.swift — per-page aspect ratio in carousel, artist row links to profile
  • MasonryFeed.swift — reads column counts from @AppStorage
  • AppSettings.swiftportraitColumns / landscapeColumns keys

Test plan

  • Sign in → Profile tab loads with avatar, bio, illustration grid
  • Tap gear → Settings sheet with account info, column pickers, R-18 toggle, sign-out
  • Switch to Bookmarks tab → grid loads; filter icon appears; toggle public/private reloads
  • Change column count in settings → grids across all tabs update
  • Tap artist name in detail view → pushes to their profile (works only, no segmented control)
  • Multi-page illust detail → each page renders at its own aspect ratio, no cropping
  • Pull-to-refresh on profile reloads header and current feed

🤖 Generated with Claude Code

Merge request reports

Loading