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

chore: first pass at fixing collectibles transition #19945

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

J-Son89
Copy link
Member

@J-Son89 J-Son89 commented May 8, 2024

fixes: #19678

This pr smoothes the transition for the collectibles cards loading to a loaded image.

On implementing I realised there is an issue when the image is already loaded as the image is cached and will load quite quickly anyway. To handle this I am measuring the load time. This works fine if the user only has a small number of images.

With help from @ulisesmac we also discovered a bug where the collectibles were re rendering a lot on scroll. This is also addressed in this pr and the overall scrolling experience is a lot smoother now.

Latest reference video:

anim.mov

Note: The animations being slower looks better for one load, but if the user goes back and forth from the tabs several times then it just becomes a bit irritating after a while.

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA May 8, 2024
@status-im-auto
Copy link
Member

status-im-auto commented May 8, 2024

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
598000f #1 2024-05-08 20:13:42 ~3 min tests 📄log
✔️ 598000f #1 2024-05-08 20:16:27 ~5 min android-e2e 🤖apk 📲
✔️ 598000f #1 2024-05-08 20:16:50 ~6 min android 🤖apk 📲
✔️ 598000f #1 2024-05-08 20:19:24 ~8 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
23e7d7d #2 2024-05-14 21:58:21 ~2 min tests 📄log
✔️ 23e7d7d #2 2024-05-14 22:02:46 ~6 min android 🤖apk 📲
✔️ 23e7d7d #2 2024-05-14 22:02:55 ~7 min android-e2e 🤖apk 📲
✔️ 23e7d7d #2 2024-05-14 22:04:29 ~8 min ios 📱ipa 📲
✔️ ebf6b31 #3 2024-05-17 21:09:56 ~4 min tests 📄log
✔️ ebf6b31 #3 2024-05-17 21:11:38 ~6 min android 🤖apk 📲
✔️ ebf6b31 #3 2024-05-17 21:12:40 ~7 min android-e2e 🤖apk 📲
✔️ ebf6b31 #3 2024-05-17 21:14:01 ~8 min ios 📱ipa 📲

:on-load-start #(set-load-time (fn [start-time] (- (datetime/now) start-time)))


:on-load-end (if (> load-time 200)
Copy link
Contributor

Choose a reason for hiding this comment

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

on-load-start and on-load-end can be moved to external functions. It has readability benefits and the potential to save renders.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep for sure, I will add those types of details once I'm happy with the approach. This was just first pass 👌

@shivekkhurana
Copy link
Contributor

The image transition is almost perfect. Made me feel that we somehow loaded colors before hand.

The name and the logo seem to flicker in. A skeleton there will be nice too.

@J-Son89
Copy link
Member Author

J-Son89 commented May 9, 2024

The image transition is almost perfect. Made me feel that we somehow loaded colors before hand.

The name and the logo seem to flicker in. A skeleton there will be nice too.

Thanks, will add that!

@J-Son89 J-Son89 self-assigned this May 9, 2024
@J-Son89 J-Son89 force-pushed the jc/collectible-transition branch from 23e7d7d to ebf6b31 Compare May 17, 2024 21:05
@J-Son89 J-Son89 marked this pull request as ready for review May 17, 2024 21:05
@@ -121,30 +170,43 @@
(defn- image-view
[{:keys [avatar-image-src community? counter state set-state
gradient-color-index image-src supported-file?]}]
(let [theme (quo.theme/use-theme)]
(let [theme (quo.theme/use-theme)
Copy link
Member Author

Choose a reason for hiding this comment

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

I manually tested this for type image as well 👍

@@ -105,23 +105,6 @@
(def fast-create-community-enabled?
(enabled? (get-config :FAST_CREATE_COMMUNITY_ENABLED "0")))

(def default-multiaccount
Copy link
Member Author

Choose a reason for hiding this comment

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

unused 👍

on-collectible-long-press))
:on-end-reached on-end-reached
:on-end-reached-threshold 4}])))
;; TODO:
Copy link
Member Author

Choose a reason for hiding this comment

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

@ulisesmac - what to do here, should we create a follow up issue? 🤔

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

Successfully merging this pull request may close these issues.

Follow-up: Add Animation to New Collectible UI
4 participants