Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSTEAM1-623: Render VJ Embeds on .AMP #11148

Merged
merged 26 commits into from
Nov 1, 2023

Conversation

Isabella-Mitchell
Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell commented Oct 23, 2023

Resolves WSTEAM1-677: Render VJ embed on .amp

(Subtask of WSTEAM1-623: Embeds: Optimo VJ interactives embeds .amp)

Overall changes

Render VJ embeds on .amp for Optimo articles. Migrate legacy VjAmp container logic to new AmpIframe component which uses our new component standards.

Screenshot 2023-10-25 at 15 07 48

Code changes

data/...

  • Update aresType to oEmbed in Riddle and Flourish fixture data. (Also update Riddle/Flourish articles to latest BFF output to check for any other changes.)
  • Add VJ .amp article (c578zj113e9o)

AmpIframe/...

  • Refactor legacy containers/include/amp/VJAmp

Embeds/...

  • Create AmpIframeEmbed to handle VJ .amp embed
  • Update src/app/components/Embeds/OEmbed/index.tsx to render AmpIframeEmbed component

Legacy/containers/include/...

  • Remove migrated legacy VjAmp component
  • Update import utilised by CPSAssets

Testing

Pull down this PR and run Simorgh locally
Visit http://localhost:7080/pidgin/articles/c578zj113e9o.amp and see VJ embed asset
Visit http://localhost:7080/pidgin/articles/cqwq7dm61zeo.amp and see error message (Flourish)
Visit http://localhost:7080/pidgin/articles/c39rjygpmv1o.amp and see error message (Riddle)
Visit http://localhost:7080/ukrainian/news-russian-23333960.amp and see VJ embed asset (Story page VJ embed)

Before BFF changes are merged in:
Visit http://localhost:7080/pidgin/articles/c0nzj66vp65o.amp?renderer_env=test to see the error message (as no params are supplied)

After BFF changes are merged in:
Visit http://localhost:7080/pidgin/articles/c0nzj66vp65o.amp?renderer_env=test and see VJ embed asset

Helpful Links

Add Links to useful resources related to this PR if applicable.

UX Specs

Coding Standards

Repository use guidelines

@Isabella-Mitchell Isabella-Mitchell changed the title WSTEAM1-623: VJ Embeds AMP WSTEAM1-623: Render VJ Embeds on .AMP Oct 25, 2023
@Isabella-Mitchell Isabella-Mitchell marked this pull request as ready for review October 25, 2023 14:11

if (isAmp) {
if (isVDJEmbed) {
if (parameters) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've included this so that we don't render nothing at the URL http://localhost:7080/pidgin/articles/c0nzj66vp65o.amp?renderer_env=test

An alternative would be to have if (!parameters) return null. As I understand parameters will always be supplied. soo we could potentially remove this once the BFF changes are merged in.

Copy link
Contributor

@HarveyPeachey HarveyPeachey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, just a few comments

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Looks really good, just a couple of nitpick parts, but nothing stopping it being merged imo.

Copy link
Contributor

@HarveyPeachey HarveyPeachey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Isabella-Mitchell Isabella-Mitchell merged commit 5723935 into latest Nov 1, 2023
@Isabella-Mitchell Isabella-Mitchell deleted the WSTEAM1-623-vj-embeds-amp branch November 1, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants