Skip to content

feat: home screen redesign with vertical pager#793

Open
jvsena42 wants to merge 136 commits intomasterfrom
feat/home-redesign
Open

feat: home screen redesign with vertical pager#793
jvsena42 wants to merge 136 commits intomasterfrom
feat/home-redesign

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Feb 18, 2026

FIGMA

Description

This PR:

  1. Redesigns the home screen from a single continuous scroll into a two-page vertical pager layout (Page 0: wallet + activity, Page 1: widgets + suggestions)
  2. Converts the suggestions section from a horizontal list into a 2-column grid with dismiss animations
  3. Simplifies ActivityListSimple by removing the empty state row
  4. Adds a "Bitkit Suggestions" entry to the Add Widgets screen with a preview screen
  5. Adds a widgets onboarding hint on the wallet page to guide users to swipe down
  6. Pixel-perfect alignment with Figma (spacing, padding, typography, icon sizing)
  7. Default widgets configuration for new installs
  8. Balance section displayed on empty wallet state
  9. Widget edit mode preserves widget order
  10. Various UI polish (banner padding/icons, divider colors, letter spacing, font weights)

Preview

Screen recording

Screen_recording_20260305_094625.webm

Android vs Figma comparison

State Android Figma
Empty wallet (onboarding)
With balance
Widgets & suggestions

QA Notes

1. Vertical Pager

  • Open the app and navigate to the home screen
  • Swipe down to see the widgets page (Page 1)
  • Swipe up to return to the wallet page (Page 0)
  • Verify pull-to-refresh only works on the wallet page

2. Widgets Onboarding Hint

  • On a fresh install or after clearing settings, verify a swipe hint appears below the activity list
  • Swipe to the widgets page and verify the hint disappears
  • Verify the hint does not reappear after dismissal

3. Suggestions Grid

  • On the widgets page, verify suggestions display as a 2-column grid (max 4 items)
  • Dismiss a suggestion card and verify the animation is smooth (fade + reposition)
  • Verify remaining cards rearrange properly after dismissal

4. Responsive Activity Count

  • On smaller screens, verify fewer activity items are shown
  • On larger screens, verify more activity items are shown

5. Shop Discover

  • Navigate to Shop
  • Verify the suggestion cards display correctly (no layout regressions from the card sizing change)

@jvsena42 jvsena42 self-assigned this Feb 18, 2026
@jvsena42
Copy link
Member Author

jvsena42 commented Mar 13, 2026

PR Review Fixes Update

All 17 inline code review comments and 10 testing-phase bugs have been addressed in the latest commits. Here's a summary:

Code Review Comments (inline)

  1. Removed curly braces from one-liner throw in WidgetsRepo.kt
  2. Replaced hardcoded animation duration with AnimationConstants.DefaultDurationMillis in HomeScreen.kt
  3. Replaced .collect {} with .collect() in HomeViewModel.kt (2 locations)
  4. Updated preview annotations to showSystemUi = true in SuggestionsPreviewScreen.kt and AddWidgetsScreen.kt
  5. Reordered composable params (state first, callbacks last) in SuggestionsPreviewScreen.kt and AddWidgetsScreen.kt
  6. Removed .toUpperCase() from Headline20 — moved .uppercase() to callsites (SuggestionCard.kt, ActivityBanner.kt)
  7. Extracted SecondaryDisplay composable in BalanceHeaderView.kt to reduce duplication
  8. Extracted suggestion methods (spendingSuggestions, savingsOnlySuggestions, emptyWalletSuggestions) in HomeViewModel.kt
  9. Extracted spaceToNewline() String extension — replaced .replace(" ", "\n") across 7 widget preview screens
  10. Replaced LocalConfiguration.screenHeightDp with LocalWindowInfo.current.containerSize in HomeScreen.kt
  11. Extracted BOTTOM_SPACER_HEIGHT constant to consolidate tab bar + padding arithmetic
  12. Reduced vertical swipe threshold to make it more fluid
  13. Add dark gradient at the bottom of widgets page

Testing Bugs Fixed

  1. Widget Settings back nav — removed disableEditMode() from onClickEditWidget callback
  2. "Show All" button spacing — changed top padding from 2.dp to 16.dp
  3. Keyboard covering calculator — added .imePadding() to WidgetsPage Column
  4. LN state not updating on pull-to-refresh — added lightningRepo.syncState() to refreshReceiveState()
  5. Timed sheets not showing — replaced LaunchedEffect/DisposableEffect with lifecycle-aware LifecycleEventObserver (ON_RESUME/ON_PAUSE)
  6. First receive sheet not showing — added retry mechanism (retryShouldShowReceivedSheet) with 3 retries × 300ms delay
  7. Pager scroll threshold — reduced snap positional threshold to 0.1f with Spring.StiffnessLow
  8. Predictive back gesture on AllActivityScreen — removed BackHandler that was consuming back events, replaced with DisposableEffect for filter cleanup, changed navigateToHome() to popBackStack()

All changes pass compilation, unit tests, and detekt.

@jvsena42
Copy link
Member Author

back-stack-behaviour.webm
sholl-all-padding.webm
bottom-gradient.webm
ime-padding.webm
auto-tab.webm
timed-sheets.webm
predictive-back.webm
receive-sheet.webm

@jvsena42 jvsena42 marked this pull request as ready for review March 13, 2026 15:10
@jvsena42 jvsena42 requested a review from ovitrif March 13, 2026 15:11
@jvsena42
Copy link
Member Author

jvsena42 commented Mar 13, 2026

@piotr-iohk I see from the video the test expect to see the widget without leaving the edit mode
https://github.com/synonymdev/bitkit-android/actions/runs/23057230096/job/66993198920?pr=793

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.

4 participants