-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Module - Size Mapping V2 #4690
Module - Size Mapping V2 #4690
Conversation
…hen bidder gets filtered out
…last on incase there are multiple lables present
… of sizeConfig property in addition to doing normal adUnit checks
…y, while keeping in place the essential sizeConfig checks
This comment has been minimized.
This comment has been minimized.
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.
Can you address the LGTM error "1 for Useless assignment to local variable"
Also, can you remove changes to files that that only change formatting (such as adding/removing spaces
in test/spec/unit/pbjs_api_spec.js
)? This is a large PR to review and it would help reviewers so they can focus on the required changes only. I would recommend opening another PR after this that specifically addresses the formatting changes.
@idettman LGTM error should be gone now, and reverted back changes to |
I tested this module locally (with a production setup) and the results are very good. Is there an intent to merge this with Prebid 2.x too? |
Thanks for checking it out @benjaminclot. AFIK, we will merge this with 2.0 as well. |
This comment has been minimized.
This comment has been minimized.
Is this still planned for merging? (I sure do hope so) |
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.
Cook updates look good, but trying to get a passing circleci test, can you try to update your branch with any changes from the remote master?
* 'master' of https://github.com/prebid/Prebid.js: (49 commits) Submitting Clicktripz bid adapter (prebid#4929) add UNICORN bid adapter (prebid#4917) 3.12.0-pre 3.11.0 release Eids liveintent ext fix (prebid#4944) add mediaforce bid adapter (prebid#4933) update logic in adpod module for playersize (prebid#4953) Module - Size Mapping V2 (prebid#4690) Lifestreet adapter 3.0 (prebid#4927) IX Adapter - Increase banner TTL to 300s (prebid#4957) assert string returned not that we break things (prebid#4962) added option to url parser to ignore decoding entire url (prebid#4938) adding user-id support in medianet adapter (prebid#4925) removing the log (prebid#4960) add import extensions (prebid#4959) Add 7xbid adapter to compatible with prebid 3.0 (prebid#4908) Fix failing code-coverage command (prebid#4892) enable no-console eslint rule for project (prebid#4802) update audigent tests to fix larger test suite issue (prebid#4952) use bidId or bidIds in the payload (prebid#4903) ...
* master: (49 commits) Submitting Clicktripz bid adapter (prebid#4929) add UNICORN bid adapter (prebid#4917) 3.12.0-pre 3.11.0 release Eids liveintent ext fix (prebid#4944) add mediaforce bid adapter (prebid#4933) update logic in adpod module for playersize (prebid#4953) Module - Size Mapping V2 (prebid#4690) Lifestreet adapter 3.0 (prebid#4927) IX Adapter - Increase banner TTL to 300s (prebid#4957) assert string returned not that we break things (prebid#4962) added option to url parser to ignore decoding entire url (prebid#4938) adding user-id support in medianet adapter (prebid#4925) removing the log (prebid#4960) add import extensions (prebid#4959) Add 7xbid adapter to compatible with prebid 3.0 (prebid#4908) Fix failing code-coverage command (prebid#4892) enable no-console eslint rule for project (prebid#4802) update audigent tests to fix larger test suite issue (prebid#4952) use bidId or bidIds in the payload (prebid#4903) ...
* implement size bucket filtration logic * finish implmenation of getFilteredMediaTypes * implement getBids function * log useful information to the console * enable test workflow * modify checkAdUnitSetup function to account for the new sizeConfig object * remove unrelated example * add decider function to choose between sizeMapping v1 and sizeMapping v2 * add getBidsHook for s2s bidders * handle edge case where all mediaTypes get filtered out and the case when bidder gets filtered out * add test examples for banner media type * update label check to pick up the fist label operator instead of the last on incase there are multiple lables present * added example for label checks with banner ad * add checkAdUnit setup hook on sizeMappingV2 modules to check presence of sizeConfig property in addition to doing normal adUnit checks * restore old hello world example * give free pass to video mediaTypes configured with sizeConfig property, while keeping in place the essential sizeConfig checks * fixing minor bus and enchancing bidder level sizeConfig checks * bugfix: checkBidderSizeConfigFormat * add more scenarios for testing sizeMapping V2 * small docs changes * feedback1 changes * modify logic for bailing out * add module description * refactor isUsingNewSizeMapping function by making it a pure function * add unit test case for isUsingNewSizeMapping function * made adUnit checks more robusts and fully make adUnit.mediaTypes mandatory * remove redundancy in checAdUnitSetupHook * add banner units test cases for checkAdUnitSetupHook function * add video and native mediaTypes units test for checkAdUnitSetupHook function * rewrite some of the log messages * redefine log messages to make it simple to the end user * code optimization done so that getFilteredMediaTypes function gets called only once per adUnit per auction * add code comments * code refactorization and more unit test cases * more unit tests for getBids function * add sizeMapping usage example * delete sizeMappingV2 directory * add doctype declaration * fix LGTM alert and revert changes to pbjs_api.spec.js * fix LGTM alerts in sizeMappingV2_spec file * add file extension for imports
* implement size bucket filtration logic * finish implmenation of getFilteredMediaTypes * implement getBids function * log useful information to the console * enable test workflow * modify checkAdUnitSetup function to account for the new sizeConfig object * remove unrelated example * add decider function to choose between sizeMapping v1 and sizeMapping v2 * add getBidsHook for s2s bidders * handle edge case where all mediaTypes get filtered out and the case when bidder gets filtered out * add test examples for banner media type * update label check to pick up the fist label operator instead of the last on incase there are multiple lables present * added example for label checks with banner ad * add checkAdUnit setup hook on sizeMappingV2 modules to check presence of sizeConfig property in addition to doing normal adUnit checks * restore old hello world example * give free pass to video mediaTypes configured with sizeConfig property, while keeping in place the essential sizeConfig checks * fixing minor bus and enchancing bidder level sizeConfig checks * bugfix: checkBidderSizeConfigFormat * add more scenarios for testing sizeMapping V2 * small docs changes * feedback1 changes * modify logic for bailing out * add module description * refactor isUsingNewSizeMapping function by making it a pure function * add unit test case for isUsingNewSizeMapping function * made adUnit checks more robusts and fully make adUnit.mediaTypes mandatory * remove redundancy in checAdUnitSetupHook * add banner units test cases for checkAdUnitSetupHook function * add video and native mediaTypes units test for checkAdUnitSetupHook function * rewrite some of the log messages * redefine log messages to make it simple to the end user * code optimization done so that getFilteredMediaTypes function gets called only once per adUnit per auction * add code comments * code refactorization and more unit test cases * more unit tests for getBids function * add sizeMapping usage example * delete sizeMappingV2 directory * add doctype declaration * fix LGTM alert and revert changes to pbjs_api.spec.js * fix LGTM alerts in sizeMappingV2_spec file * add file extension for imports
Type of change
Description of change
Implementation of the new size mapping spec. Find details of the spec here.
#4129 (comment)
sizeConfig
for displaying responsive ads.pbjs.requestBids
.Please read the docs PR to understand how to setup Ad Units using the new sizeConfig.
To load and test the module in isolation, you can run this command.
gulp serve --modules=sizeMappingV2,<insert bidder adapters you want to test>
There is an example to test the module located at
integrationExamples/gpt/responsiveAds_sizeMappingV2.html
. You can modify the parameters and verify.Link to docs PR: prebid/prebid.github.io#1729