{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/77839613","id":77839613,"diff_hunk":"@@ -130,6 +130,22 @@ Here are some factors that affect whether the resize will be executed:\n - Whether the resize is requested for a currently active ad;\n - Whether the resize is requested for an ad below the viewport or above the viewport.\n \n+\n+### Support for variable size ad requests\n+In order to support multi-size ad requests, AMP accepts an optional `data` param to `window.context.renderStart` which will automatically invoke request resize with the width and height passed.\n+In case the resize is not successful, AMP will horizontally and vertically center align the creative within the space initially reserved for the creative.\n+This utility makes it convenient for ad networks to support mult-size ad requests in AMP.\n+#### Example\n+```javascript\n+window.context.renderStart(data);","path":"ads/README.md","position":11,"original_position":11,"commit_id":"0bbd6b5d0f5a27cfcd9157efa8314a171efec9df","original_commit_id":"c80948972d19940f8ae209f07cb4027480022410","user":{"login":"yieldmo-rao","id":15096783,"avatar_url":"https://avatars.githubusercontent.com/u/15096783?v=3","gravatar_id":"","url":"https://api.github.com/users/yieldmo-rao","html_url":"https://github.com/yieldmo-rao","followers_url":"https://api.github.com/users/yieldmo-rao/followers","following_url":"https://api.github.com/users/yieldmo-rao/following{/other_user}","gists_url":"https://api.github.com/users/yieldmo-rao/gists{/gist_id}","starred_url":"https://api.github.com/users/yieldmo-rao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yieldmo-rao/subscriptions","organizations_url":"https://api.github.com/users/yieldmo-rao/orgs","repos_url":"https://api.github.com/users/yieldmo-rao/repos","events_url":"https://api.github.com/users/yieldmo-rao/events{/privacy}","received_events_url":"https://api.github.com/users/yieldmo-rao/received_events","type":"User","site_admin":false},"body":"@jasti That is correct; I'm talking about ad units that start off with one size, and then expand to a different size at a later stage in their lifecycle (mostly because of user initiated interaction). We have a few units that do that, and I've noticed similar formats being provided by other platforms as well. Although it might be a little redundant, I think it might be helpful to clarify that one might still need to support the `resizeRequest` API (and all the UX and creative additions that go along with it), to ensure that the format works as expected.","created_at":"2016-09-07T14:59:34Z","updated_at":"2016-09-07T14:59:34Z","html_url":"https://github.com/ampproject/amphtml/pull/4831#discussion_r77839613","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4831","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/77839613"},"html":{"href":"https://github.com/ampproject/amphtml/pull/4831#discussion_r77839613"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4831"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/4831","id":84019071,"html_url":"https://github.com/ampproject/amphtml/pull/4831","diff_url":"https://github.com/ampproject/amphtml/pull/4831.diff","patch_url":"https://github.com/ampproject/amphtml/pull/4831.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/4831","number":4831,"state":"open","locked":false,"title":"Doc update to support multi-size ad requests","user":{"login":"jasti","id":2366341,"avatar_url":"https://avatars.githubusercontent.com/u/2366341?v=3","gravatar_id":"","url":"https://api.github.com/users/jasti","html_url":"https://github.com/jasti","followers_url":"https://api.github.com/users/jasti/followers","following_url":"https://api.github.com/users/jasti/following{/other_user}","gists_url":"https://api.github.com/users/jasti/gists{/gist_id}","starred_url":"https://api.github.com/users/jasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasti/subscriptions","organizations_url":"https://api.github.com/users/jasti/orgs","repos_url":"https://api.github.com/users/jasti/repos","events_url":"https://api.github.com/users/jasti/events{/privacy}","received_events_url":"https://api.github.com/users/jasti/received_events","type":"User","site_admin":false},"body":"Doc update for AMP work required for supporting #3176.\r\nActual support will ship in a follow up PR by @zhouyx / @lannka \r\nFYI @cramforce ","created_at":"2016-09-05T15:42:19Z","updated_at":"2016-09-07T14:59:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cc08f95c4b1f8dd445d5af56d36a9aadfef2848","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4831/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4831/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/4831/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/0bbd6b5d0f5a27cfcd9157efa8314a171efec9df","head":{"label":"jasti:multi-size_doc_update","ref":"multi-size_doc_update","sha":"0bbd6b5d0f5a27cfcd9157efa8314a171efec9df","user":{"login":"jasti","id":2366341,"avatar_url":"https://avatars.githubusercontent.com/u/2366341?v=3","gravatar_id":"","url":"https://api.github.com/users/jasti","html_url":"https://github.com/jasti","followers_url":"https://api.github.com/users/jasti/followers","following_url":"https://api.github.com/users/jasti/following{/other_user}","gists_url":"https://api.github.com/users/jasti/gists{/gist_id}","starred_url":"https://api.github.com/users/jasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasti/subscriptions","organizations_url":"https://api.github.com/users/jasti/orgs","repos_url":"https://api.github.com/users/jasti/repos","events_url":"https://api.github.com/users/jasti/events{/privacy}","received_events_url":"https://api.github.com/users/jasti/received_events","type":"User","site_admin":false},"repo":{"id":50957333,"name":"amphtml","full_name":"jasti/amphtml","owner":{"login":"jasti","id":2366341,"avatar_url":"https://avatars.githubusercontent.com/u/2366341?v=3","gravatar_id":"","url":"https://api.github.com/users/jasti","html_url":"https://github.com/jasti","followers_url":"https://api.github.com/users/jasti/followers","following_url":"https://api.github.com/users/jasti/following{/other_user}","gists_url":"https://api.github.com/users/jasti/gists{/gist_id}","starred_url":"https://api.github.com/users/jasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasti/subscriptions","organizations_url":"https://api.github.com/users/jasti/orgs","repos_url":"https://api.github.com/users/jasti/repos","events_url":"https://api.github.com/users/jasti/events{/privacy}","received_events_url":"https://api.github.com/users/jasti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasti/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/jasti/amphtml","forks_url":"https://api.github.com/repos/jasti/amphtml/forks","keys_url":"https://api.github.com/repos/jasti/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasti/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasti/amphtml/teams","hooks_url":"https://api.github.com/repos/jasti/amphtml/hooks","issue_events_url":"https://api.github.com/repos/jasti/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/jasti/amphtml/events","assignees_url":"https://api.github.com/repos/jasti/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/jasti/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/jasti/amphtml/tags","blobs_url":"https://api.github.com/repos/jasti/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasti/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasti/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasti/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasti/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/jasti/amphtml/languages","stargazers_url":"https://api.github.com/repos/jasti/amphtml/stargazers","contributors_url":"https://api.github.com/repos/jasti/amphtml/contributors","subscribers_url":"https://api.github.com/repos/jasti/amphtml/subscribers","subscription_url":"https://api.github.com/repos/jasti/amphtml/subscription","commits_url":"https://api.github.com/repos/jasti/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasti/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasti/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasti/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasti/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/jasti/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasti/amphtml/merges","archive_url":"https://api.github.com/repos/jasti/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasti/amphtml/downloads","issues_url":"https://api.github.com/repos/jasti/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/jasti/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/jasti/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/jasti/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasti/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/jasti/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/jasti/amphtml/deployments","created_at":"2016-02-02T22:43:43Z","updated_at":"2016-02-02T22:43:45Z","pushed_at":"2016-09-07T14:54:28Z","git_url":"git://github.com/jasti/amphtml.git","ssh_url":"git@github.com:jasti/amphtml.git","clone_url":"https://github.com/jasti/amphtml.git","svn_url":"https://github.com/jasti/amphtml","homepage":"https://ampproject.org","size":153761,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"d084ee388ea8dd5db847ba37b3aa161716bfd15a","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-09-07T11:36:24Z","pushed_at":"2016-09-07T14:54:29Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":196851,"stargazers_count":8405,"watchers_count":8405,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1230,"mirror_url":null,"open_issues_count":721,"forks":1230,"open_issues":721,"watchers":8405,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4831"},"html":{"href":"https://github.com/ampproject/amphtml/pull/4831"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/4831"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/4831/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4831/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4831/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/0bbd6b5d0f5a27cfcd9157efa8314a171efec9df"}}}}
{"actor":{"display_login":"yieldmo-rao"}}