Repository navigation
Enhancement/13737 - Implement the GET:cta datapoint and getCTA() selector for Reader Revenue Manager - #14248
Conversation
📚 Storybook for be676fd:
📦 Build files for be676fd:
🖼️ VRT report for be676fd:
🎭 Playwright reports for be676fd:
|
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to fetch a single Call to Action (CTA) by its ID within the Reader Revenue Manager module. On the PHP side, it registers a new GET:cta datapoint (Get_CTA class) and adds corresponding integration tests. On the JavaScript side, it extends the CTAs datastore with a new getPublicationCTA fetch store, a getCTA selector, and a resolver to handle single CTA retrieval, caching them in a new ctasByID state slice. Extensive Jest tests have been added to cover various scenarios for the new selector and resolver. There are no review comments provided, and I have no additional feedback to offer as the implementation is clean, well-tested, and adheres to the repository's guidelines.
|
Size Change: 0 B Total Size: 3.59 MB ℹ️ View Unchanged
|
ankitrox
left a comment
There was a problem hiding this comment.
Great work @hussain-t. I have added one very minor comment on this PR for your consideration after which this is good to go to MR.
Thank you.
| state.ctasByID[ publicationID ] = { | ||
| ...state.ctasByID[ publicationID ], | ||
| }; |
There was a problem hiding this comment.
I think this would be simpler with immer.
| state.ctasByID[ publicationID ] = { | |
| ...state.ctasByID[ publicationID ], | |
| }; | |
| state.ctasByID[ publicationID ] ??= {}; |
There was a problem hiding this comment.
Thanks @ankitrox, updated to use ??=. I made the same change in the single CTA reducer too.
ankitrox
left a comment
There was a problem hiding this comment.
Thank you @hussain-t , all looks good!
Moving to MR 🚀
nfmohit
left a comment
There was a problem hiding this comment.
Thanks @hussain-t! I've left a few small comments for your consideration. Please let me know if you have any questions or concerns, thank you!
Summary
Related issue(s):
GET:ctadatapoint andgetCTA()selector for Reader Revenue Manager #13737Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist