Skip to content
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

[Update] Conditionally hide favorites category #549

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

CalebRas
Copy link
Collaborator

Description

This PR updates the "Favorites" category in the Samples App:

  • Hides the "Favorites" category when there are no favorited samples (see issue for why).
  • Replaces some of the boilerplate code surrounding the favorites with an @AppFavorites type.

I will be adding additional ways to favorite in a follow up PR.

Linked Issue(s)

How To Test

  • Ensure the favorites category hides/shows depending on whether there are favorited samples.
  • Verify favorite/unfavorite still work as expected (long press on sample row).

Screenshots

Before After
Simulator Screenshot - 1 - iPhone 16 Pro - 2024-11-14 at 16 46 02 Simulator Screenshot - 1 - iPhone 16 Pro - 2024-11-14 at 16 45 56

@CalebRas CalebRas self-assigned this Nov 15, 2024
@CalebRas CalebRas requested review from a team, mhdostal and zkline101 and removed request for a team November 15, 2024 01:18
Copy link
Contributor

@zkline101 zkline101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well

@CalebRas
Copy link
Collaborator Author

Thank you!

@CalebRas CalebRas merged commit 8c34d17 into v.next Nov 15, 2024
1 check passed
@CalebRas CalebRas deleted the Caleb/Update-FavoriteCategory branch November 15, 2024 20:59
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.

3 participants