Skip to content

[Stats Refresh] Insights: Loading View#11597

Merged
danielebogo merged 13 commits intodevelopfrom
issues/10379-insights-loading-view
May 2, 2019
Merged

[Stats Refresh] Insights: Loading View#11597
danielebogo merged 13 commits intodevelopfrom
issues/10379-insights-loading-view

Conversation

@danielebogo
Copy link
Contributor

Refs. #10379

This PR adds a loading view for the Stats Insights section.

stats-insights-loading-view

NoResultsViewHost

Because we often duplicate the code to add the NoResultsViewController as child, I thought to create a helper using a protocol called NoResultsViewHost (thanks @frosty for the name suggestion). Its extension constrained to a UIViewController contains the logic to configure, display and hide the noResultsViewController object. Also using associated objects allows us to implement the protocol without any other particular implementation.

Error Handling

I will push another PR for the error handling. This because it requires some change on the Store.

To test:

• From My Sites select a site and open its dashboard
• Select Stats to open the Stats section. Be sure the tab Insights is selected.
• You should see the loading view
• The loading view should disappear as soon the data is loaded

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@danielebogo danielebogo added this to the 12.4 milestone May 1, 2019
@danielebogo danielebogo requested a review from ScoutHarris May 1, 2019 15:06
@danielebogo danielebogo self-assigned this May 1, 2019
Copy link
Contributor

@ScoutHarris ScoutHarris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @danielebogo . I'm loving the NoResultsViewHost! Nice!

And the loading view does in fact appear as expected.

:shipit:

@ScoutHarris ScoutHarris mentioned this pull request May 1, 2019
45 tasks
@danielebogo
Copy link
Contributor Author

Thanks @ScoutHarris !

@danielebogo danielebogo merged commit 2ff70c2 into develop May 2, 2019
@danielebogo danielebogo deleted the issues/10379-insights-loading-view branch May 2, 2019 08:40
@SylvesterWilmott
Copy link

Looks good @danielebogo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants