feat(volkskrant): hide subscription upsell (marketing template) banners #46
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #16.
Feature description
de Volkskrant shows subscription upsell through DPG's marketing-template SDK, in several forms:
These are advertising for DPG's own product. Hide them.
The hard paywall on locked articles goes through the same pipeline (the
Fullscreen/isBlockerposition) and must keep working as it does now. This issue removes promotional banners only; it does not change what content is accessible.Findings (7.52.0, unobfuscated)
Resolve
nl.persgroep.edition.temptation.data.repository.MarketingTemplatesRouter.resolveTemplate(...)picksMarketingTemplatesAdapter(the newnet.persgroep.marketingtemplatessdk) orTemptationAdapter(the oldcom.persgroep.temptationsdk) per remote config.FeedViewModel,OverviewPagerViewModel,ArticleViewModel(viaArticleMarketingTemplateLoader),AudioSdkAuthProvider,GameSdkInterfaceProvider,EditionViewModel.State: the single choke point
nl.persgroep.edition.marketingtemplates.presentation.state.MarketingTemplateStateMapperKt.toMarketingTemplateState(ResultOf)returns eitherMarketingTemplateState.Available(ImmutableList<MarketingTemplateViewData>, hasReducedContent)or.None.Positions
MarketingTemplatePosition(canBeDismissed, isBlocker), mapped from the SDK inmarketingtemplates/data/MarketingTemplatesMapperKt.toDomain(MarketingPosition):FullscreenRestrictiveMarketingTemplateArticleInline/ArticleInlineNoIntrohasReducedContent=true; a promo otherwisePageTopPopupDialogMarketingTemplateOverlayBottomSheetMarketingTemplateToastSnackBarMarketingTemplateFullscreenOverlayFullScreenOverlayMarketingTemplateArticleViewModel.checkMarketingTemplateAndRenderArticleblocks the article for anyisBlockertemplate.Rendering
marketingtemplates/presentation/ui/MarketingTemplatePresenterKt.MarketingTemplatePresenter.ui/inline/MarketingTemplateInlinePresenterKt, plusMarketingTemplateInlineViewStateMapper(INLINE_POSITIONS= PageTop, ArticleInline, ArticleInlineNoIntro).GlobalMarketingTemplatePresenterKt/GlobalMarketingTemplateViewModel.Not a banner
nl.persgroep.edition.externaloffersis Google Play's external-offers billing link-out (ExternalOffersStartupTask,LaunchExternalOfferUseCase). Leave it alone.Approach
toMarketingTemplateState, filter the template list:Popup,Overlay,Toast,FullscreenOverlayandPageTop;ArticleInline*only whenhasReducedContent == false;Fullscreen.Nonewhen nothing is left.hasReducedContentidentifies the inline paywall is an assumption (it isn't read elsewhere). Verify on the device with a locked article, logged out, before relying on it.Done when
docs/apps/volkskrant.md.Midas Settings
hide_subscription_banners), category "Advertenties en promotie", default on. Same key as De Gelderlander.toMarketingTemplateStatefilter at runtime. Applies on the next resolve.Fullscreengate is never affected, whatever the toggle says.