Skip to content

Extract purchase-common module (RND-1965)#2942

Draft
hugokallstrom wants to merge 1 commit into
feat/in-app-apartment-purchasefrom
eng/extract-purchase-common
Draft

Extract purchase-common module (RND-1965)#2942
hugokallstrom wants to merge 1 commit into
feat/in-app-apartment-purchasefrom
eng/extract-purchase-common

Conversation

@hugokallstrom
Copy link
Copy Markdown
Contributor

Summary

  • Creates app/purchase-common as a library module containing tier selection, summary, signing, success, and failure screens plus their use cases, models, and GraphQL operations
  • feature-purchase-apartment slimmed down to just the apartment-specific form + use cases, now depending on purchase-common
  • Apartment behavior unchanged
  • Stacked on top of In-app apartment purchase flow (RND-1965) #2912

What moved

  • Screens: SelectTier, PurchaseSummary, Signing, PurchaseSuccess, PurchaseFailure
  • Use cases: AddToCartAndStartSignUseCase, PollSigningStatusUseCase
  • Models: TierOfferData, SelectTierParameters, SummaryParameters, SigningParameters, SigningStart, SigningPollResult, SigningStatus
  • GraphQL: ShopSessionCartEntriesAdd, ShopSessionStartSign, ShopSessionSigning, ProductOfferFragment (renamed with Purchase prefix)

UX polish on shared SelectTier

  • Hide the deductible dropdown entirely when only one option exists (was rendered disabled before)
  • Pre-select the currently-confirmed tier and deductible in the dialog radio groups so the existing choice is visible when reopening

Test plan

  • Apartment purchase flow end-to-end (form → tier → summary → signing → success)
  • Deductible row is gone when the chosen tier has a single deductible
  • Reopening the Skyddsnivå / Självrisk dialog shows the current selection highlighted

🤖 Generated with Claude Code

Create a new app/purchase-common library module containing shared
purchase screens, use cases, models, and GraphQL operations that are
product-agnostic. This unblocks adding new in-app purchase products
(car, etc.) without duplicating tier selection, summary, signing,
success, and failure screens.

Moved from feature-purchase-apartment to purchase-common:
- SelectTier, PurchaseSummary, Signing, PurchaseSuccess, PurchaseFailure
  screens, view models, and presenters
- AddToCartAndStartSignUseCase, PollSigningStatusUseCase
- TierOfferData, SelectTierParameters, SummaryParameters,
  SigningParameters, SigningStart, SigningPollResult, SigningStatus
- ShopSessionCartEntriesAdd / ShopSessionStartSign / ShopSessionSigning
  mutations + ProductOfferFragment

feature-purchase-apartment now depends on purchase-common. Apartment
behavior is unchanged.

Also includes UX polish on the shared SelectTier screen exposed by the
multi-product use case:
- Hide deductible dropdown entirely when only a single option exists
  (instead of rendering it disabled)
- Pre-select the currently-confirmed tier and deductible in the dialog
  radio groups so the existing choice is visible when reopening

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hugokallstrom hugokallstrom changed the title Extract purchase-common module Extract purchase-common module (RND-1965) May 21, 2026
@notion-workspace
Copy link
Copy Markdown

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.

1 participant