Add shimmer loading state for favorites on Home - #6
Merged
IgnacioLD merged 1 commit intoJul 31, 2026
Merged
Conversation
Favorites previously flashed the empty state then popped in: the stops catalog emits an empty list before its first network fetch, so the favorites list appeared empty then suddenly filled. Show shimmer placeholder cards while favorites are pending instead. Also fixes pull-to-refresh getting stuck: - The polling loop consumed refresh signals without breaking its wait, so arrivals only re-fetched on the 30s cadence. The loop now breaks on signal for an immediate fetch. - AnimatedContent was keyed on the whole state, recreating PullToRefreshBox mid-gesture. Keyed it on the state kind instead. - The spinner now dismisses on a fixed timer instead of waiting on data arrival (which can be deduped and leave it stuck). Removes a double bottom system-bar inset on the nested Home Scaffold that cut into the list. Signed-off-by: IgnacioLD <nadeloyeda@gmail.com>
IgnacioLD
deleted the
3-add-shimmer-effect-on-favorites-it-rn-does-nothing-before-loading-favs
branch
July 31, 2026 10:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3
What
Favorites on the Home screen used to flash the empty state and then pop in, because the stops catalog emits an empty list before its first network fetch resolves. This shows shimmer placeholder cards while favorites are pending instead.
Changes
FavoriteStopCardSkeletonthat mirrors the realFavoriteStopCardlayout;HomeUiState.Readygains anisLoadingflag (true when the user has favorited stops but they haven't resolved yet), andHomeScreenrenders the skeleton during that window.AnimatedContentwas keyed on the whole state, recreatingPullToRefreshBoxmid-gesture. Keyed it on the state kind (contentKey) instead.distinctUntilChangedand leave it stuck).Scaffoldre-applied the system navigation-bar inset even though the hostScaffoldalready insets above the bottom bar, cutting into the list. SetcontentWindowInsets = WindowInsets(0).Tested
Built and ran on a physical device: favorites shimmer while loading, pull-to-refresh updates instantly and the spinner dismisses promptly, and the list bottom is no longer cut off.