feat(volkskrant): add feed, overview and article block filters #19
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#19
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
Several roadmap issues need to drop specific tiles or blocks from de Volkskrant:
All three content surfaces already have a mapper that drops
null, so one small infrastructure patch can give each of them a type filter.Findings (7.52.0, all unobfuscated)
Home feed tiles
nl.persgroep.edition.teasers.data.converters.SectionDtoToModelExtensionsKt.toModel(TileDto, TrackingData): Tile.toModel(SectionDto, int)already drops null. It returns null forUnknownTileDto, logging "Unknown tile type encountered"."advertisement"(AdvertisementTileDto);"pushCategoryBox"(SubscribableCategoriesTileDto);TeaserDestination.Game(set inSectionDtoToModelExtensionsKt.getDestinationfromgameIdentifier).Overview pages
nl.persgroep.edition.overview.presentation.model.OverviewViewDataMapper.map(OverviewPage)and its privatetoViewData(OverviewPageComponent, String, int)already return null forUnknown, and nulls are dropped.InlineMessage(the audio page onboarding hint), added inGetOverviewPageUseCase.Article body
nl.persgroep.edition.article.data.converters.ArticleBodyBlockDtoMapper.invoke(List<BlockDto>): List<Block>.Block.Unknown: unknown blocks trigger the "update app" banner (#23).GoogleSourceButtonblocks are injected separately, byarticle/data/converters/GoogleSourceButtonBlockInjector(shouldInject).Approach
Done when
patch-install.ps1 -NoInstallapplies on 7.52.0.docs/apps/volkskrant.mddocuments the three filter points.Midas Settings
The filters decide at runtime, through Midas Settings (#49). Each filterable type belongs to a toggle from the issue that asks for it.
MidasSettings' in-memory cache; the feed and article mappers are hot paths.