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
Rendered A4A ad is never assigned the "amp-animate" CSS class #7846
Comments
to @dvoytenko |
What is not clear from the a4a spec is whether the amp-animate class should be added by amp at runtime once the ad has been loaded, or if this class should already be present in the ad html and the runtime just has the option of removing it if it wants to stop animations. It could be just my misunderstanding of intended behavior. |
Lets clarify in the spec that this SHOULD be present in the markup. @lannka While we don't yet remove this, we should at least add it. |
@cramforce on which element do we recommend to put this |
yes, that would be better.
…On Wed, Mar 1, 2017 at 8:18 PM, Hongfei Ding ***@***.***> wrote:
@cramforce <https://github.com/cramforce> on which element do we
recommend to put this amp-animate class? Actually wouldn't it be better
for runtime to insert amp-animate to body element when the creative is
ready to animate?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7846 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFeTzU7vgxw4rpGw94KvDIUcGd3aYxgks5rhkMkgaJpZM4MO81f>
.
|
@cramforce to let AMP have full control over what and when to animate, shall we actually enforce "no amp-animate class in any elements" in the document? |
An alternative concept:
|
We should switch to the concept recommended by @dvoytenko. This is just way better. |
@aghassemi mentioned that setting See this example, which works properly everywhere but on iOS. |
@alanorozco @dvoytenko do you want to summarize the conclusion and action items here? |
@alanorozco Will test couple more situations. But we are leaning toward wild-card control that's completely automatic. |
Apologies for moving slowly on this. As this change involves low-level changes to the runtime, we've been trying to make this decision with care as not to affect usage or performance in a significant way. We ran benchmarks on the performance of three different types of lock selectors. The methodology for the benchmarks is described here and a full comparison table is here. We've decided to go for a wildcard lock. This means that no special considerations (like marking elements with a specific classname) need to be made from the document author's side. The validator does not yet reflect this, so it will need to be updated before CSS animations are fully supported. |
🥇 |
@alanorozco would you like to close this and create a new issue for validator changes? |
May I ask when the validator change will happen? |
To @alanorozco |
* Initial commit. * Perform animationend listener registration only once (for easier debugging). (cherry picked from commit 8cf7cab2b09b5ac3ea0216266e69e05a3d5f9983) * Simplify enable/disable. (cherry picked from commit d5c2343ef4642d9e828ebb2faf9c81bfbb3cd321) * Send original event detail with triggered timeline event. (cherry picked from commit 7f6463eda5ca2cd6cf9a2cf2b340bd67c885817d) * Missed test updates for timeline events. * Sync/updates with upstream. gotoAndPause bug fix. * Added attr spec to validator rules. * Removing initial setEnabled(false) call, pending integration. * Minor style cleanup in test. * Added experiment flag. (cherry picked from commit 7c1426bc0f6c131cdfea7cfba01b3b0cdf9cd3d0) * Renamed imported constants. (cherry picked from commit ce42c0c02478795851c70232c00a54ea60565726) * Misc. cleanup for PR. * Moved validator rules up one directory. * Comment/spacing fixes. * Fixed linter errors. * Removed protoascii file for now, pending tests. * Reverted package metadata file changes. * Added spec and cleanup issue to experiment metadata. * Unit test improvements and cleanup. * amp-gwd-animation style and misc. cleanup. Dispatch runtime events on root node instead of win. * Whitelisted amp-gwd-animation for amp4ads and added validator rules file. * Disable event animations too. * Use AMP.registerServiceForDoc to register the amp-gwd-animation service. * Added ActionService.setActions method. Misc. cleanup. * Fixed flaky gotoAndPause unit test. * Fixed linter error. * Added #7846 ref in runtime enable TODOs.
Validator changes are live. |
This issue hasn't been updated in awhile. @alanorozco Do you have any updates? |
Hi, I'm seeing an issue with A4A animations not running on iOS (#15260) . Can't quite work out whether it is related to this issue, so thought I'd flag it. Thanks |
This issue hasn't been updated in awhile. @alanorozco Do you have any updates? |
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. |
I managed to successfully serve an a4a ad using Cloudflare's network implementation. The ad validates and renders in a friendly iframe, but animations never start because in a4a they only run when the "amp-animate" CSS class is present, and this class is never added by amp runtime.
Searching through amphtml code base reveals that the string "amp-animate" does not appear outside of a4a validator code. Has adding of this class to rendered a4a creatives not been implemented yet?
The text was updated successfully, but these errors were encountered: