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

Core: support for expandable / flex slots #12379

Merged
merged 9 commits into from
Mar 7, 2025
Merged

Conversation

dgirardi
Copy link
Collaborator

Type of change

  • Feature

Description of change

This adds better support for banner slots with flexible sizes:

  • publishers can now specify an ortb format array instead of sizes for an ad unit's mediaTypes.banner; expdir can also be supplied there for convenience (alias of ortb2Imp.banner.expdir);
  • bid adapters can reply with wratio/hratio instead of width and height;
  • because many adapters expect specific sizes, format elements that only specify wratio/hratio are translated to "placeholder" sizes (e.g. {wratio: 2, hratio: 1} becomes [2, 1]);
  • creatives now attempt to expand to all the available width/height when rendering a bid that has no definite size.

Other information

#9361

src/prebid.js Outdated
logWarn(`Ad unit banner.format specifies both w/h and wratio/hratio`, adUnit);
return false;
}
return (w ?? h ?? wratio ?? hratio) != null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't we check that w AND h aren't null or wratio AND hratio aren't null ? Instead of having just one non null value

@patmmccann patmmccann requested review from jsnellbaker and removed request for Fawke February 12, 2025 17:36
@patmmccann patmmccann assigned jsnellbaker and unassigned Fawke Feb 12, 2025
@patmmccann patmmccann linked an issue Feb 12, 2025 that may be closed by this pull request
Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

From what I can tell, I think this looks good. As I mentioned in the last PMC, I don't have a real flex creative to test with - so hopefully another reviewer would be able to check that aspect.

@patmmccann
Copy link
Collaborator

@JulieLorin could you weigh in? Thanks! Is your feedback addressed

Copy link
Collaborator

@JulieLorin JulieLorin left a comment

Choose a reason for hiding this comment

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

@JulieLorin could you weigh in? Thanks! Is your feedback addressed

It is ! LGTM

Copy link

github-actions bot commented Mar 7, 2025

Tread carefully! This PR adds 26 linter errors (possibly disabled through directives):

  • modules/debugging/bidInterceptor.js (+26 errors)

Copy link

github-actions bot commented Mar 7, 2025

Tread carefully! This PR adds 18 linter errors (possibly disabled through directives):

  • modules/debugging/bidInterceptor.js (+18 errors)

@patmmccann patmmccann merged commit 1519fdd into prebid:master Mar 7, 2025
7 checks passed
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.

Full width expandable banner mobile ads
6 participants