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

feat: implement MUI skeleton for loading assets/ components #136

Open
ashuvssut opened this issue Oct 12, 2022 · 3 comments
Open

feat: implement MUI skeleton for loading assets/ components #136

ashuvssut opened this issue Oct 12, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ashuvssut
Copy link
Member

ashuvssut commented Oct 12, 2022

Description

  • Use MUI skeleton as a placeholder when components/assets are loading
  • Use this component in
    • Youtube player
    • Try to implement this skeleton component in components/Image global component. We load all out images using this Image component only.
    • Any gifs... etc etc
@ashuvssut ashuvssut added enhancement New feature or request hacktoberfest Issues that are open for hacktoberfest contributors labels Oct 12, 2022
@ashuvssut ashuvssut changed the title feat: use MUI sekelton when assets/ components are loading feat: use MUI skeleton when assets/ components are loading Oct 13, 2022
@ashuvssut ashuvssut changed the title feat: use MUI skeleton when assets/ components are loading feat: implement MUI skeleton for loading assets/ components Oct 13, 2022
@ashuvssut ashuvssut added the good first issue Good for newcomers label Oct 17, 2022
@senali-d
Copy link
Contributor

Hey @ashuvssut,
I like to work on this. Can you assign it to me.

@senali-d
Copy link
Contributor

senali-d commented Nov 1, 2022

When was the skeleton component need to load.

@ashuvssut
Copy link
Member Author

@senali-d

We have always used our custom Image global component to render images. There are some props like onLoad & onLoadComplete (ref Nextjs docs on next/image for this) that you can use to detect when the image has loaded/failed to load.
Implementing a rectangular Skeleton compo must be simple for these image components. You need to implement the Skeleton compo in components/Image.tsx

for gif images, you can always put a conditional to show a skeleton compo and then show the image when it has loaded .

For youtube player, you have to figure out this part. I have not put much thought for this one. Maybe checkout React Player docs to find out if there is a way to detect the loading state.

@ashuvssut ashuvssut added UP FOR GRABS Issues open to new assignees and removed hacktoberfest Issues that are open for hacktoberfest contributors labels Nov 13, 2022
@ashuvssut ashuvssut removed the UP FOR GRABS Issues open to new assignees label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants