Skip to content
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

fix: re-design companions config #34

Merged
merged 4 commits into from
Dec 11, 2017

Conversation

dan-ziv
Copy link
Contributor

@dan-ziv dan-ziv commented Nov 26, 2017

Description of the Changes

Previous structure:
companions: { testCompanionSquare: { width: 300, height: 250, sizeCriteria: 'SELECT_EXACT_MATCH' } }
New structure:
companions: { ads: { testCompanionSquare: { width: 300, height: 250, } }, sizeCriteria: 'SELECT_EXACT_MATCH' }

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@dan-ziv dan-ziv self-assigned this Nov 26, 2017
@dan-ziv dan-ziv changed the title fix: align companions config structure to player studio fix: re design companions config Dec 5, 2017
src/ima.js Outdated
selectionCriteria.resourceType = this._sdk.CompanionAdSelectionSettings.ResourceType.ALL;
selectionCriteria.creativeType = this._sdk.CompanionAdSelectionSettings.CreativeType.ALL;
const sizeCriteria = this.config.companions.sizeCriteria;
switch (sizeCriteria) {
Copy link
Contributor

@yairans yairans Dec 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary switch-case. just pass the sizeCriteria as is.
selectionCriteria.sizeCriteria = this._sdk.CompanionAdSelectionSettings.SizeCriteria[sizeCriteria] || this._sdk.CompanionAdSelectionSettings.SizeCriteria.SELECT_EXACT_MATCH

@OrenMe
Copy link
Contributor

OrenMe commented Dec 10, 2017

@dan-ziv @yairans what is the status of this PR?

@dan-ziv dan-ziv closed this Dec 10, 2017
@dan-ziv dan-ziv reopened this Dec 10, 2017
@dan-ziv dan-ziv changed the title fix: re design companions config fix: redesign companions config Dec 10, 2017
@dan-ziv dan-ziv changed the title fix: redesign companions config fix: re-design companions config Dec 10, 2017
@dan-ziv
Copy link
Contributor Author

dan-ziv commented Dec 10, 2017

@yairans fixed according to your comment, please review

@dan-ziv dan-ziv closed this Dec 10, 2017
@dan-ziv dan-ziv reopened this Dec 10, 2017
@dan-ziv dan-ziv merged commit 75b2463 into master Dec 11, 2017
@dan-ziv dan-ziv deleted the align-companions-to-studio-structutre branch December 11, 2017 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants