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

Fixing embedded pin render issues #1062

Merged
merged 2 commits into from
Dec 10, 2015
Merged

Fixing embedded pin render issues #1062

merged 2 commits into from
Dec 10, 2015

Conversation

kentbrew
Copy link
Contributor

@kentbrew kentbrew commented Dec 3, 2015

Also fixed a remaining stray reference to iframes in the docs.

jparise and others added 2 commits December 3, 2015 12:46
This fixes problems where the renderable context is not `this` instead of the
renderPin() function.

Also, promise to load `structure`, not `image`.
@jmadler
Copy link
Contributor

jmadler commented Dec 8, 2015

ping @erwinmombay

@@ -350,7 +350,7 @@ class AmpPinterest extends AMP.BaseElement {
'?pin_ids=' + pinId +
'&sub=www&base_scheme=https';
return call(query).then(r => {
Copy link
Member

Choose a reason for hiding this comment

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

we can probably just do:

return call(query).then(renderPin.bind(this));

which would get rid of the self param as well.

Copy link
Member

Choose a reason for hiding this comment

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

or change renderPin into an arrow function.

const renderPin = (r) => {
  this.element...
}

call(query).then(renderPin);

then we wouldn't need the bind.

i'm ok with either solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@erwinmombay sorry, but I can't make either of these suggestions work. Help would be welcome, thanks!

Copy link
Member

Choose a reason for hiding this comment

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

@kentbrew this seems to work https://github.com/ampproject/amphtml/pull/1112/files can you try it out and see if it works for you here? if it still doesnt, let me know and lets go with your fix since getting the fix out is probably higher priority.

@erwinmombay
Copy link
Member

@kentbrew looks like #1119 overlaps with this one. feel free to close. Thanks!

@erwinmombay
Copy link
Member

@cramforce @dvoytenko are you guys ok with us merging this so that we can deploy a new release with an unbroken pinterest component. the review on #1119 might take a bit longer.

@dvoytenko
Copy link
Contributor

@erwinmombay Yeah, I'm ok with this.

@erwinmombay
Copy link
Member

LGTM.

erwinmombay added a commit that referenced this pull request Dec 10, 2015
Fixing embedded pin render issues
@erwinmombay erwinmombay merged commit 5d8b894 into ampproject:master Dec 10, 2015
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.

5 participants