feat: Add user profile bottom sheet with activity heatmap#122
Merged
RedBlueBird merged 14 commits intoNov 8, 2025
Merged
Conversation
- Created ActivityHeatmapView: GitHub-style heatmap with orange theme (#f54900) showing 30-day rolling window of user activity with point-based intensity - Created UserProfileViewModel: Data management layer for fetching user profiles, mission results, and badge collections with parallel async fetching - Created UserProfileBottomSheetView: Main profile view displaying username, avatar badge, activity heatmap with tooltips, and 4-column badge grid - Extended UserSupabase: Added getUserProfile function to fetch any user's data - Extended BadgeSupabase: Added fetchUserBadges and fetchBadgesByIds methods for fetching user badge collections - Updated NationalRankingView: Added tap handlers to ranking rows and podium positions to open user profiles in bottom sheet - Updated TeamRankingView: Added same tap functionality for team rankings - All components use UserAvatarView for consistent badge/avatar display - Bottom sheet supports .medium and .large detents with swipe-to-dismiss - Includes loading states, error handling, and empty state views
- Remove unnecessary optional unwrapping for entry.userId (not optional) - Replace NavigationView with NavigationStack for iOS 16+ compatibility - Fix conditional binding errors in ranking tap handlers
- Convert Int64? finalPoints to Int for daily points aggregation - Change shelterBadgeId to profileBadgeId (correct User model field) - Rename getShelterBadge() to getProfileBadge() for clarity - Handle optional finalPoints with nil coalescing
… positioning - Add weekday labels (Mon-Sun) at the top of heatmap columns - Align grid cells to correct weekdays using padding cells - Fix tooltip positioning to appear directly above clicked cell - Use offset-based positioning instead of absolute position for tooltip - Add smooth animation for tooltip show/hide - Increase tooltip display duration to 2.5 seconds
5eb244c to
8b3f71a
Compare
…le-bottom-sheet-011CUvTsFqJiH69tNAtrzHER
Changed weekday labels from HStack to LazyVGrid to ensure perfect alignment with the heatmap grid columns below.
When users tap on a member row in the group details view, it now opens a bottom sheet showing the user's profile with activity heatmap and badge collection. Includes haptic feedback on tap.
Cerealmaster0621
approved these changes
Nov 8, 2025
d8c0291 to
d437e1b
Compare
edf84a3 to
d8c0291
Compare
Fixed blank sheet issue on first open by starting isLoading as true. This prevents the "User Not Found" empty state from flashing before the async fetch begins in the .task modifier.
Changed from .sheet(isPresented:) with optional unwrapping to .sheet(item:) which properly handles the optional UUID binding. This prevents the blank sheet issue on first open by ensuring the sheet content is only created when selectedUserId has a value. - Removed showUserProfile state variable (no longer needed) - Updated handleUserTap to only set selectedUserId - Applied fix to both NationalRankingView and TeamRankingView
Added UUID extension to conform to Identifiable protocol, which is required by the .sheet(item:) modifier. UUID's id is itself.
UUID already conforms to Identifiable in Foundation, so the custom extensions were causing redeclaration errors. Removed both extensions.
Created IdentifiableUUID wrapper struct to make UUID work with .sheet(item:) modifier. UUID's Identifiable conformance may not be available in the current Swift/iOS version, so this wrapper provides the necessary conformance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Related Issue
N/A
Changes
How to Test
Build & Run
Screenshots/Videos
Points for Review