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

Add snaps property to app-header #99

Merged
merged 1 commit into from
Mar 8, 2016
Merged

Add snaps property to app-header #99

merged 1 commit into from
Mar 8, 2016

Conversation

blasten
Copy link
Contributor

@blasten blasten commented Mar 4, 2016

  • New snaps property for app-header.
    I added it to the shrine template and it looks much better. cc @keanulee

Small breaking change: the event app-header-transform is gone and should be replaced by adding a scroll event listeners to the header's scroll target.

@blasten blasten removed the cla: no label Mar 4, 2016
@blasten blasten force-pushed the header-snap branch 2 times, most recently from f08dafc to b14ea1e Compare March 4, 2016 03:11
@keanulee keanulee changed the title Add snaps property to app-header [DO NOT MERGE] Add snaps property to app-header Mar 4, 2016
@blasten blasten force-pushed the header-snap branch 6 times, most recently from 4c11624 to 6228144 Compare March 4, 2016 22:43
@blasten blasten changed the title [DO NOT MERGE] Add snaps property to app-header Add snaps property to app-header Mar 4, 2016
@blasten blasten self-assigned this Mar 4, 2016
@blasten blasten removed the cla: no label Mar 4, 2016
@blasten blasten assigned frankiefu and unassigned blasten Mar 4, 2016
@@ -381,9 +407,8 @@
this._layoutIfDirty();
}
// restore no transition
this.disabled = savedDisabled;
this.disabled = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to remove savedDisabled? If so, remove that variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@blasten
Copy link
Contributor Author

blasten commented Mar 4, 2016

Also, I just tested everything in IOWA.

*/
snaps: {
type: Boolean,
reflectToAttribute: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need reflectToAttribute? I don't see any style rules for [snaps]...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it doesn't

@@ -52,7 +53,7 @@
<!-- default to use body scroller -->
<app-header-layout>

<app-header condenses reveals>
<app-header effects="waterfall" condenses reveals>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div class="flex"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove using layout-classes in the demo? Thanks.

@blasten blasten force-pushed the header-snap branch 9 times, most recently from 3acad08 to 653adf1 Compare March 8, 2016 03:29
@blasten
Copy link
Contributor Author

blasten commented Mar 8, 2016

@frankiefu I just fixed the issues.

@@ -95,6 +95,8 @@
position: relative;
display: block;
-webkit-transform: translateZ(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there supposed to be the unprefixed version of transform as well? There should also be a transition-property: -webkit-transform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, before -webkit-transform:

transform: translateZ(0);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that was added to fix an issue in Safari related to the waterfall shadow, but it's unfortunate that I didn't leave a comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for comment

@blasten blasten force-pushed the header-snap branch 3 times, most recently from f2d13d2 to 1e18489 Compare March 8, 2016 17:45
@@ -95,6 +95,9 @@
position: relative;
display: block;
-webkit-transform: translateZ(0);
transition-property: -webkit-transform;
transition-property: transform;
Copy link
Contributor

Choose a reason for hiding this comment

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

The 2nd transition-propertyoverwrites the 1st transition-property.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it'll overwrite if the second one is not recognized (i.e. if the browser does not support the unprefixed transform, it'll ignore the second one). Obviously we do want it to override if it is supported.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The second one will overwrite the first one since both are setting on the same CSS property (transition-property). If you need to support prefix one it needs to use the prefix transition, e.g.

-webkit-transition-property: -webkit-transform;
transition-property: transform;

Copy link
Contributor

Choose a reason for hiding this comment

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

Btw, only Safari 8 needs -webkit prefix for transform. So I am guessing you will see the problem when running on Safari 8.

@frankiefu
Copy link
Contributor

LGTM

frankiefu added a commit that referenced this pull request Mar 8, 2016
Add `snaps` property to app-header
@frankiefu frankiefu merged commit 3a2b31f into master Mar 8, 2016
@frankiefu frankiefu deleted the header-snap branch March 8, 2016 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants