-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feat / Hero and HeroShelf improvements #642
base: develop
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit ed17096): https://ottwebapp--pr642-feat-hero-shelf-upda-dw7onm3d.web.app (expires Sat, 14 Dec 2024 13:44:56 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
refactor(home): align tablet with mobile
refactor(home): make swipeslider more stable refactor(home): optimize heroshelf landscape
4425900
to
b06fc10
Compare
/* stylelint-disable length-zero-no-unit */ | ||
--safe-area-top: 0px; | ||
--safe-area-right: 0px; | ||
--safe-area-bottom: 0px; | ||
--safe-area-left: 0px; | ||
/* stylelint-enable length-zero-no-unit */ |
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.
How come using 0
is a problem?
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.
Chrome doesn't respect it within a calc
function, and ignores setting the shelf height.
packages/ui-react/src/components/HeroShelf/HeroShelf.module.scss
Outdated
Show resolved
Hide resolved
|
||
const slideTo = (toIndex: number) => { | ||
useScrolledDown(50, isMobile ? 200 : 700, (progress: number) => { | ||
if (posterRef.current) posterRef.current.style.opacity = `${Math.max(1 - progress, isMobile ? 0 : 0.1)}`; |
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.
Should we also fade away the pagination?
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.
I didn't find it necessary anymore. Before they were also fixed, but they scroll away now.
refactor(home): minor style updates refactor: minor update
containerRef.current.style.transition = 'transform 0.2s ease-out'; | ||
containerRef.current.style.transform = `translateX(100%)`; | ||
} else if (direction === 'right') { | ||
} else if (isSwipeAnimation && direction === 'right') { |
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.
Would it look nicer for tablets and larger screen sizes to decrease the left/right offset and use opacity as well? It works great now, but the slide animation distance is pretty big (opinionated ofc)
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.
I think you mean the animation after a swipe gesture (because the normal slide hasn't changed). The thing is: when you drag the metadata over the screen, then let go, you want the gesture to be continued similarly. So I cannot really change the opacity, you expect it to be opaque. Same for the offset, it comes from outside of the screen. I could only update the transition perhaps?
Thanks for the thorough testing @langemike! My last commit fixes the issues you mentioned. |
a41a0cd
to
ed17096
Compare
Better but the video details section does a weird jump now during the slide animation.
Ok. Good to know! I think the fade out to 0.1 still happens quite late. But I can live with that. updated video recording: ps. This can also be reproduced in Chrome using "responsive mode" using 2340x1080 or compatible screen size. |
Description
This PR improves the Hero and HeroShelf and removes Card shadow:
Steps completed:
According to our definition of done, I have completed the following steps: