frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Add logic to onwards picker

Open jamesgorrie opened this issue 2 years ago • 1 comments

What does this change?

Fixes: https://github.com/guardian/dotcom-rendering/issues/5566

We are looking at using the URL pattern to unblock the fronts work and then work on the agents. The agents would use any services we write to render these routes, so there should be minimal / no waste in code.

This adds the logic that in mostly stored in OnwardsUpper.importable.tsx.

The formatString is a bit odd, but it's needed as we lose context of the article when bouncing from frontend => DCR => fetch(frontend) => POST DCR. It will disappear once these are rendered server side as we will be able to use the format in OnwardsPicker directly with the agents.

I've added a CSROnwardsCollectionResponse as it will never have trails, and OnwardCollectionResponse should never have a url.

jamesgorrie avatar Sep 07 '22 10:09 jamesgorrie

I've added a CSROnwardsCollectionResponse as it will never have trails

Will DCR use the other properties of the CSROnwardsCollectionResponse (i.e. heading, format, etc.) in the current implementation?

bryophyta avatar Sep 07 '22 12:09 bryophyta

Closing as we are changing tact on this.

jamesgorrie avatar Sep 27 '22 08:09 jamesgorrie