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

Corrects logic error with visibilityPercentageMin/Max #12451

Merged

Conversation

jonkeller
Copy link
Contributor

@jonkeller jonkeller commented Dec 13, 2017

Ignore the ton of commits - I had a little trouble initially with rebasing onto changes I made to this file a couple hours ago.

@jonkeller jonkeller changed the title Iframe transport documentation 2 Corrects logic error with visibilityPercentageMin/Max Dec 13, 2017
@@ -375,7 +375,7 @@ The `visibilitySpec` is a set of conditions and properties that can be applied t
- `waitFor` This property indicates that the visibility trigger should wait for a certain signal before tracking visibility. The supported values are `none`, `ini-load` and `render-start`. If `waitFor` is undefined, it is defaulted to [`ini-load`](#initial-load-trigger) when selector is specified, or to `none` otherwise.
- `continuousTimeMin` and `continuousTimeMax` These properties indicate that a request should be fired when (any part of) an 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. The `continuousTimeMin` is defaulted to 0 when not specified.
- `totalTimeMin` and `totalTimeMax` These properties indicate that a request should be fired when (any part of) an element has been within the viewport for a total amount of time that is between the minimum and maximum specified times. The times are expressed in milliseconds. The `totalTimeMin` is defaulted to 0 when not specified.
- `visiblePercentageMin` and `visiblePercentageMax` These properties indicate that a request should be fired when the proportion of an element that is visible within the viewport is between the minimum and maximum specified percentages. Percentage values between 0 and 100 are valid. Note that the lower bound (`visiblePercentageMin`) is inclusive while the upper bound (`visiblePercentageMax`) is not. When these properties are defined along with other timing related properties, only the time when these properties are met are counted. They default to 0 and 100 when not specified.
- `visiblePercentageMin` and `visiblePercentageMax` These properties indicate that a request should be fired when the proportion of an element that is visible within the viewport is between the minimum and maximum specified percentages. Percentage values between 0 and 100 are valid. Note that the upper bound (`visiblePercentageMax`) is inclusive while the lower bound (`visiblePercentageMin`) is not. When these properties are defined along with other timing related properties, only the time when these properties are met are counted. They default to 0 and 100 when not specified.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Motivation:
#12426 (comment)

@keithwrightbos keithwrightbos merged commit 1dc9ff0 into ampproject:master Dec 13, 2017
@lannka
Copy link
Contributor

lannka commented Dec 14, 2017

@jonkeller do you want to update the doc for the 0 and 100 edge cases?

@jonkeller
Copy link
Contributor Author

jonkeller commented Dec 15, 2017

do you want to update the doc for the 0 and 100 edge cases?

Will do.

gzgogo pushed a commit to gzgogo/amphtml that referenced this pull request Jan 26, 2018
* One possible fix to min viz 100

* Undo commit to master

* Adds documentation of iframe transport

* Adds note to why-not-iframe about iframe transport

* Fix typo in link

* Implements review feedback

* Adds 2 sentences on prioritization

* Corrects logic error in doc

* Adds documentation of iframe transport

* Adds note to why-not-iframe about iframe transport

* Fix typo in link

* Implements review feedback

* Corrects logic error in doc
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.

None yet

7 participants