-
Notifications
You must be signed in to change notification settings - Fork 69
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
Transactions and deposits counts on the table summary are rendered as "undefined" while the data is loading. #1639
Comments
As discussed in the slack thread p1618933953413800/1618863954.403900-slack-CGGCLBN58 and #97 (comment) we are leaning toward displaying zero while empty state, which is consistent with our other analytics screen. I am thinking the same, wanted to confirm before I implement the fix. |
This makes sense as a general approach to me. |
@naman03malhotra while we're showing the loading state - can we use the preview shape with the pulse to represent that data until it loads? (just like the data in the table above) |
@LevinMedia I went through the codebase and came to know that component responsible to render the footer of the table is We can take one of the following approaches to fix this issue.
1st & 2nd are relatively faster to implement and push than 3rd. IMO, we can go with either 1st or 2nd to fix this issue immediately and eventually go for 3rd. I can create a separate issue in WCAdmin repo(as components reside there) and work on it, meanwhile, I can work on the quick fix. I like the suggestion for the 3rd, as it is consistent with the rest of the loading pattern. The fix for 3rd will look something like this: |
I have created an issue in WCAdmin to implement the skeleton loader for the |
Updating the table summary to support the skeleton loader is great - thanks! In the mean time, proceeding with option two above works for me - we simply won't display anything until / unless there's data loaded to show. 👍 |
The following behavior is applicable for both Transactions and Deposits tables.
Presently we render the number of transactions and deposits in the summary section of the respective tables. While the data is being fetched from the server the count is rendered as
undefined
.The same issue can be replicated if the WCPay server is not running and still being proxied by WCPay dev plugin, i.e When API call is failing which results in
depositsSummary
being an empty object.Steps to reproduce:
develop
branch.undefined
transaction while the table data is being loaded.Potential solutions:
The text was updated successfully, but these errors were encountered: