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
Fix MiniCart Interaction Blocking #2547
Conversation
@@ -11,6 +11,7 @@ | |||
visibility: hidden; | |||
|
|||
/* It animates to being closed. */ | |||
transform: scale(0); | |||
transition-duration: 192ms; | |||
transition-timing-function: var(--venia-global-anim-out); | |||
transition-property: opacity, visibility; |
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.
Note that transform
is purposefully omitted from the transition-property
: we don't want to animate the growing and shrinking.
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.
Wasn't there supposed to be a little bit of translation going on here, though? I'd swear we had something like transform: translate3d(0, -0.5rem, 0)
.
edit: the translation I'm thinking of is on a child element, not this one, so ignore the above.
Anyway, generally I'd like to leave transform
on the table for animation without known bugs waiting to happen if it's used. Could we just use positioning (left: 100vw
) or something?
|
@@ -11,6 +11,7 @@ | |||
visibility: hidden; | |||
|
|||
/* It animates to being closed. */ | |||
transform: scale(0); | |||
transition-duration: 192ms; | |||
transition-timing-function: var(--venia-global-anim-out); | |||
transition-property: opacity, visibility; |
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.
Wasn't there supposed to be a little bit of translation going on here, though? I'd swear we had something like transform: translate3d(0, -0.5rem, 0)
.
edit: the translation I'm thinking of is on a child element, not this one, so ignore the above.
Anyway, generally I'd like to leave transform
on the table for animation without known bugs waiting to happen if it's used. Could we just use positioning (left: 100vw
) or something?
Performance Test Results The following fails have been reported by WebpageTest. These numbers indicates a possible performance issue with the PR which requires further manual testing to validate. https://pr-2547.pwa-venia.com : LH Performance Expected 0.85 Actual 0.52, LH Best Practices Expected 1 Actual 0.92, WPT Cache Expected 90 Actual 83.333333333333 |
@supernova-at MFTF test failed again on one scenario. Able to reproduce locally too.
Issue - Middle portion of button is not clickable because mini cart image swatch overlapping it mostly. |
@@ -49,7 +49,7 @@ | |||
overflow: hidden; | |||
padding: 1rem; | |||
position: fixed; | |||
right: 0.5rem; | |||
right: -100vw; |
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.
Hmm, this doesn't feel like the solution. I think the problem here is that both .root
and .contents
have position: fixed
, which is relative to the viewport. The latter should probably have position: absolute
, so that it's relative to the former. That way, when the parent moves offscreen, it'll take the child with it.
.root
position: fixed
.contents
position: absolute
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.
Awesome, thanks. Resolved in c9812fd.
Description
When closed, the MiniCart was blocking interactions on the page behind it.
This PR moves the MiniCart offscreen when it is closed to avoid this behavior.
Alternative solutions:
visibility
we can't switch to usingdisplay
either because CSS can't animate thedisplay
propertyRelated Issue
Closes PWA-743 / #2546 .
Acceptance
Verification Stakeholders
Specification
Verification Steps
Screenshots / Screen Captures (if appropriate)
Checklist