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

AMP integration with Holder #6024

Merged
merged 44 commits into from Nov 9, 2016
Merged

AMP integration with Holder #6024

merged 44 commits into from Nov 9, 2016

Conversation

AntonOrnatskyi
Copy link
Contributor

Please check the Holder (ukrainian ad network) implementation for amp-ad

I have a Google Individual CLA.
Anton Ornatskyi

AntonOrnatskyi and others added 30 commits October 15, 2016 22:51
Draft w/o lib
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Lint checked
Banner received
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Draft w/o lib
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
Lint checked
Banner received
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@AntonOrnatskyi AntonOrnatskyi reopened this Nov 4, 2016
@googlebot
Copy link

CLAs look good, thanks!

@AntonOrnatskyi
Copy link
Contributor Author

CLA completed

@erwinmombay
Copy link
Member

/to @zhouyx @lannka

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

I noticed a slight delay between render-start and real ad rendering. Can you check if the render-start is called at the right place?


ibillboard: {},
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: keep the blank line after ibillboard

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

export function holder(global, data) {
validateData(data, ['block'], ['ampSlotIndex']);
const wcl = global.context.location,
n = navigator.userAgent;
Copy link
Contributor

Choose a reason for hiding this comment

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

either end the previous line with ';', or indent 2 more spaces 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.

Fixed

const wcl = global.context.location,
n = navigator.userAgent;
let l = '&r' + Math.round((Math.random() * 10000000));
l += '&' +
Copy link
Contributor

Choose a reason for hiding this comment

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

merge into the previous line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

l += '&' +
'h' + wcl.href;
if (!(n.indexOf('Safari') != -1 &&
n.indexOf('Chrome') == -1)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

move to previous line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@AntonOrnatskyi
Copy link
Contributor Author

/to @lannka Sorry, I put render-start as close to end of ad request as possible now.

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

I still see a half-second delay between loading indicator and ad render. it is a white blank.

* @param {!Object} data
*/
export function holder(global, data) {
validateData(data, ['block'], ['ampSlotIndex']);
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for ampSlotIndex. it's a known bug, you can ignore the harmless console error for now.

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

@AntonOrnatskyi
Copy link
Contributor Author

AntonOrnatskyi commented Nov 7, 2016

I still see a half-second delay between loading indicator and ad render. it is a white blank.

It's best I can achieve for now. :(
For better performance and for noContentAvailable() realisation I have to modify ad-server back-end
and I'll do it in the one of next updates in the near future.

@AntonOrnatskyi
Copy link
Contributor Author

AntonOrnatskyi commented Nov 8, 2016

@lannka Is it possible to merge PR 'as is' before I'd update back-end? Or I can remove render-start support until back-end will not support it.

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

Sure. That works

@lannka lannka merged commit 67a27d0 into ampproject:master Nov 9, 2016
@AntonOrnatskyi
Copy link
Contributor Author

Thanks I'll add noContentAvailable() and make render-start faster in the week or two.

dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Nov 15, 2016
* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* preconnect

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Final, ready to PR

* Draft w/o lib

Final version, ready to PR

* Final version, ready for PR

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* PR candidate

* Final, ready to PR

* Final ready to PR

* Cookie request removed

* var document - removed

* Syntax fixes

* ampSlotIndex removed
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* preconnect

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Final, ready to PR

* Draft w/o lib

Final version, ready to PR

* Final version, ready for PR

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* PR candidate

* Final, ready to PR

* Final ready to PR

* Cookie request removed

* var document - removed

* Syntax fixes

* ampSlotIndex removed
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* preconnect

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Draft w/o lib

Draft w/o lib

* Fix

* Trying to setup local dev
Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Draft

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Dropbox

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* config

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* Worked simple version

Lint checked
Banner received

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* First PR candidate

* Final, ready to PR

* Final, ready to PR

* Draft w/o lib

Final version, ready to PR

* Final version, ready for PR

* holderamp lib v1

Signed-off-by: Anton Ornatskyi <a.ornatskyi@digital.umh.ua>

* PR candidate

* Final, ready to PR

* Final ready to PR

* Cookie request removed

* var document - removed

* Syntax fixes

* ampSlotIndex removed
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.

None yet

5 participants