-
Notifications
You must be signed in to change notification settings - Fork 120
Dashboard: data loading fixes #319
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
Conversation
| startListeningToNotifications() | ||
| tabBarItem.image = Gridicon.iconOfType(.statsAlt) | ||
| } | ||
|
|
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.
| Lines should not have trailing whitespace. |
| configureView() | ||
| reloadData() | ||
| } | ||
|
|
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.
| Lines should not have trailing whitespace. |
| @IBOutlet private weak var bottomBorder: UIView! | ||
|
|
||
| private var periodVCs = [PeriodDataViewController]() | ||
|
|
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.
| Lines should not have trailing whitespace. |
| vc.clearAllFields() | ||
| } | ||
| } | ||
|
|
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.
| Lines should not have trailing whitespace. |
mindgraffiti
left a comment
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.
✅ all testing scenarios
✅ code review
![]()
|
Thank you @mindgraffiti !! |
|
Awesome!!!! |
This PR addresses 3 issues with data loading in the Dashboard:
Previously, if the user logged out the old data was never cleared. To fix this I added a notification observer for
defaultAccountWasUpdated. If that notif is fired and the user is no longer authenticated, we clear the chart VCsAfter logging in or launching the app, the Dashboard data would not refresh and could possibly be blank (until the user pulled-to-refresh). Now we are looking for missing data on
viewDidAppearand reloading it if needed.The
Updated X minutes agotext on the chart is now cleared when pull-to-refresh is activated or the user logs out.NOTE: Most of this ☝️☝️☝️ will be replaced when #258 is addressed. The goal here is to give our open beta users a better experience.
Fixes #260
Testing
Scenario 1: Fresh Login
Updated X ... agotext is blank while data is loadingScenario 2: Logout -> Login
a. The
Updated X ... agotext is blank while data is loadingb. The Dashboard is not displaying any stale data from the previous store.
Misc Other Things
Dashboard -> Orders -> Dashboard— verify there isn't any double animations on the charts@mindgraffiti and/or @jleandroperez could you take a peek at this?