-
-
Notifications
You must be signed in to change notification settings - Fork 10
Update Sponsor Screen #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…te-sponsor-screen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR significantly updates the Sponsors screen with improved UI design and filtering functionality. The main changes include adding visual filtering chips, enhanced loading states, and improved sponsor tile designs.
- Replaces the basic list view with a modern ScrollView layout featuring loading states and empty states
- Adds sponsor filtering by tier (Platinum, Gold, Silver) with animated filter chips
- Enhances sponsor tiles with better visual hierarchy, job indicators, and collapsible job sections
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| SponsorsView.swift | Complete redesign with filtering functionality, loading states, and improved layout |
| SponsorTileView.swift | Enhanced tile design with job section expansion, better accessibility, and visual improvements |
| ShimmerView.swift | New component for loading state animations |
| project.pbxproj | Project file updates to include the new ShimmerView component |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| loadingView | ||
| .padding(.top, Padding.screen) |
Copilot
AI
Aug 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loading state check should account for potential loading errors. Currently, if viewModel.loadSponsors() throws an error, isLoading is set to false but viewModel.sections might still be empty, causing the empty state to show instead of an error state.
| loadingView | |
| .padding(.top, Padding.screen) | |
| .padding(.top, Padding.screen) | |
| } else if let error = error { | |
| errorView(error: error) | |
| .padding(.top, Padding.screen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, but am not sure if we have any decent errors from the API to present so I think showing an empty list is probably fine here 👍🏼
| if let url = URL(string: sponsor.url) { | ||
| openURL(url) |
Copilot
AI
Aug 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL validation check is redundant here since sponsor.url is already a String and openURL environment value expects a URL. The original code directly passed the URL string to a helper function. This could fail silently if sponsor.url is not a valid URL format.
| if let url = URL(string: sponsor.url) { | |
| openURL(url) | |
| if let url = URL(string: sponsor.url), UIApplication.shared.canOpenURL(url) { | |
| openURL(url) | |
| } else { | |
| showingInvalidURLAlert = true |
| @State private var isPressed = false | ||
|
|
||
| var body: some View { | ||
| Button(action: { | ||
| if let url = URL(string: job.url) { | ||
| openURL(url) |
Copilot
AI
Aug 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same URL validation issue as in the main tile. The code should handle invalid URLs more gracefully, potentially showing an error message or logging the failure instead of silently doing nothing.
| @State private var isPressed = false | |
| var body: some View { | |
| Button(action: { | |
| if let url = URL(string: job.url) { | |
| openURL(url) | |
| @State private var isPressed = false | |
| @State private var showInvalidUrlAlert = false | |
| var body: some View { | |
| Button(action: { | |
| if let url = URL(string: job.url) { | |
| openURL(url) | |
| } else { | |
| showInvalidUrlAlert = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
It's mainly a UI update this one, it includes a way to filter the sponsors as well jus a bit more easier to navigate.