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

Create Picture Design #387

Closed alinaboghiu closed 1 year ago

alinaboghiu commented 1 year ago

What does this change?

  1. Adding picture design type for use by picture content
  2. Ensuring picture content is showcase and gallery is immersive

Why

In DCR we use Design, Display and Theme to render the content, and Image articles are no exception. This was probably missed when the initial list of design types was created.

Gallery and Images also have a fixed display type, of immersive and showcase respectively. This is not controlled in composer, and instead is based on the content type. So including this logic here.

JamieB-gu commented 1 year ago

Gallery and Images also have a fixed display type, of immersive and showcase respectively. This is not controlled in composer, and instead is based on the content type. So including this logic here.

If the large main media designs of Gallery and Picture are defined by Design, do we need to set immersive or showcase?

alinaboghiu commented 1 year ago

If the large main media designs of Gallery and Picture are defined by Design, do we need to set immersive or showcase?

I really think we should, as this is more semantic. I think it's a cleaner way of indicating what the intention in the tools is. Otherwise we would be coupling the design type to the display in DCR and if that were to change it would be much harder to unpick. i.e. if we don't do this, we's have to pass the design type into the "decideDisplay" logic which is not nice