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

Implement iframe resizing for amp-ad #1512

Merged
merged 1 commit into from
Jan 22, 2016

Conversation

camelburrito
Copy link
Contributor

@camelburrito
Copy link
Contributor Author

cc @dvoytenko

this.element.setAttribute('height', newHeight);
this.updateHeight_(newHeight);
}
}, /* opt_is3P */true);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: space between comment and true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

@camelburrito camelburrito force-pushed the ampad branch 2 times, most recently from 6d65bf9 to 58960f8 Compare January 22, 2016 03:19
@camelburrito
Copy link
Contributor Author

PTAL (changes to .md file)

An `amp-ad` must have static layout defined as is the case with any other AMP element. However,
it's possible to resize an `amp-ad` in runtime. To do so:

1. The `amp-ad` must be defined with `resizable` attribute;
Copy link
Member

Choose a reason for hiding this comment

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

Where do we enforce this? I think we should not use the attribute here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Iframes do need this as of today (so does my ads implementation),

search for isResizable_

Copy link
Member

Choose a reason for hiding this comment

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

Probably a good idea actually. Make sure to also have the validator changes done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay - will start on the validator right after we get this in.

@camelburrito camelburrito force-pushed the ampad branch 4 times, most recently from 263e627 to c853cf6 Compare January 22, 2016 04:20
@camelburrito
Copy link
Contributor Author

PTAL

@cramforce
Copy link
Member

LGTM

camelburrito pushed a commit that referenced this pull request Jan 22, 2016
Implement iframe resizing for amp-ad
@camelburrito camelburrito merged commit 297765c into ampproject:master Jan 22, 2016
@cramforce
Copy link
Member

Thinking about this some more: How about we do a quick follow up, where we

  • remove the resizable attribute requirement
  • if resizing is denied, just send a quick postMessage back to the frame

That way the ad can handle the expand button itself.

@dvoytenko
Copy link
Contributor

@cramforce discussion has been started here: #1533.

@henel677 henel677 mentioned this pull request Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants