fix: cozy, centered loading UI across screens - #11
Merged
Conversation
Replace broken loading states with a shared EchoLoadingScreen (bouncing accent dots + caption, centered, respects Reduce Motion). - Fix spurious pull-to-refresh spinner on Home/Decks/Discover: the PullToRefreshBox bound isRefreshing to the initial Loading state, so the swipe indicator showed with no swipe. Initial load now renders the loader outside PullToRefreshBox. - Fix off-center spinners: old LoadingBlock used fillMaxSize() inside a verticalScroll column (unbounded height -> collapsed under the header); Discover also hardcoded a top padding. The loader now centers on the full viewport. - Apply the same loader to DeckDetail, StudySession, Settings, Profile and FriendProfile for consistency. Button-level spinners left unchanged. - Share rememberReduceMotion() via ui/components; add loading captions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Loading UI was broken across most Android screens:
PullToRefreshBox(isRefreshing = state is Loading). The ViewModels start inLoading, so the pull-to-refresh indicator auto-appeared on every initial load even though the user never swiped.LoadingBlockplaced the spinner in aColumn(fillMaxSize())inside averticalScrollcolumn — unbounded height collapsesfillMaxSize()to wrap-content, so the spinner sat just under the header. Discover was worst: hardcodedpadding(top = 80.dp)with no vertical centering.Changes
EchoLoadingScreen(ui/components/): three accent-orange dots bouncing in a staggered wave with a friendly caption, truly centered on the full viewport. Respects "Remove animations" / Reduce Motion (dots render static).rememberReduceMotion()moved here as a shared helper (removed StudySession's private copy).Loadingnow renders the loader outsidePullToRefreshBox(no spurious swipe spinner, properly centered); pull-to-refresh still works viaisRefreshing = false. OldLoadingBlocks removed.strings.xml.Verification
./gradlew :composeApp:compileDebugKotlin— BUILD SUCCESSFUL./gradlew detektAll— cleanNot yet visually confirmed on a device.
🤖 Generated with Claude Code