github-stats icon indicating copy to clipboard operation
github-stats copied to clipboard

Skeleton loading for stats

Open Balastrong opened this issue 2 years ago • 5 comments

Feature Description Display some skeleton cards while stats are loading in /stats

It should be implemented because... Improves the loading experience

Describe alternatives you've considered A boring spinner

Additional context Please do not start with the implementation immediately, let's discuss and decide here if we should do it from scratch or use an external library (if so, which one)

Balastrong avatar Aug 22 '23 06:08 Balastrong

Probably writing from scratch could be more fun. I could try do that, just isolated component to integrate lately.

As we speak about library I really like https://ant.design

Here their implementation of skeleton -> https://ant.design/components/skeleton (good example as "how should it work")

pavelee avatar Aug 22 '23 21:08 pavelee

We can leverage Tailwind CSS, which the project is already using, to craft skeleton cards. Moreover, seamlessly implementing dark mode using Tailwind CSS requires no extra effort.

Refer this Skeleton Card made with Tailwind CSS

faiz-ansari-afk avatar Aug 28 '23 15:08 faiz-ansari-afk

Can I have this issue? 😜

black-arm avatar Oct 05 '23 16:10 black-arm

Sure, go ahead @black-arm :)

Balastrong avatar Oct 06 '23 06:10 Balastrong

image In the loading phase we have this result. We are using the react-loading-skeleton library. It is good but It doesn't change color when we move from light to dark theme. We can make it do better with tailwind css. What do you think? In this video I show you a prototype. https://github.com/Balastrong/github-stats/assets/68558867/95ec5e57-4caf-4a1e-be06-540c8fed4bde

@Balastrong @pavelee @luckyklyist

black-arm avatar Nov 03 '23 11:11 black-arm