bbc / simorgh

The BBC's Open Source Web Application. Contributions welcome! Used on some of our biggest websites, e.g.
https://www.bbc.com/pidgin
Other
1.41k stars 224 forks source link

Add Most read to PS articles pages (Test environment only) #10016

Closed JonBeeb closed 2 years ago

JonBeeb commented 2 years ago

Is your feature request related to a problem? Please describe. Add most read to PS amp STY pages Most read can be seen on canonical pages on PS (webcore) News: https://www.bbc.co.uk/news/articles/c744mjrym37o Sport: (no most read): https://www.bbc.co.uk/sport/articles/cpgw0xjmpd3o Newsround: (no most read): Cymru Fyw: (no most read) Naidheachdan: (no most read) but is missing from the AMP (Simorgh) News: https://www.bbc.co.uk/news/articles/c744mjrym37o.amp

The rest don't currently have most read but have a config if activated

The configuration for most read in the Simorgh config https://github.com/bbc/simorgh/blob/latest/src/app/lib/config/services/news.js https://github.com/bbc/simorgh/blob/latest/src/app/lib/config/services/sport.js https://github.com/bbc/simorgh/blob/latest/src/app/lib/config/services/newsround.js https://github.com/bbc/simorgh/blob/latest/src/app/lib/config/services/cymrufyw.js https://github.com/bbc/simorgh/blob/latest/src/app/lib/config/services/naidheachdan.js

    mostRead: {
      header: 'Most read',
      lastUpdated: 'Last updated:',
      numberOfItems: 10,
      hasMostRead: true,
    },

Describe the solution you'd like Add most read to the AMP STY pages

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Fallback Don't show component if data fails to load. Might need to show placeholder instead because of the responsive layout. Could use amp-bind to hide the title if data does not load

Other Need to check if PS editorial team to see if they are happy to continue with this.

Testing notes [Tester to complete]

Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc

Checklist

Additional context Add any other context or screenshots about the feature request here.

MuhammadAHussain commented 2 years ago

Blocked until we can find a solution for the CORS issue.

MuhammadAHussain commented 2 years ago

Mozart PR up on TEST