-
Notifications
You must be signed in to change notification settings - Fork 230
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
LiveRadio Refactor Regarding Ares Response #6207
Conversation
@@ -1395,7 +1395,7 @@ exports[`Given I am on the Korean Live Radio page When I view the source code in | |||
</footer> | |||
</div> | |||
<script> | |||
window.SIMORGH_DATA={"status":200,"pageData":{"content":{"blocks":[{"text":"BBC 코리아 라디오","markupType":"plain_text","type":"heading","uuid":"mock-uuid"},{"text":"세계와 한반도 뉴스를 공정하고 객관적으로 전달해 드립니다","type":"paragraph","uuid":"mock-uuid"},{"id":"mock-id","subType":"primary","format":"audio","externalId":"bbc_korean_radio","duration":"PT0S","caption":"","embedding":false,"available":true,"live":true,"type":"version","uuid":"mock-uuid"}]},"metadata":{"id":"mock-id","locators":{"pipsUrn":"urn:bbc:pips:bbc_korean_radio"},"type":"WS-LIVE","createdBy":"korean","language":"ko","lastUpdated":0,"firstPublished":0,"lastPublished":0,"options":{},"analyticsLabels":{"pageTitle":"BBC 코리아 라디오 - BBC News 코리아","pageIdentifier":"korean.bbc_korean_radio.liveradio.page","producerId":"57","contentType":"player-live","producer":"KOREAN"},"tags":{},"version":"1.1.2","blockTypes":["heading","version","paragraph"]},"promo":{"name":"BBC 코리아 라디오","summary":"세계와 한반도 뉴스를 공정하고 객관적으로 전달해 드립니다","uri":"/korean/bbc_korean_radio/liveradio","contentType":"WS-LIVE","id":"mock-id","type":"link"},"relatedContent":{"site":{"subType":"simple","name":"korean","uri":"/korean","type":"simple"},"groups":[]}},"path":"/korean/bbc_korean_radio/liveradio","timeOnServer": "mock-time"} | |||
window.SIMORGH_DATA={"status":200,"pageData":{"content":{"blocks":[{"text":"BBC 코리아 라디오","markupType":"plain_text","type":"heading","uuid":"mock-uuid"},{"text":"세계와 한반도 뉴스를 공정하고 객관적으로 전달해 드립니다","type":"paragraph","uuid":"mock-uuid"},{"id":"mock-id","subType":"primary","format":"audio","externalId":"bbc_korean_radio","duration":"PT0S","caption":"","embedding":false,"available":true,"live":true,"type":"version","uuid":"mock-uuid"}]},"language":"ko","id":"mock-id","name":"BBC 코리아 라디오","summary":"세계와 한반도 뉴스를 공정하고 객관적으로 전달해 드립니다","pageTitle":"BBC 코리아 라디오 - BBC News 코리아","contentType":"player-live","pageIdentifier":"korean.bbc_korean_radio.liveradio.page"},"path":"/korean/bbc_korean_radio/liveradio","timeOnServer": "mock-time"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow. didn't realise this strategy would also cut down on the size of this object that hydrates the page on the client. For some pages it's absolutely huge. this is cool 😄
Chartbeat requires further testing on AMP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good!
Nice 👍 |
Oh, one thought I just had - will this log statement still output WS-LIVE -> Line 283 in eaaeed4
I expect the see the following output in the logs:
|
No, it won't get the pageType for liveradio or onDemand radio |
😢 |
Preparation for #6134
Overall change:
Refactoring to only pass the required values to page components instead of the full Ares response
Code changes:
Testing:
CYPRESS_APP_ENV=local CYPRESS_SMOKE=false npm run test:e2e:interactive
)