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

Boilerplate change- Switch from using opacity and settimeout to using visibility and keyframe animation. #998

Merged
merged 1 commit into from
Dec 3, 2015

Conversation

camelburrito
Copy link
Contributor

Switch from using opacity and settimeout
to using visibility and keyframe animation. #323
Detailed proposal can be viewed here:
https://docs.google.com/document/d/1gZFaKvcDffceJNaI3bYfuYPtYU5u2y6UhE5wBPTsJ9w

@@ -81,8 +82,11 @@ export function installStyles(doc, cssText, cb, opt_isRuntimeCss) {
export function makeBodyVisible(doc) {
let interval;
const set = () => {

if (doc.body) {
doc.body.style.opacity = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

setStyle(doc.body, {
  opacity: 1,
  visibility: 'visible',
  animation: 'none'
})

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.

Copy link
Member

Choose a reason for hiding this comment

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

dont we want setStyles

@dvoytenko
Copy link
Contributor

All looks great. Just few minor comments. One thing, though, please make the research/spec doc public and link it from the description of this PR.

@@ -82,7 +83,11 @@ export function makeBodyVisible(doc) {
let interval;
const set = () => {
if (doc.body) {
doc.body.style.opacity = 1;
setStyle(doc.body, {
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be setStyles (notice 's')

@dvoytenko
Copy link
Contributor

LGTM once setStyles and tests are fixed.

@jmadler
Copy link
Contributor

jmadler commented Nov 28, 2015

/cc @Meggin, @pbakaus

Will the validator be updated as well?

@amphtml-team
Copy link

Yes. We won't make the change public until the validator is deployed.
On Nov 27, 2015 6:02 PM, "Jordan M. Adler" notifications@github.com wrote:

/cc @Meggin https://github.com/Meggin, @pbakaus
https://github.com/pbakaus

Will the validator be updated as well?


Reply to this email directly or view it on GitHub
#998 (comment).

You received this message because you are subscribed to the Google Groups
"amphtml-eng-github" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to amphtml-eng-github+unsubscribe@google.com.
To post to this group, send email to amphtml-eng-github@google.com.
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c160238038%40github.com
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c160238038%40github.com?utm_medium=email&utm_source=footer
.

You received this message because you are subscribed to the Google Groups
"amphtml-eng" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to amphtml-eng+unsubscribe@google.com.
To post to this group, send email to amphtml-eng@google.com.
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/pull/998/c160238038%40github.com
https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/pull/998/c160238038%40github.com?utm_medium=email&utm_source=footer
.

@jmadler
Copy link
Contributor

jmadler commented Nov 30, 2015

You'll probably need to update the samples as well, so that they'll validate

@amphtml-team
Copy link

Will do
On Nov 30, 2015 8:28 AM, "Jordan M. Adler" notifications@github.com wrote:

You'll probably need to update the samples as well, so that they'll
validate


Reply to this email directly or view it on GitHub
#998 (comment).

You received this message because you are subscribed to the Google Groups
"amphtml-eng-github" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to amphtml-eng-github+unsubscribe@google.com.
To post to this group, send email to amphtml-eng-github@google.com.
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c160679467%40github.com
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c160679467%40github.com?utm_medium=email&utm_source=footer
.

You received this message because you are subscribed to the Google Groups
"amphtml-eng" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to amphtml-eng+unsubscribe@google.com.
To post to this group, send email to amphtml-eng@google.com.
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/pull/998/c160679467%40github.com
https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/pull/998/c160679467%40github.com?utm_medium=email&utm_source=footer
.

@dvoytenko
Copy link
Contributor

@sriramkrish85 This is ready to be merged. Right?

@amphtml-team
Copy link

Yes ,will have to update example files once validator is ready. Else they
will error out !
On Wed, Dec 2, 2015 at 8:57 PM Dima Voytenko notifications@github.com
wrote:

@sriramkrish85 https://github.com/sriramkrish85 This is ready to be
merged. Right?

Reply to this email directly or view it on GitHub
#998 (comment).

You received this message because you are subscribed to the Google Groups
"amphtml-eng-github" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to amphtml-eng-github+unsubscribe@google.com.
To post to this group, send email to amphtml-eng-github@google.com.
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c161514138%40github.com
https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/pull/998/c161514138%40github.com?utm_medium=email&utm_source=footer
.

@dvoytenko
Copy link
Contributor

Let's merge this PR. We will update examples and documentation once validator is ready.

Switch from using opacity and settimeout
to using visibility and keyframe animation.
camelburrito pushed a commit that referenced this pull request Dec 3, 2015
Support for Boilerplate change (Switch from using opacity and settimeout) using visibility and keyframe animation.
@camelburrito camelburrito merged commit 5a2457a into ampproject:master Dec 3, 2015
@adactio
Copy link

adactio commented Feb 1, 2016

I'm not sure this issue should be closed as long as the documentation is still saying that the style with opacity:0 is required:

https://github.com/ampproject/amphtml
https://www.ampproject.org/docs/get_started/create/basic_markup.html

Or should another issue be opened for updating the docs?

@jridgewell
Copy link
Contributor

@adactio: We still have #323 open until the doc updates are in.

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

Successfully merging this pull request may close these issues.

7 participants