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

Remove mediaQuery declaration as an empty string in sizeConfig #4810

Closed
Fawke opened this issue Feb 3, 2020 · 3 comments
Closed

Remove mediaQuery declaration as an empty string in sizeConfig #4810

Fawke opened this issue Feb 3, 2020 · 3 comments
Assignees
Labels
pinned won't be closed by stalebot

Comments

@Fawke
Copy link
Contributor

Fawke commented Feb 3, 2020

Type of issue

Bug

Description

Under the current design (as of v3.x), a publisher can declare mediaQuery string as empty in global sizeConfig object.

The implication of this is inconsistent behaviour when a publisher chooses to declare mediaQuery as an empty string, the current implementation may choose wrong Ad size for a given viewport size. For details and an example, click here.

Related - #4691

A fix could be to completely block empty mediaQuery string declaration. Since this solution could be a breaking change for some publishers who're already using empty mediaQuery declaration in sizeConfig, the change should go in the next major release.

@Fawke Fawke added 4.0 API Change pinned won't be closed by stalebot labels Feb 3, 2020
@gglas
Copy link

gglas commented Feb 22, 2021

@Fawke hey Neelanjen -- did 4691 resolve this issue and we can close it out?

@Fawke
Copy link
Contributor Author

Fawke commented Feb 23, 2021

@gglas Hi Gareth - No, we didn't resolve this issue in #4691. It was a breaking change, so @mkendall07 suggested the change should go out as part of a next major release. It was supposed to be 4.0, but that didn't happen. We can include in now, in 5.0. It's a small edge case in the core sizesMapping module which can lead to some unexpected behaviour.

@patmmccann
Copy link
Collaborator

Closing with the merge to 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned won't be closed by stalebot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants