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
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (4)
|
:on-load-start #(set-load-time (fn [start-time] (- (datetime/now) start-time))) | ||
|
||
|
||
:on-load-end (if (> load-time 200) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👌
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! |
23e7d7d
to
ebf6b31
Compare
@@ -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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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? 🤔
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.