Skip to content

Conversation

@adamrushy
Copy link
Contributor

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.

After After
Simulator Screenshot - iPhone 16 Pro - 2025-08-23 at 17 57 26 Simulator Screenshot - iPhone 16 Pro - 2025-08-23 at 17 57 23
After After
Simulator Screenshot - iPhone 16 Pro - 2025-08-23 at 17 59 26 Simulator Screenshot - iPhone 16 Pro - 2025-08-23 at 17 59 24

@Sherlouk Sherlouk requested a review from Copilot August 23, 2025 18:03
Copy link

Copilot AI left a 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.

Comment on lines +33 to +34
loadingView
.padding(.top, Padding.screen)
Copy link

Copilot AI Aug 23, 2025

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.

Suggested change
loadingView
.padding(.top, Padding.screen)
.padding(.top, Padding.screen)
} else if let error = error {
errorView(error: error)
.padding(.top, Padding.screen)

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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 👍🏼

Comment on lines +35 to +36
if let url = URL(string: sponsor.url) {
openURL(url)
Copy link

Copilot AI Aug 23, 2025

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +197 to +202
@State private var isPressed = false

var body: some View {
Button(action: {
if let url = URL(string: job.url) {
openURL(url)
Copy link

Copilot AI Aug 23, 2025

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.

Suggested change
@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

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a 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.

@adamrushy adamrushy merged commit e7b7377 into main Aug 24, 2025
1 check passed
@adamrushy adamrushy deleted the update-sponsor-screen branch August 24, 2025 18:16
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.

4 participants