Skip to content

feat: Favorite Events in event switcher#140

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-favorite-events-feature
Draft

feat: Favorite Events in event switcher#140
Copilot wants to merge 2 commits intomainfrom
copilot/add-favorite-events-feature

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

Users had no way to surface preferred events from an ever-growing list, requiring manual scrolling on every selection.

Changes

useFavoriteEvents hook (new)

  • Persists favorite event IDs to AsyncStorage under @favorite_events
  • Exposes favoriteEventIds, isFavorite(id), toggleFavorite(id)
  • Handles storage errors gracefully (corrupt data, quota exceeded) by defaulting to [] and reverting optimistic UI updates on write failure

EventSelector

  • Adds a star IconButton to every event row (filled = favorited, outline = not)
  • Renders a Favorites section above Official/Unofficial/Retired when at least one event is favorited
  • Multi-events (e.g. 333mbf) render Ticker + star side-by-side

Localization

  • Added event.type.favorites"Favorites" / "Favoritos" (en + es)

Tests

  • Added @react-native-async-storage/async-storage jest mock to global setup
  • Deleted stale EventSelector snapshot for regeneration

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
- Add useFavoriteEvents hook using AsyncStorage for persistence
- Update EventSelector to show Favorites section at top with star toggle buttons
- Add event.type.favorites localization key to en.json and es.json
- Add AsyncStorage jest mock to global test setup
- Delete stale EventSelector snapshot for regeneration

Agent-Logs-Url: https://github.com/SpeedcuberOSS/speedcuber-timer/sessions/e0a858fc-748a-4bbe-ba7b-0b95bd4452ff

Co-authored-by: thehale <47901316+thehale@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Add feature to allow users to mark events as favorite feat: Favorite Events in event switcher Mar 31, 2026
Copilot AI requested a review from thehale March 31, 2026 16:52
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.

Favorite Events

3 participants