Bug/#12185 - Refactor content policy status settings in RRM#12318
Bug/#12185 - Refactor content policy status settings in RRM#12318
Conversation
Update to use new content policy state and policy info link as individual settings.
…tate and info link formats.
… info link handling.
…nd policyInfoLink values after synchronization.
… status migration.
… content policy status migration and database version updates.
…icyState' and 'policyInfoLink'.
…te and policyInfoLink into distinct settings. Remove getContentPolicyState manual selector.
…cyInfoLink validation, including new invariant error checks.
…nd policyInfoLink into distinct settings.
…nd policyInfoLink into distinct settings.
…lude contentPolicyState and policyInfoLink as an object.
…olicyState and policyInfoLink, removing contentPolicyStatus object for clarity.
… and policyInfoLink into distinct settings.
…State and policyInfoLink, removing the contentPolicyStatus object for improved clarity.
… policyInfoLink, removing the contentPolicyStatus object.
…olicyInfoLink, removing the contentPolicyStatus object.
…icyState and policyInfoLink, removing the contentPolicyStatus object for improved clarity.
|
Storybook is ready:
|
|
Build files for 4433218 are ready:
|
|
Size Change: 0 B Total Size: 2.31 MB ℹ️ View Unchanged
|
📚 Storybook for 6d3cd6f: 📦 Build files for 6d3cd6f:
🎭 Playwright reports for 6d3cd6f: |
nfmohit
left a comment
There was a problem hiding this comment.
Thank you for your work on this, @hussain-t.
This PR mostly looks good to me, except for one fundamental concern regarding the default value for policyInfoLink, which I've expanded in a comment below.
Please let me know if you have any thoughts, thanks!
…RMSetupSuccessSubtleNotification tests.
…eader_Revenue_Manager class.
…RM settings class.
…arious test cases.
d7bdd35 to
6d3cd6f
Compare
nfmohit
left a comment
There was a problem hiding this comment.
Thank you for updating the PR, @hussain-t.
I'm afraid I have found another related bug. Steps to reproduce:
- Set up RRM with a publication that has a policy violation (with a policy info link, of course).
- Go to Site Kit Settings -> Reader Revenue Manager and change the publication to one that does not have a policy violation (with a
nullpolicy info link). - Observe that the "Confirm changes" CTA is disabled, because RRM tries to set
policyInfoLinktonull, butvalidateCanSubmitChangesonly accepts a string for it (which is correct).
A solution to this could include (but may not be limited to) updating the selectPublication action to set policyInfoLink to an empty string if it is anything but a string.
Could you kindly look into this? Thanks!
Summary
Addresses issue:
Relevant 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