guardian / frontend

The Guardian DotCom.
https://theguardian.com
Other
5.84k stars 554 forks source link

Spike Image Carousel to figure out how much work it is #27395

Open JamieB-gu opened 1 month ago

JamieB-gu commented 1 month ago

Notes on the Image Carousel spike: https://docs.google.com/document/d/1YVzvcqsmQIcTFWPEolMCzYqxLQIEjbhUc69Ys7IrPnk/edit?usp=sharing

Spike branch: https://github.com/guardian/dotcom-rendering/tree/jm/spike-image-carousel

arelra commented 2 weeks ago

@jamesmockett fyi previously raised carousel bugs which might factor into this estimate:

https://github.com/guardian/dotcom-rendering/issues/11466 https://github.com/guardian/dotcom-rendering/issues/10246 https://github.com/guardian/dotcom-rendering/issues/8070

jamesmockett commented 1 week ago

Product / design questions

Technical questions

jamesmockett commented 3 days ago

Response from Charlotte:

  1. Does it need any Dynamo styling changes? (Fairground removed Dynamo styling everywhere, but then reinstated it so I'm not sure of the state of this.) The current slideshow component simply relocates the image caption from the bottom to the top, but we now also have pagination indicators and controls sitting below the image.

Dynamo does still exist as a concept but some of the dynamo special styling has been removed in work the Fairground team have done in relation to card designs.

To clarify, the "dynamo" is the first or main story in a dynamic/package container. The equivalent to this in the new world is flexible/special.

  1. What are the boost, boosted, mega boosted and giga boosted sizes mentioned in the designs? Are these new container types? Are there any other related Fairground changes we need to be aware of?

There is a new, optional field available on the DCRFrontCard type in DCR called "boostLevel". The legacy field is called "isBoosted". boostLevel has the following options: "default", "boost", "megaboost", "gigaboost":

export type BoostLevel = 'default' | 'boost' | 'megaboost' | 'gigaboost';

The boost level determines the size of the headline and image for cards. You can think of megaboost as a proxy for the legacy combination of "isBoosted" and "showBoostedHeadline".

gigaboost is only available on splash cards (the main story) for the new flexible/general and flexible/special containers (which exist in DCR but are not yet production-ready).

You can find the designs here https://www.figma.com/design/uNL0UL65eoC80JPrglYrAx/Flexible-Containers?node-id=6307-21824 but I'm very happy to talk the WebEx team through these if needed!

There is a document here https://docs.google.com/presentation/d/1SXME3h3QiXVhgGWvz3bu4MwZ5lSFB1wqcpZvizE80kc/edit?usp=sharing created to aid knowledge-sharing between the WebEx and Fairground teams.

  1. Is the slideshow intended to be only used for the main story (e.g. biggest card in the container), or will it also appear at smaller sizes further down the page? If so, what happens with the pagination indicators and controls as space will be constrained?

I think that slideshow will be possible in the following scenarios for all breakpoints:

jamesmockett commented 3 days ago

And a further clarification:

Standard cards are not large enough to have a slideshow in as a standard card must be boosted in order to be large enough to show a slideshow. It is not possible to boost standard cards in a flexible/special container.