Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Module - Size Mapping V2 (prebid#4690)
* 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
- Loading branch information