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
[DRAFT] <amp-embed type="insticator"> #23928
[DRAFT] <amp-embed type="insticator"> #23928
Conversation
…l-setup draft implementation of amp-embed type insticator
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. 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. ℹ️ Googlers: Go here for more info. |
ads/insticator.js
Outdated
}; | ||
|
||
// ------- HELPER FUNCTIONS ------- // | ||
function createInitialMarkup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for flexibility in a long run, I suggest you only leave config related logic in this file, and move logic to /amp-embed-lib/insticator.js
as much as possible.
Currently the ads won’t render because the boilerplate HTML they get appended to is not a valid AMP. Because the only alternative way of implementing this functionality that we see now is to consider once again |
@lannka Any help you can provide on the above would be great. We're starting to get under the gun in terms of our build effort here. Need to start making consistent forward progress now. |
@lannka Maybe we can just hop on a call if you're open to that? That may speed up the process and make this easier for all of us. |
@lannka Please advise on the best course of action here |
@lannka Can we just get on a call to hash this out? We can probably clear this up very quickly and move forward. This starting and stopping of development is hurting our progress and we have very real business needs we're trying to meet here. |
This back and forth messaging feels a bit slow and unproductive. A call would help expedite this process. We have technical concerns with |
sorry for the delay. VC sounds good. Are you in GMT+3? I'm in PST. Try to find a good time for both. |
BTW, inside the iframe, why do you still need |
Thanks for the response. We're EST. If you have time tomorrow that would be great. How's 4:30pm EST? |
chatted over VC, meeting notes:
|
…ads the traditional way
Utilizing existing header/body code setup to generate embed and ads
- Cleaned up unnecessary code references - Removed unnecessary preconnects - Updated documentation slightly
Dynamically pulling data attributes and fully cleaned up code
…Updated documentation slightly.
…r ads code for passing to providers
Passing top level domain to insticator ads code
hey @calebcordry I added these 2 addresses to the group. Do we need to do anything else to pass this check? |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@calebcordry CLAs signed. We good to go? |
ads/insticator.js
Outdated
validateData(data, ['siteId', 'embedId']); | ||
|
||
// create insticator markup | ||
global.document.getElementById('c').appendChild(createTemplate(data['embedId'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: linter wants these on new lines. If you run gulp lint
it will show these errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Another NIT linter issue
@calebcordry Great! Thanks! Excited! |
Oddly, requesting the set of reviews from the GitHub API for this PR yields the following series of states: [ [ 'COMMENTED', 'lannka' ],
[ 'DISMISSED', 'lannka' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'lannka' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'calebcordry' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'triso07' ],
[ 'COMMENTED', 'calebcordry' ] ] Investigating why GitHub thinks you haven't approved @calebcordry |
@calebcordry @rcebulko Had to make some minor updates to the .md read me file. Sorry for that. Anyway we can review those and merge? |
@triso07 do you have an open PR? |
@calebcordry We do now ;) |
* UNSTABLE: added new amp-embed type, insticator * Utilizing our standard header and body code to generate ads (instead of AMP ads) * Commenting out extraneous helper functions now that we're generating ads the traditional way * commented out logs * - Added site id param - Cleaned up unnecessary code references - Removed unnecessary preconnects - Updated documentation slightly * further cleaning the code * Changed append location of markup to be more inline with other code. Updated documentation slightly. * minor text change to documentation * hooking up to available API and passing top level domain to insticator ads code for passing to providers * Passing AMP embed API to insticator code so we can resize when needed * initial round of AMP requested adjustments to our code * No longer creating script tags then appending them, instead just executing the functions * removed unnecessary function * removed extraneous helper function * changed var to const * Removing unnecessary library call. Using dummy embed instead of real one. * Implemented renderStart method per AMP request * Fixed all reported linting issues * Embed was not loading correctly before. Using a to reference Insticator object so we pass linter and embed works correctly * Updated Copyright year * removed loadScript (thought this was necessary from AMPs side) * removed import for loadScript since no longer using it * added /*OK*/ to template as requested * Removed URL helper var since no longer being used in multiple places. Instead hardcoding URL in string. * Using /*OK*/ for innerHTML as AMP requires this * Starting at 850 as that is our standard for embed with ads (resize will be requested if necessary) * Capitalized E in element * using bracket notation to reference data attributes per AMP request * Additional bracket instead of dot notation reference * forgot the tick marks when accessing property via brackets * Another NIT linter issue
This is a draft implementation of
<amp-embed type=“insticator”>
.The intended functionality is described in #23257.
We need technical advice before going further.
Implementation descriptionю
The
<amp-embed>
creates an iframe with a boilerplate document inside.We add three children to the
div#c
in that document in the following order:*amp-ad which holds the upper ad
*iframe which holds our embed
*amp-ad which holds the lower ad
cc @lannka