feat(announcements): dismissible home announcement carousel - #2484
Conversation
Adds a paged carousel of dismissible announcements on the wallet home, shown between the balance header and the wallet list. Ships two compile-time announcements: a payjoin-privacy nudge (once the wallet has transaction history and payjoin is off) and an autoswap-active notice. Each card is tappable to its target (payjoin/autoswap settings) and dismissible via an explicit x with a Read/Dismiss confirmation; the Read option opens the same target as tapping. Dismissals persist in the dismissed_announcements table with a permanent/snooze policy per announcement. The carousel adapts its height to the text scale and collapses to nothing when no announcement is visible. Built on bull_ui (BullInfoCard + PageView) and wired via a thin cubit that re-evaluates on payjoin-setting changes and wallet-sync completion.
|
@claude review this PR |
|
Claude finished @ethicnology's task in 4m 1s —— View job Code review — feat(announcements): dismissible home announcement carousel
Overall this is a well-structured feature: clean 🔴 Architecture:
|
|
@bullock can you assess and fix the review made in the previous comment ? |
|
🐂 Done — Bullock opened #2497 targeting |
What
Adds a paged carousel of dismissible announcements on the wallet home, shown between the balance header and the wallet list. It ships two compile-time announcements:
How it works
×with a Read / Dismiss confirmation dialog; Read opens the same target as tapping the card.dismissed_announcementstable, with a per-announcement policy (permanent or snooze).bull_ui(BullInfoCard+PageView), wired via a thin cubit that re-evaluates on payjoin-setting changes and on wallet-sync completion (so the payjoin card shows up after a fresh recovery once the wallet syncs).Architecture
Self-contained feature under
lib/features/announcements/following the standardui → cubit → usecase → repository → datasourcelayering:domain/—Announcemententity + catalog (compile-time registry with trigger predicates), sealedAnnouncementsFailure,GetVisibleAnnouncementsUsecase/DismissAnnouncementUsecasereturningResult.data/— dismissal repository + datasource over thedismissed_announcementsDrift table (model + mapper).presentation/— thinAnnouncementsCubit+ state +*_l10nextensions.ui/—AnnouncementCarousel,AnnouncementCard, dismiss dialog.Notes
dismissed_announcementstable ships as part of the v14 migration there, and this feature reads the payjoin-enabled setting introduced by feat(payjoin): settings, DB v14 migration, and live status #2477.HomeWarningsso the nudge lives only in the new carousel.bull_uibarrel gainsPageView,PageController,AnimatedSize,Curves.FEATURES.mdgraph (ANNOUNCEMENTS → SETTINGS,ANNOUNCEMENTS → TX_HISTORY).