Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Flying Carpet collapsing empty ad slot is broken #19297
The spec'd behavior of flying carpet is that when a child element collapses due to no-content, the flying carpet is supposed to also collapse. For instance, when an amp-ad gets an empty response and attempts to collapse (when outside viewport) the flying carpet should also collapse. However, this functionality is broken. In my testing just now, it seems that mutateWorkViaResources is not working as intended. Let me describe the flow.
WHAT SHOULD HAPPEN
WHAT IS ACTUALLY HAPPENING
It seems to me that the way that flying carpet works was perhaps changed? At this stage, the amp-ad inside the flying carpet is position fixed so that it's always in the viewport (even when the flying carpet window is out of viewport / you can't see any of the amp-ad)
I am able to reproduce the issue and locate the cause. The reason why
One thing I can do is to always collapse the ad in this case, because collapsing a position fixed element won't cause a page jump. However this won't work if the
For this specific use case. I don't believe there are multiple child elements involved. (As
@jridgewell Does that sounds good to you? Thank you
@zhouyx THANK YOU! I've been trying to accomplish this for over a year. Much appreciated.
here's a test page with a no-fill as the only child of the flying-carpet:
Thank you @coreybyrnes for the test page.
Here's the example use case
@jridgewell If you agree with proposal, do you think we should force collapse all component if it is the only child of
referenced this issue
Nov 21, 2018
@coreybyrnes Thanks for reaching out and noticing!
So we cut releases once a week, but firs they go through one week of canary, and then on the second week go to prod.
But since this is the holiday time, I know we are going to have some short freezes. But on average, it takes about 2 weeks from when an issue is closed / PR is merged, before hitting production
Let me know if you have any more questions, feel free to reach out!