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
Force transfer sidebar to the Fixed 'transfer' layer. #6155
Conversation
@@ -168,7 +168,7 @@ export class AmpSidebar extends AMP.BaseElement { | |||
this.viewport_.disableTouchZoom(); | |||
this.vsync_.mutate(() => { | |||
toggle(this.element, /* display */true); | |||
this.viewport_.addToFixedLayer(this.element); | |||
this.viewport_.addToFixedLayer(this.element, /*forceTransfer*/ true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spaces inside the /**/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@dvoytenko - this is not performing too well with animations - ill have to re-think this. |
@camelburrito This probably simple means that we'll have to split |
i tried that already , the animation is stuttering and not looking very good. |
@camelburrito If animation is stuttering, that simply means that we need to separate layout changes with animation run. 1 or 2 animation frames would do it. |
798e358
to
1122b49
Compare
@dvoytenko could you take another look. I made a minor change in fixed-layer |
1122b49
to
ce9da15
Compare
@@ -307,7 +313,7 @@ export class FixedLayer { | |||
// `height` is constrained to at most 300px. This is to avoid | |||
// transfering of more substantial sections for now. Likely to be | |||
// relaxed in the future. | |||
const isTransferrable = ( | |||
const isTransferrable = fe.forceTransfer || ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you added forceTransfer
already in isFixed
, you should defer to isFixed
here. E.g. it should likely look like:
const isTransferrable = isFixed && (
fe.forceTransfer || (opacity > 0 && ...)
);
ce9da15
to
c7c36be
Compare
* Force transfer sidebar to the Fixed 'transfer' layer. * review fix. * Move to fixed layer before opening. * Adding to fixed layer before dp block * moving fl to build cb * Make isFixed true for forceTransferElements * Make isFixed true for forceTransferElements * Review fixes
* Force transfer sidebar to the Fixed 'transfer' layer. * review fix. * Move to fixed layer before opening. * Adding to fixed layer before dp block * moving fl to build cb * Make isFixed true for forceTransferElements * Make isFixed true for forceTransferElements * Review fixes
fixes - #6045