Releases: KijijiCA/react-advertising
Bug Fix
Updating Ad Config
You can now update the AdvertisingProvider
by re-rendering it with a different configuration prop than before.
When the AdvertisingProvider
receives a new config prop, it will automatically tear down GPT and Prebid and set them up again with the updated configuration, causing all the ad slots in the container to get refreshed with new ads according to the new config.
- See documentation
Thanks Jason Li for implementing this!
Breaking Change
In previous versions, if the config
prop for the AdvertisingProvider
changed, this was ignored,
now it causes GPT and Prebid to be re-initialized and ad slots to be refreshed with the updated config.
While we believe this to be the desired effect, some users may depend on the old “ignorant” behavior,
hence we decided to roll out this change as a major release.
Async Provider Rendering
You can now render the AdvertisingProvider
without a config prop. This is useful when you
load the ad config asynchronously and don't want to block initial page render.
- See documentation
- See issue #10
Thanks Jason Li for implementing this!
Security Chores
Dependency update to fix security issues found by npm audit
Slim npm Packages
Removed tests, snapshots and other superfluous files from npm package
Prop Types Update for Responsive Prebid
- added
prebid.sizeConfig
to advertising config prop type - added
prebid.bids.labelAny
andprebid.bids.labelAll
to advertising slot config prop type
Responsive Prebid Ads
- removed obsolete prebid size mapping code that doesn't work with Prebid 1
Improved Support for Responsive Prebid Ads
- removed obsolete prebid size mapping code that doesn't work with Prebid 1
- added
prebid.sizeConfig
to advertising config prop type - added
prebid.bids.labelAny
andprebid.bids.labelAll
to advertising slot config prop type
Plugin Lifecycle Phase “displaySlots”
Added “displaySlots” to plugin lifecycle phases. You can now write plugins that contain code which is executed after GPT was initialized, immediately before slots are displayed.
Allow Size “fluid”
Adjusted config prop type for size mapping config, now allowing string for named sizes (i.e. fluid
)