refactor(lobby): split LobbyScreen into per-section files#33
Merged
Conversation
LobbyScreen.kt had grown to ~1100 lines, mixing the screen scaffold with every section composable (header, balance hero, games grid, quick actions, recent activity, loading skeleton). That made it the outlier against Wallet, News and Assistant, which already split their sections into sibling files. Move each section into its own file under feature/lobby, leaving LobbyScreen.kt with the state scaffold, the shared building blocks (Divider, NepFab) and the internal tokens. Extract the repeated background + border boilerplate the tappable cards shared into a `Modifier.lobbyCardSurface` extension. No behavior or layout change: the public LobbyScreen API and the rendered output are identical.
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.
Summary
LobbyScreen.kthad grown to ~1100 lines, mixing the screen scaffold with every section composable (header, balance hero, games grid, quick actions, recent activity, loading skeleton). This PR moves each section into its own sibling file underfeature/lobby, leavingLobbyScreen.kt(~370 lines) with just the state scaffold, the shared building blocks (Divider,NepFab) and theinternaldesign tokens.New files:
LobbyHeader,LobbyBalanceHero,LobbyGamesSection,LobbyQuickActions,LobbyRecentActivity,LobbyLoading.Rationale
Lobby was the outlier against Wallet, News and Assistant, which already split their sections into per-file composables. Aligning it improves navigability and keeps each file under the detekt function-count budget. While splitting, the repeated
background + borderboilerplate shared by the tappable cards (game card, coinflip card, quick action card) was lifted into a singleModifier.lobbyCardSurface(fill, stroke)extension.No behavior or layout change: the public
LobbyScreenAPI and the rendered output are identical. Verified on device.Verification
./gradlew ktlintCheck detekt testDebugUnitTest-> BUILD SUCCESSFUL./gradlew assembleDebug-> BUILD SUCCESSFULTest plan
Checklist
refactor/).[Unreleased]. (No user-visible change; pure restructuring.)