feat(gelderlander): hide cross-promotion and region promotion #40

Closed
opened 2026-10-10 12:23:08 +02:00 by midas · 0 comments
Owner

Part of #16. Depends on #18.

Feature description

De Gelderlander shows promotion for other content and other titles:

  • "read also" cross-promotion blocks in articles (some with ad slots inside);
  • recommendation blocks from other DPG media;
  • a "choose your region" promo in the feed.

Make these hideable, ideally one option per kind, because some users like the "read also" links.

Findings (9.21.1)

Article

  • CrossPromotionComponent maps in g20.a to i30.j(id, sectionId, personalised).
  • Its teasers are loaded by vf2 (CrossPromotionTeasersRepositoryImpl, anchor "com.kubus.module.article.data.repository.CrossPromotionTeasersRepositoryImpl$getCrossPromotionTeasers$1") through Retrofit tf2. g20.e(CrossPromotionTeasersResponse) maps them.
  • Each CrossPromotionItem becomes either:
    • ArticleTeaserComponent (pf2.b); or
    • CrossPromotionAdvertisementComponent (pf2.a(slotId)), which is an ad slot inside the block.
  • CrossPromotionBasic (ArticlesCrossPromotion / VideoCrossPromotion / ADCrossPromotion) sits inside RecommendationResponse and is mapped by private g20.c(CrossPromotionBasic): j20.a, which returns null for unknown types.
    • ADCrossPromotion is an ad slot.

Other media

  • UitAndereMedia (an article component with a brand) has no explicit branch, so it falls into the "unsupported" mapping i30.u0. Check whether it renders anything at all.
  • UAM (Metadata.uam) and com.popular.core.model.data.UitAndereMedia (rendered in vs1) are "from other media" source labels. Probably keep these; they are attribution.

Feed

  • RegionPromotionTeaser (TeaserType regionPromotion) is enriched in y8b.o (SectionViewModel).
  • RecommendationBlockTeaser (recommendations) is rendered by daa.k.

Approach

  • Always drop CrossPromotionAdvertisementComponent and ADCrossPromotion, because they are ads. These belong in Hide ads.
  • Make the rest options:
    • "Hide 'read also' blocks": CrossPromotionComponent, ArticlesCrossPromotion, VideoCrossPromotion.
    • "Hide region promotion": RegionPromotionTeaser.
    • Possibly "Hide recommendations": RecommendationBlockTeaser.

Done when

  • Build passes; patch applied on 9.21.1.
  • Device check (after asking) per option.
  • Documented in docs/apps/gelderlander.md.

Midas Settings

These toggles replace the options suggested above. Category "Inhoud":

Toggle Key Default
Verberg "Lees ook"-blokken hide_read_also off
Verberg regio-promotie hide_region_promo on
Verberg aanbevelingen hide_recommendations off
  • Ad slots inside cross-promotion (CrossPromotionAdvertisementComponent, ADCrossPromotion) have no toggle. They are always hidden by Hide ads.
  • Read in the filters (#18). Needs #49 and #51.
Part of #16. Depends on #18. ## Feature description De Gelderlander shows promotion for other content and other titles: - "read also" cross-promotion blocks in articles (some with ad slots inside); - recommendation blocks from other DPG media; - a "choose your region" promo in the feed. Make these hideable, ideally one option per kind, because some users like the "read also" links. ## Findings (9.21.1) ### Article - `CrossPromotionComponent` maps in `g20.a` to `i30.j(id, sectionId, personalised)`. - Its teasers are loaded by `vf2` (CrossPromotionTeasersRepositoryImpl, anchor `"com.kubus.module.article.data.repository.CrossPromotionTeasersRepositoryImpl$getCrossPromotionTeasers$1"`) through Retrofit `tf2`. `g20.e(CrossPromotionTeasersResponse)` maps them. - Each `CrossPromotionItem` becomes either: - `ArticleTeaserComponent` (`pf2.b`); or - `CrossPromotionAdvertisementComponent` (`pf2.a(slotId)`), which is **an ad slot inside the block**. - `CrossPromotionBasic` (`ArticlesCrossPromotion` / `VideoCrossPromotion` / `ADCrossPromotion`) sits inside `RecommendationResponse` and is mapped by private `g20.c(CrossPromotionBasic): j20.a`, which returns null for unknown types. - `ADCrossPromotion` is an ad slot. ### Other media - `UitAndereMedia` (an article component with a `brand`) has no explicit branch, so it falls into the "unsupported" mapping `i30.u0`. Check whether it renders anything at all. - `UAM` (`Metadata.uam`) and `com.popular.core.model.data.UitAndereMedia` (rendered in `vs1`) are "from other media" source labels. Probably keep these; they are attribution. ### Feed - `RegionPromotionTeaser` (TeaserType `regionPromotion`) is enriched in `y8b.o` (SectionViewModel). - `RecommendationBlockTeaser` (`recommendations`) is rendered by `daa.k`. ## Approach - Always drop `CrossPromotionAdvertisementComponent` and `ADCrossPromotion`, because they are ads. These belong in **Hide ads**. - Make the rest options: - "Hide 'read also' blocks": `CrossPromotionComponent`, `ArticlesCrossPromotion`, `VideoCrossPromotion`. - "Hide region promotion": `RegionPromotionTeaser`. - Possibly "Hide recommendations": `RecommendationBlockTeaser`. ## Done when - [ ] Build passes; patch applied on 9.21.1. - [ ] Device check (after asking) per option. - [ ] Documented in `docs/apps/gelderlander.md`. ## Midas Settings These toggles replace the options suggested above. Category "Inhoud": | Toggle | Key | Default | | --- | --- | --- | | **Verberg "Lees ook"-blokken** | `hide_read_also` | off | | **Verberg regio-promotie** | `hide_region_promo` | on | | **Verberg aanbevelingen** | `hide_recommendations` | off | - Ad slots inside cross-promotion (`CrossPromotionAdvertisementComponent`, `ADCrossPromotion`) have no toggle. They are always hidden by **Hide ads**. - Read in the filters (#18). Needs #49 and #51.
midas closed this issue 2026-10-10 20:59:21 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
midas/midas-patches#40
No description provided.