yihong0618 / running_page

Make your own running home page
https://running-page.vercel.app
MIT License
3.56k stars 1.02k forks source link

feat: load activities data lazily to reduce bundle size #491

Closed frostming closed 1 year ago

frostming commented 1 year ago

Signed-off-by: Frost Ming me@frostming.com

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
running-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2023 11:54am
yihong0618 commented 1 year ago

@frostming image

yihong0618 commented 1 year ago

May have some impact on user experience so, holding this. @ben-29 @vlin

vlin commented 1 year ago

The code is looking good! Async imports and the <Loading /> component are smart moves for UX. But there is a catch - with the huge activities.json, before it finishes loading, the <Loading /> could end up looking like this: screenshot

@yihong0618 Maybe our UI mate could mock up a skeleton screen or default loading state before data's trimmed. That'd let us polish the loading flow. Any chance we could break up the data in Python before it hits activities.json? That might help slim it down a bit.

yihong0618 commented 1 year ago

The code is looking good! Async imports and the <Loading /> component are smart moves for UX. But there is a catch - with the huge activities.json, before it finishes loading, the <Loading /> could end up looking like this: screenshot

@yihong0618 Maybe our UI mate could mock up a skeleton screen or default loading state before data's trimmed. That'd let us polish the loading flow. Any chance we could break up the data in Python before it hits activities.json? That might help slim it down a bit.

make sense, let us move on this

yihong0618 commented 1 year ago

I am fool.....deleted v2.0 branch auto close this...

frostming commented 1 year ago

Tried the master branch and it seems fast enough, i am going to close this PR if no other objections.