-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-reddit embeds don't resize correctly #11869
Comments
/to @jridgewell ptal |
There doesn't appear to be any communication between the embed's inner iframe and the embed. I'm not sure how we can support this. /cc @samiamorwas, who wrote the amp-reddit extension. |
I believe I ran into this issue myself, and couldn't find any way to support it at the time. |
This issue hasn't been updated in awhile. @jridgewell Do you have any updates? |
Ran into this today, would love to see if this is on the schedule for fixing. |
It's not prioritized. We'd need someone from reddit to help us figure out their iframe API. |
Hm alright. Well I guess I'll subscribe to this issue and check back in the future. My team will punt on implementing Thanks for the quick response @jridgewell ! |
I just reached out to a contact at Reddit to see if they could send this to the right team for feedback. |
Thanks @Cauchon! |
Update from Reddit:
|
WOO! We can work with http://docs.embed.ly/v1.0/docs/provider-height-resizing! Passing this to @aghassemi |
Thanks @jridgewell and @Cauchon. (a related but separate FYI: We are also working on a generic /to @nainar, Looks like we can now receive resize events and call |
Fixed by #15530 |
@aghassemi I'm still having issues with this embed not resizing its own height correctly and being cut-off or too tall. Here's a JSFiddle showing the issue where it is cut off too soon. I also noticed an edge case where when I resize the window, suddenly it goes from being cut off to being too tall. Is this expected behavior w/ my embed setup or this possibly a bug with the new implementation? Did I miss something in my JSFiddle? |
/to @nainar see comment above from @johnnyshankman . #15530 is in production. |
Hi @johnnyshankman, first of all sorry that your initial complain fell through the cracks on my end. Looking at your demo link. The aspect ratio you have specified is too small which is why the component is being cut off since layout is marked as If you increase the component's height so that it is say |
Closing this as per previous comment, please file any new feedback as issues. Thank you! |
@nainar thank you. We'll have to only use reddit embeds where we can assert the aspect ratio ahead of time. |
i am confused that reddit itself offers an "amp-iframe" tag when getting the embed code for a post. why would they not use their own amp-reddit tag? |
If you use
|
I've created a pull request against the WordPress plug-in to use the amp-embedly-card. Maybe the amp-reddit component needs to not be recommended any longer in the main documentation and recommend embedly instead, as I imagine it would be very difficult to propagate iframe resizing in the current approach where an iframe contains the embedly iframe. |
@nainar This issue should be re-opened. The issue is that the <p>
<code>amp-reddit</code>:
</p>
<amp-reddit
layout="responsive"
data-embedtype="post"
width="100"
height="10"
data-src="https://www.reddit.com/r/me_irl/comments/52rmir/me_irl/?ref=share&ref_source=embed">
</amp-reddit>
<p>
<code>amp-embedly-card</code>:
</p>
<amp-embedly-card
data-url="https://www.reddit.com/r/me_irl/comments/52rmir/me_irl/"
layout="responsive"
width="100"
height="10">
</amp-embedly-card> This is getting rendered as: Notice that the Perhaps there is a discrepancy between the way these two components are sending the resize messages: Lines 86 to 91 in 873708f
Lines 101 to 115 in 873708f
The code in The initial dimensions for this component should be intended for any |
Actually reddit mentioned they are using embedly for embeds. When inspecting the reddit amp embed you can see it's an iframe with another iframe inside of it (maybe it's an embedly inside of a reddit frame). |
Is it possible to rewrite the reddit component to use embedly now that it's the recommended way? |
Or just deprecate the amp reddit component and document the recommendation
for embedly?
…On Wed, May 22, 2019, 23:49 Justin Ridgewell ***@***.***> wrote:
Is it possible to rewrite the reddit component to use embedly now that
it's the recommended way?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11869?email_source=notifications&email_token=AACZX2JCKGI67TKHDVINKY3PWWWVBA5CNFSM4EBP5VK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWAJRMQ#issuecomment-494966962>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACZX2N62YVDPVPTNZVTPRLPWWWVBANCNFSM4EBP5VKQ>
.
|
That would be fine, too. But if it's possible to just upgrade the current |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
What's the issue?
amp-reddit embeds isn't resizing the height of the Reddit embed correctly, causing the bottom of the Reddit embed to get cut off
How do we reproduce the issue?
If this is a bug please provide a public URL and ideally a reduced test case (e.g. on jsbin.com) that exhibits only your issue and nothing else. Then provide step-by-step instructions for reproducing the issue:
Example: http://cauchon.co/reddit.html
What browsers are affected?
All browsers
Which AMP version is affected?
AMP ⚡ HTML – Version 1508794187431
amp-reddit-0.1.js
I believe this has always been broken
The text was updated successfully, but these errors were encountered: