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

Prebid Core: use gptSlot.updateTargetingFromMap than gptSlot.setTargeting in targeting.resetPresetTargeting #7552

Merged
merged 95 commits into from
Oct 18, 2021

Conversation

pm-harshad-mane
Copy link
Contributor

@pm-harshad-mane pm-harshad-mane commented Oct 7, 2021

Type of change

  • [ X ] Code style update (formatting, local variables)

Description of change

gptSlot.updateTargetingFromMap can be used to set multiple targeting key-value pairs using an object.
It is better than calling gptSlot.setTargeting multiple times.
This PR makes change in targeting.resetPresetTargeting to use gptSlot.updateTargetingFromMap

Relates to #7416 and #7453

@pm-harshad-mane
Copy link
Contributor Author

Hello @ChrisHuie ,
Can you please review the PR?

@ChrisHuie ChrisHuie changed the title use gptSlot.updateTargetingFromMap than gptSlot.setTargeting in targeting.resetPresetTargeting Prebid Core: use gptSlot.updateTargetingFromMap than gptSlot.setTargeting in targeting.resetPresetTargeting Oct 12, 2021
@ChrisHuie ChrisHuie requested a review from osazos October 12, 2021 14:35
@pm-harshad-mane
Copy link
Contributor Author

Thank you @ChrisHuie ,
@osazos can you please review the change?

@ChrisHuie ChrisHuie added the needs 2nd review Core module updates require two approvals from the core team label Oct 13, 2021
@pm-harshad-mane
Copy link
Contributor Author

@osazos can you please review the PR?

@pm-harshad-mane
Copy link
Contributor Author

Hello @patmmccann ,
Could you please review the code changes?

@patmmccann
Copy link
Collaborator

I defer to @r-schweitzer on this one, as he has done more research on it than myself

@patmmccann patmmccann requested a review from a user October 14, 2021 18:46
@pm-harshad-mane
Copy link
Contributor Author

Hi @r-schweitzer ,
Could you please review the PR?

src/targeting.js Outdated
}
});
// reset only registered adunits
adUnits.forEach(function(unit) {
Copy link

Choose a reason for hiding this comment

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

I realize the code was previously like this but since we're updating here do we want to be consistent and use arrow functions? Is there a reason we wouldn't want to use the arrow function here and in the other instances where we're updating?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@r-schweitzer , changed the functions to arrow functions 👍

Copy link

Choose a reason for hiding this comment

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

Hey sorry I didn't get back to you on this sooner. I wasn't working by the time you responded and was out yesterday. I see it got merged and reviewed though 👍

@ChrisHuie ChrisHuie removed the request for review from osazos October 15, 2021 13:12
@osazos osazos self-requested a review October 18, 2021 06:58
Copy link
Collaborator

@osazos osazos left a comment

Choose a reason for hiding this comment

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

LGTM

@osazos osazos self-requested a review October 18, 2021 07:18
@ChrisHuie ChrisHuie removed the needs 2nd review Core module updates require two approvals from the core team label Oct 18, 2021
@ChrisHuie ChrisHuie merged commit e59a314 into prebid:master Oct 18, 2021
@pm-harshad-mane
Copy link
Contributor Author

Thank you @ChrisHuie and @osazos !

cpabst pushed a commit to sovrn/Prebid.js that referenced this pull request Jan 10, 2022
…ting in targeting.resetPresetTargeting (prebid#7552)

* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* import utils functions as needed and not the whole module

* import utils functions as needed and not the whole module

* import utils functions as needed and not the whole module

* Revert "import utils functions as needed and not the whole module"

This reverts commit bc6c9f6.

* Revert "import utils functions as needed and not the whole module"

This reverts commit ef500ab.

* Revert "import utils functions as needed and not the whole module"

This reverts commit 7e3fa3f.

* use updateTargetingFromMap than setTargeting in targeting.resetPresetTargeting

* indent

* using arrow functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants