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

Fix partner slider animation in home page #5966

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Tharanishwaran
Copy link
Member

@Tharanishwaran Tharanishwaran commented Oct 2, 2024

Description

This PR fixes #5805 by ensuring smooth animation for the partner slider on the home page.

Notes for Reviewers

  • Added image preloading for smoother animation.
  • Prevented glitches during initial load.

Video

Here's a video showcasing the resolved slider animation issue:

Screencast.from.02-10-24.05.24.43.PM.IST.webm

Signed commits

  • Yes, I signed my commits.

@l5io
Copy link
Contributor

l5io commented Oct 2, 2024

🚀 Preview for commit 2632727 at: https://66fd382b2443dcdceace6e39--layer5.netlify.app

@Tharanishwaran
Copy link
Member Author

@Ashparshp could you please review this PR and let me know if any changes are needed for merging? Thanks!

@l5io
Copy link
Contributor

l5io commented Oct 3, 2024

🚀 Preview for commit 4af26ad at: https://66fee30bd9202c03a4db0e81--layer5.netlify.app

@vishalvivekm
Copy link
Member

@Tharanishwaran
Thank you for your contribution!
Let's discuss this during the website call on Monday at 5:30 PM IST (7:00 AM CT).

Please add it as an agenda item to the meeting minutes.

@l5io
Copy link
Contributor

l5io commented Oct 7, 2024

🚀 Preview for commit 112035c at: https://67039e7f58a349684fcb776b--layer5.netlify.app

Copy link
Contributor

@Ashparshp Ashparshp left a comment

Choose a reason for hiding this comment

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

Thank you @Tharanishwaran,

Though it looks good to me, could you consider using React.Suspense for lazy loading to smooth out the sudden jumps when content loads? If possible, applying it to the other components would help as well, as it will reduce the jumpy appearance across the pages.

@Tharanishwaran
Copy link
Member Author

Thank you @Ashparshp for suggesting React.Suspense. Would you like me to implement this in this current PR, or should I create a new one for it? I'm happy to do either. Thank you for your guidance

@l5io
Copy link
Contributor

l5io commented Oct 8, 2024

🚀 Preview for commit 143f3e6 at: https://6705370f3e62580795882907--layer5.netlify.app

});
});

Promise.all(imagePromises)
Copy link
Member

Choose a reason for hiding this comment

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

why we using promise here? Will any one image anytime fail to load then all images will fail.

Choose a reason for hiding this comment

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

Promises seem to be ironically named. 😆

@sudhanshutech
Copy link
Member

@Tharanishwaran check is failing. // @Ashparshp keep a eye before approving,
@Tharanishwaran what was the actual issues here which was causing this animation issues?

@Ashparshp
Copy link
Contributor

Ashparshp commented Oct 9, 2024

@sudhanshutech, It wasn't failing before! I guess he pushed commits again causing fail.

@Tharanishwaran
Copy link
Member Author

Tharanishwaran commented Oct 9, 2024

@sudhanshutech the original animation issues - The partner slider was experiencing sudden jumps and glitches during initial load due to images loading asynchronously without proper handling of loading states.

@sudhanshutech you're right about the Promise.all issue. Implementing React Suspense should address this concern as well.
I'll update the PR to use React Suspense for lazy loading the slider and its images. This should provide a smoother loading experience overall.

I'll also fix the failing checks from the recent merge. Thank you both @Ashparshp And @sudhanshutech for your guidance.

@l5io
Copy link
Contributor

l5io commented Oct 9, 2024

🚀 Preview for commit c0d39ea at: https://670692fa067af26bc00ab236--layer5.netlify.app

Signed-off-by: Tharanishwaran <[email protected]>
@l5io
Copy link
Contributor

l5io commented Oct 9, 2024

🚀 Preview for commit 8aa0192 at: https://670698fb4bfebc7f98a84fc7--layer5.netlify.app

))}
</Slider>
) : (
<div style={{ textAlign: "center", padding: "20px" }}>Loading partners...</div>
Copy link
Member

Choose a reason for hiding this comment

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

we don't need to display a fallback as a message in our homepage this is not good. Do not add a fallback here. keep it as it was earlier and just fix smoothness of transitions

@sudhanshutech
Copy link
Member

@Tharanishwaran any update?

@l5io
Copy link
Contributor

l5io commented Oct 22, 2024

🚀 Preview for commit 8f3574f at: https://67174d463ddfed6c7c4a0fd1--layer5.netlify.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Academic Partners slider has a breaking animation during the starting few seconds
6 participants