[Notification Hub] UI changes to add screen + components (pulled from #16)#87
[Notification Hub] UI changes to add screen + components (pulled from #16)#87
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the notification hub UI components and screens to the Resell Android app. The changes establish the foundation for displaying in-app notifications with filtering, categorization, and swipe-to-archive functionality, though the networking implementation is deferred to future work.
Key Changes:
- New notification hub screen with time-based categorization (New, Last 7 Days, Last 30 Days, Older)
- Swipeable notification cards supporting archive gestures
- Filter system for notification types (MESSAGE, REQUEST, DISCOUNT, etc.)
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
ic_unread_message.xml |
New vector drawable icon for unread message indicator |
ic_notification_bell.xml |
New vector drawable icon for notification bell |
InAppNotifViewModel.kt |
ViewModel managing notification state, categorization logic, and user interactions |
HomeViewModel.kt |
Added navigation handler to notifications hub screen |
Functions.kt |
Added isoToTimeAgo() utility for time-relative display formatting |
Color.kt |
Added ResellPurpleWash color for unread notification backgrounds |
RootNavigation.kt |
Added navigation route for notifications hub screen |
NotificationsScreen.kt |
Main notification hub screen with header, filters, and scrollable content |
HomeScreen.kt |
Integrated notification button navigation from home screen |
ResellNotificationsScroll.kt |
Scrollable component rendering categorized notification lists |
NotificationCard.kt |
Notification display components with swipe-to-archive functionality |
InAppNotif.kt |
Data classes for in-app notification structure and additional metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...java/com/cornellappdev/resell/android/ui/components/global/notifications/NotificationCard.kt
Show resolved
Hide resolved
.../java/com/cornellappdev/resell/android/viewmodel/notifications/InAppNotificationViewModel.kt
Show resolved
Hide resolved
...cornellappdev/resell/android/ui/components/global/notifications/ResellNotificationsScroll.kt
Outdated
Show resolved
Hide resolved
...cornellappdev/resell/android/ui/components/global/notifications/ResellNotificationsScroll.kt
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/resell/android/model/classes/InAppNotif.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/resell/android/util/Functions.kt
Outdated
Show resolved
Hide resolved
...cornellappdev/resell/android/ui/components/global/notifications/ResellNotificationsScroll.kt
Outdated
Show resolved
Hide resolved
...cornellappdev/resell/android/ui/components/global/notifications/ResellNotificationsScroll.kt
Outdated
Show resolved
Hide resolved
.../java/com/cornellappdev/resell/android/viewmodel/notifications/InAppNotificationViewModel.kt
Show resolved
Hide resolved
...cornellappdev/resell/android/ui/components/global/notifications/ResellNotificationsScroll.kt
Show resolved
Hide resolved
|
Are there any differences from #16 in this PR? If not we could probably just merge it right in |
Only major difference is that I changed the data class to match what's being sent from the backend. Other that that there were a few tweaks I had to make but nothing major |
zachseidner1
left a comment
There was a problem hiding this comment.
I'll just approved since this has mainly already been reviewed and will probably be fine. One thing that I think is important though is the naming of using Notif instead of Notification. Notification doesn't take much longer to write out and I think it significantly improves readability, so I would appreciate if we can get rid of "Notif".
Overview
Added the changes UI changed related to notifications hub from #16 and updated the viewmodel and data classes as needed
Changes Made
notifications/NotificationCard.kt: element for a notification and the element for a swipable notification cardnotifications/ResellNotificationScroll.kt: Element for all the notifications on the notifications hub screenNotificationsHubScreen.kt: Notifications hub screen with all notificationsHomeScreentoNotificationsHubScreenInAppNotifTest Coverage
Samsung A36 Physical Emulator
Next Steps
Add networking to populate the notif hub with data
Related PRs or Issues
Changed derives from #16