guardian / content-api-scala-client

A Scala client library for the Guardian's Content API
Apache License 2.0
40 stars 16 forks source link

Render obituary letters as letters #364

Closed DanielCliftonGuardian closed 2 years ago

DanielCliftonGuardian commented 2 years ago

Co-Authored-By: Ashleigh Carr ashcorr20@gmail.com Co-Authored-By: Ioanna Kokkini ioannakok@users.noreply.github.com

What does this change?

This change renders obituary letters as letters and resolves issue https://github.com/guardian/dotcom-rendering/issues/5628.

Have we considered potential risks?

The following filter function was chosen to prevent possible side effects of changing the order of the predicates list. val isObituary: ContentFilter = content => (tagExistsWithId("tone/obituaries")(content) && !tagExistsWithId("tone/letters")(content))

However we could not find any articles that shared the tags in the hierarchy between obituaries and letters and simply changing the order may be a better more implicit implementation.

Images

image image
JamieB-gu commented 2 years ago

@DanielCliftonGuardian @AshCorr @ioannakok was this released independently or did it go out as part of the 19.0.4 version that @alinaboghiu and @rowannekabalan released?