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

Contxtful Rtd Provider : add ad unit positions #12792

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sebastienrufiange
Copy link
Contributor

Type of change

  • Feature

Description of change

This PR adds support for passing ad unit positions using ortb2Imp

Copy link

Tread carefully! This PR adds 1 linter error (possibly disabled through directives):

  • modules/contxtfulRtdProvider.js (+1 error)

@sebastienrufiange sebastienrufiange changed the title Contxtful Rtd Provider - Ad Unit Positions Contxtful Rtd Provider - Feature Ad Unit Positions Feb 19, 2025
@sebastienrufiange sebastienrufiange marked this pull request as ready for review February 20, 2025 00:24
@sebastienrufiange sebastienrufiange marked this pull request as draft March 4, 2025 15:08
@sebastienrufiange sebastienrufiange marked this pull request as ready for review March 4, 2025 20:35
@ChrisHuie ChrisHuie self-requested a review March 6, 2025 16:48
@ChrisHuie ChrisHuie self-assigned this Mar 6, 2025
@ChrisHuie ChrisHuie changed the title Contxtful Rtd Provider - Feature Ad Unit Positions Contxtful Rtd Provider : add ad unit positions Mar 6, 2025
return elementCss.display !== 'none';
}

function getElementFromTopWindowRecurs(element, currentWindow) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are very expensive layout calculations, are there similar calculations you might be able to import or reuse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @patmmccann for the review!
That's a good point -- Actually the first thing we did is to seek for such reusable functions, but we discovered that many RTD and bid adapters implement their own ways, with different variations.

In particular, many uses the getBoundingClientRect function.
Concerning the approach here, Adagio RTD also does the same thing with the getElementFromTopWindow function.

Copy link
Collaborator

Choose a reason for hiding this comment

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

please see #12848 ; curious for your feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @patmmccann for highlighting PR #12848; it’s a great starting point for enhancing reusability.

While it addresses a core aspect of ad position retrieval, additional work is needed for modules like ours to reduce more than just a few lines of code. I’d prefer not to block the merging of this PR while we wait for the other one, but if you believe we can get both merged in the next release, I can make the necessary changes.

If merging the other PR would delay things too much, could we proceed with this one? I’d be happy to assist with the other PR or create a new one to adapt after both are merged and available.

Thanks a lot!

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

Successfully merging this pull request may close these issues.

4 participants