-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sponsorship packages #508
Sponsorship packages #508
Conversation
Build won't pass until thrift change is released
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.
tested in CODE - all working nicely AFAICT
Code LGTM and I learnt that return false
from a component (as you have done) is better than return null
when you don't want the component to render anything.
render () { | ||
|
||
if (!this.props.sponsorship) { | ||
return false; |
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.
if you want it to render nothing, I think returning null is better to avoid false
being printed to the screen
return false; | |
return null; |
Well, TIL https://medium.com/@davidkelley87/stop-using-return-null-in-react-a2ebf08fc9cd
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.
So I should stick with return false
? Most of this was copy+pasted from SponsorshipPackageType.react.js
What does this change?
Creates a new sponsorship attribute called
sponsorshipPackage
. This is to allow the US Ads team to sell sponsorships under the ‘Advertising partner’ or ‘Exclusive advertising partner’ labels. These labels will never be applied to Foundation funded journalism.An update to our externally facing content funding guidelines will be published before this change is used.
How to test
Cannot be tested until tags-thrift-schema PR is released. See guardian/tags-thrift-schema#43
How can we measure success?
US ads team are able to create new sponsorships that meet their requirements.
Have we considered potential risks?
Existing tags will continue to have no value for this field until they are first edited. This is captured as an Option value in Scala and an optional field in thrift.
Images
Creating a sponsored tag
Before
After
Editing a sponsored tag
Before
After
Accessibility