Skip to content

Feature: Home screen polish - #3038

Open
StylianosGakis wants to merge 25 commits into
developfrom
feature/home-sceren-polish
Open

Feature: Home screen polish#3038
StylianosGakis wants to merge 25 commits into
developfrom
feature/home-sceren-polish

Conversation

@StylianosGakis

@StylianosGakis StylianosGakis commented Aug 5, 2026

Copy link
Copy Markdown
Member

#3037 is merged in here
#3041 is built on top

panasetskaya and others added 25 commits August 4, 2026 13:42
…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.
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
StylianosGakis marked this pull request as ready for review August 6, 2026 14:43
@StylianosGakis
StylianosGakis requested a review from a team as a code owner August 6, 2026 14:43
@StylianosGakis StylianosGakis changed the title Feature: Home screen polish WIP Feature: Home screen polish Aug 6, 2026
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.

2 participants