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

Remove experimental flag from visibility triggers and add documentation. #3512

Merged
merged 4 commits into from
Jun 16, 2016

Conversation

avimehta
Copy link
Contributor

@avimehta avimehta commented Jun 9, 2016

@dvoytenko
Copy link
Contributor

@avimehta I see experiment itself is removed, but I don't see where it's cleaned.

Assigning to @rudygalfi for docs review.

Use this configuration to fire a request when the page becomes visible. No further configuration is required.
Use this configuration to fire a request when the page becomes visible. The firing of this trigger can be configured using `visibilitySpec`. Configuration properties supported in `visibilitySpec` are:
- `selector` This property can be used to specify the element to which all the `visibilitySpec` conditions apply.
- `continuousTimeMin` and `continuousTimeMax` These conditions keep track of the amount of time (any part of) an element has been in the viewport and fire when the time is between the minimum and maximum configured time. The time is expressed in milliseconds.
Copy link
Contributor

Choose a reason for hiding this comment

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

These properties indicate that a request should be fired when (any part of) and element has been within the viewport between the minimum and maximum specified times. The times are expressed in milliseconds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps even clearer:

These properties indicate that a request should be fired when (any part of) and element has been within the viewport for a continuous amount of time that is between the minimum and maximum specified times. The times are expressed in milliseconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@rudygalfi
Copy link
Contributor

LGTM on docs with a few minor comments

@avimehta
Copy link
Contributor Author

@rudygalfi You LGTM'ed it but pinging you just in case you want to take a second look.

@dvoytenko This is ready for your review.

@dvoytenko
Copy link
Contributor

LGTM from my side.

@rudygalfi
Copy link
Contributor

@dvoytenko @avimehta Is this ready to be submitted? It looks like Travis failed.

@avimehta
Copy link
Contributor Author

@rudygalfi looking into the test failures. Will update soon.

@Gueorgi
Copy link

Gueorgi commented Jul 26, 2016

The call https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/0.1/visibility-impl.js#L243 results in undefined for simple buttons (just text, no image etc.) that are valid in AMP. The next line breaks of course on res.getId(); since res is undefined. I think the same happens for img, links etc. About the only thing that seems to work is "amp-img" with real resource (i.e. if it refers to delete image it still fails). Simple buttons, links and img (not amp-img) etc. should work with this but they don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants