Feature: Home screen polish - #3038
Open
StylianosGakis wants to merge 25 commits into
Open
Conversation
…eview
- Replace the duplicated "Help & support" quick-action tile with an "Edit
insurance" tile (gear icon) wired to the change-coverage flow
(StartTierFlowChooseInsuranceKey). Help & support stays in the top pill row.
- Point the home quick-action tiles, discover section title/button, and addons
button at new HOME_* Lokalise keys instead of shared Help Center / cross-sell
keys, so home copy no longer leaks into other screens.
- Add an optional buttonText override to CrossSellsSection (defaults to the
existing key, so other callers are unchanged).
- Render the Offers ("Your quotes") card inside PreviewHomeScreen.
…nce/android into feature/home-sceren-polish
Only show the "Edit insurance" quick-action tile when the member can actually change tier, matching how Help Center gates the same destination. Reaching the change-tier flow otherwise lands on its Failure screen. - Request isChangeTierEnabled on the memberActions block QueryHome already fetches. - Map it into HomeData.isEditInsuranceEnabled and thread it through the HomePresenter state (mirroring the existing isHelpCenterEnabled pipeline). - Gate the tile in QuickActionTilesSection on the new flag. - Update the demo use case, previews, and HomePresenterTest.
CrossSellsSection.buttonText was only applied on the non-discount branch; the discounts branch used the per-item crossSell.buttonText and silently ignored the section-level override. Fall back to the section value when the item has none (crossSell.buttonText ?: buttonText), so the parameter behaves consistently across both branches. No current caller combines a section buttonText with discounts, so existing output is unchanged.
isHelpCenterEnabled is only ever read off HomeUiState.Success, never polymorphically through the HomeUiState interface, so its interface declaration (with a get() = false default) plus the Success override were dead weight. Make it a plain Success val, leaving the interface to hold only the state genuinely read through it (isReloading, hasUnseenChatMessages).
Extend the eligibility gating from just "Edit insurance" to all three quick-action tiles, so an ineligible member never sees a tile that dead-ends. - Fetch isMovingEnabled and isTravelCertificateEnabled on the memberActions block QueryHome already requests, alongside isChangeTierEnabled. - Map them into HomeData and thread through the HomePresenter state. - Gate "Change address" and "Travel certificate" like "Edit insurance", and hide the whole quick-actions section when none of the three are enabled so it never renders as a lone heading over an empty row. - Cover the per-flag mapping with one focused HomePresenter test.
… + toNavKey into shared module - git mv QuickAction.kt and GetQuickLinksUseCase.kt from feature-help-center into the shared module - Repackage to com.hedvig.android.memberquickactions - Rename interface to GetMemberQuickActionsUseCase and impl to GetMemberQuickActionsUseCaseImpl - Make QuickAction, QuickLinkDestination (all Outer cases), and InnerHelpCenterDestination public - Add QuickLinkNavKey.kt with fun QuickLinkDestination.toNavKey(): HedvigNavKey mapping all Outer cases to nav keys; Inner cases throw error() (caller responsibility)
- Add `implementation(projects.memberQuickActions)` dep to feature-help-center - Update all imports in HelpCenterPresenter, HelpCenterViewModel, HelpCenterHomeDestination, GetInsuranceForEditCoInsuredUseCase to use `com.hedvig.android.memberquickactions.*` instead of old help-center packages - Rename GetQuickLinksUseCase -> GetMemberQuickActionsUseCase references - Replace the big NavigateToQuickAction when-block with a toNavKey() call, intercepting InnerHelpCenterDestination.FirstVet and QuickLinkSickAbroad before delegating to the shared extension - Move GetQuickLinksUseCaseTest -> GetMemberQuickActionsUseCaseTest into member-quick-actions jvmTest, renamed and repackaged - Move GetMemberActionsUseCaseImplTest into member-quick-actions jvmTest (the impl is internal to that module; the test must live there)
Home now consumes GetMemberQuickActionsUseCase directly: it fetches the member's quick actions, drops the sick-abroad action (which Home cannot reach) and takes the first three, exposing them as Success.quickActions. The interim memberActions eligibility booleans (isEditInsuranceEnabled / isMovingEnabled / isTravelCertificateEnabled) are removed from the GraphQL query, HomeData, and the ui state. The tiles render one HomeActionTile per action, mapping the action type to an icon; the Edit-insurance MultiSelectExpandedLink opens a Home-owned bottom sheet of its sub-links. Navigation is threaded via a single navigateToQuickLink lambda from :app (routing OuterDestinations through toNavKey()); FirstVet is intercepted inside homeEntries since its key is internal to feature-home.
- Narrow toNavKey() to QuickLinkDestination.OuterDestination so the two inner (feature-navigated) destinations cannot reach it: the compiler now forces every caller to handle FirstVet/SickAbroad itself, replacing the previous runtime error() guard. Callers switch on `is OuterDestination`. - Rename the Help Center use-case parameter to getMemberQuickActionsUseCase to match its type. - Route Home's FirstVet quick action through a single local helper instead of duplicating the FirstVetKey add in two places.
StylianosGakis
marked this pull request as ready for review
August 6, 2026 14:43
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.
#3037 is merged in here
#3041 is built on top