status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 985 forks source link

Do not show zeros for wallet balances if they aren't loaded yet #11269

Closed flexsurfer closed 1 year ago

flexsurfer commented 4 years ago

Bug Report

Problem

Currently, after sign-in zeros are shown for all token balances

Expected behavior

Loading indicator or any over indicator should be shown

errorists commented 4 years ago
Screenshot 2020-10-05 at 11 33 31

I believe the idea was to use the same loading indicator as we do for refresh / pull to refresh gesture, to indicate that the current state is temporary and pending update

do you guys want something more specific like actually not showing wallet/token balances at all?

errorists commented 4 years ago

A nice alternative to indicate a state that data hasn't finished loading yet, are skeleton screens

John-44 commented 4 years ago

+1 on skeleton screens for content on a screen the user has navigated to that isn't loaded yet (like this usecase).

flexsurfer commented 3 years ago

partially implemented here https://github.com/status-im/status-react/pull/11273

hesterbruikman commented 3 years ago

Expected behavior:

@errorists please comment if this is in line with what you would expect.

errorists commented 3 years ago

I pass it over to @johnlea-quiup to ask if that's what we expect :)

List item and card show a skeleton loading state when new values are fetched

Not in the described above case where we have a cached balance we can show straightaway and instead use the pull to refresh / reload spinner to indicate that we're fetching new data. Skeletons would be my choice if we were always going from unknown, but that's not the case.

Regardless I'd love if we could implement skeleton loading for chats, so I have skin in the game and am biased towards finding a way to make those happen here too

John-44 commented 3 years ago

@hesterbruikman I'm not sure if we want to use skeleton loading states when data is present and new data is being fetched. Skeleton screens are normally used when there isn't any data present yet. In this case why not leave the existing content as is until the new data is fetched?

Perhaps this confusion is my fault, I re-read my comment above from 5th Oct and noticed a typo - I had written "that is loaded yet..." instead of "that isn't loaded yet"" Comment now updated, my apologies.

The rest of the expected behavior points look good to me.

hesterbruikman commented 3 years ago

@errorists @johnlea-quiup sounds like we need to know what data we can assume to be present. @flexsurfer any thoughts on what we can cache?

I assumed based on the current implementation of ... that we would only cache total balance (and fiat value). If so, other data would not be present.

Also, I noticed that on first time use; there is (obviously) no cache of Total balance. In this scenario there is for sure no data present.

Fwiw, this is first time use wallet currently when balance and assets cannot be fetched Screenshot_20201111-121139_Status PR

John-44 commented 3 years ago

@hesterbruikman in the case of the screenshot posted above, a skeleton loading state would be a good idea as in this case data isn't present.

errorists commented 3 years ago

I would assume we should aim at caching all data so the entire table you have here, numerical values and assets.

And yes, whenever you arrive at this view and ask Status to guesstimate its content, a skeleton state would be superior. Those redacted ••• values in an ideal world should never be shown to the user.

churik commented 2 years ago

still the case on nightly 27/07/22

churik commented 1 year ago

Obsolete and will be re-considered in the redesigned app. Added recheck label for easy finding that one in case of need.