Skip to content

Commit 2c15d73

Browse files
committed
Animate analytics hub button during stats loading state
1 parent 4b9f535 commit 2c15d73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Stats v4/StoreStatsAndTopPerformersPeriodViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ final class StoreStatsAndTopPerformersPeriodViewController: UIViewController {
8383

8484
private lazy var inAppFeedbackCardViewController = InAppFeedbackCardViewController()
8585

86+
private lazy var analyticsHubButtonView = createAnalyticsHubButtonView()
87+
8688
/// An array of UIViews for the In-app Feedback Card. This will be dynamically shown
8789
/// or hidden depending on the configuration.
8890
private lazy var inAppFeedbackCardViewsForStackView: [UIView] = createInAppFeedbackCardViewsForStackView()
@@ -182,6 +184,7 @@ extension StoreStatsAndTopPerformersPeriodViewController {
182184

183185
func displayGhostContent() {
184186
storeStatsPeriodViewController.displayGhostContent()
187+
analyticsHubButtonView.startGhostAnimation(style: Constants.ghostStyle)
185188
topPerformersHeaderView.startGhostAnimation(style: Constants.ghostStyle)
186189
topPerformersPeriodViewController.displayGhostContent()
187190
}
@@ -190,6 +193,7 @@ extension StoreStatsAndTopPerformersPeriodViewController {
190193
///
191194
func removeStoreStatsGhostContent() {
192195
storeStatsPeriodViewController.removeGhostContent()
196+
analyticsHubButtonView.stopGhostAnimation()
193197
topPerformersHeaderView.stopGhostAnimation()
194198
}
195199

@@ -288,7 +292,7 @@ private extension StoreStatsAndTopPerformersPeriodViewController {
288292
])
289293

290294
// Analytics Hub ("See more") button
291-
stackView.addArrangedSubview(createAnalyticsHubButtonView())
295+
stackView.addArrangedSubview(analyticsHubButtonView)
292296

293297
// In-app Feedback Card
294298
stackView.addArrangedSubviews(inAppFeedbackCardViewsForStackView)

0 commit comments

Comments
 (0)