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

Fixed white blocks after shuffling + allowed reduced motion #1038

Merged
merged 2 commits into from
Dec 25, 2024
Merged

Conversation

BudzioT
Copy link
Collaborator

@BudzioT BudzioT commented Dec 24, 2024

Some weird white blocks were showing up after shuffling at the top and bottom, fixed that.
Also made animation's duration 0 when prefers-reduced-motion is set

Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
high-seas ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 3:22pm

Copy link
Contributor

@Gitstar-OC Gitstar-OC left a comment

Choose a reason for hiding this comment

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

👍

@@ -166,7 +166,10 @@ export default function Matchups({ session }: { session: HsSession }) {
if (currentStep >= totalSteps) {
clearInterval(spinInterval)
document.body.style.transform = 'rotate(0deg)' // reset to initial state
document.body.style.paddingTop = '1px'
document.body.style.paddingTop = '0'
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question deleting this line may work why we are setting it to 0 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for the others.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually we don't need to set it to 0, I was just testing stuff and left it - transform and willChange is enough

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But it doesn't change anything, as it's initially 0 too, so Ig it's up to reviewer to leave it or not ; )

Copy link
Member

Choose a reason for hiding this comment

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

Setting it to 1px fixed the white blocks issue before which was why it was included FYI

Copy link
Contributor

@Gitstar-OC Gitstar-OC left a comment

Choose a reason for hiding this comment

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

Just a minor question!

@malted malted merged commit 7bd45f4 into main Dec 25, 2024
3 checks passed
@malted malted deleted the reduce_motion branch December 25, 2024 05:06
@malted
Copy link
Member

malted commented Dec 25, 2024

Tested - LGTM!

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.

Respect prefers-reduced-motion on shuffling
3 participants