Skip to content
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

Empty Stats: standalone card #17142

Merged

Conversation

momo-ozawa
Copy link
Contributor

@momo-ozawa momo-ozawa commented Sep 10, 2021

Fixes #17123

Description

This PR adds the new Grow Audience standalone card to the Insights tab of the Stats screen.

  • Added: Grow Audience standalone card
    • All-time view count is displayed in the card
    • Tapping the Dismiss button permanently dismisses the card
  • Added: Grow Audience ghost loading card
  • Updated: Customize card presentation logic
    • The Customized card will only be displayed once the Grow Audience card is dismissed

Design ref: pbArwn-2NH-p2

Before After

Notes

  • Other nudges (i.e. Social, Reader) will be added in future PRs.
  • The Set up blogging reminders button is not hooked up yet. Tapping it will do nothing.
  • The Grow Audience card presentation logic isn't hooked up to the view count yet. In the future, the card will be hidden once the all-time view count reaches a certain threshold.

How to test

  1. Delete WPiOS and do a fresh install
  2. Log in to an account with multiple sites
  3. Go to My Sites (Let's call the current site Site A)
  4. Go to Stats
  5. ✅ The Grow Audience card should be displayed for Site A
  6. Go back to My Sites and choose a different site (Let's call this site Site B)
  7. Go to Stats
  8. ✅ The Grow Audience card should be displayed for Site B
  9. Tap Dismiss on the Grow Audience card
  10. ✅ The Grow Audience card should be dismissed for Site B, and the Customize card should be displayed instead
  11. Go back to Site A > Stats
  12. ✅ The Grow Audience card should be dismissed for Site A, and the Customize card should be displayed instead

Regression Notes

  1. Potential unintended areas of impact
    Loading / dismissing the Customize card in the Stats screen

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manually tested the loading / dismissal flow

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Sep 10, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@momo-ozawa momo-ozawa linked an issue Sep 10, 2021 that may be closed by this pull request
8 tasks
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Sep 10, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Contributor

@nikola-milicevic nikola-milicevic left a comment

Choose a reason for hiding this comment

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

When I tested this on the newly created site I encountered an error:

Screenshot 2021-09-13 at 17 55 44

After going back, switching to some other (older) site, checking out stats (which didn't show Grow Audience card), and coming back again the the newly created site I got this result:

Screenshot 2021-09-13 at 17 58 50

So I guess it's worth checking it out.

Comment on lines 66 to 67
@IBAction private func actionButtonTapped(_ sender: UIButton) {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just put a comment here with the explanation why the body is empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed! 6bd4538

Base automatically changed from task/empty-stats-refactor-customize-card-management to feature/empty-stats-phase-1 September 14, 2021 09:21
@osullivanchris
Copy link

Had a look at the build and its looking great, very nice job 👌

Its hack week so I'm just capturing these thoughts, but no rush to respond.

A couple of things

  • I need to make a dark mode asset for you. Will do after hack week.
  • Do you prefer having the card stuck to the top, like the 'Customise your insights' card, or have some padding above? @leandroalonso preferred the padding in the original design. I'm just trying to be consistent. But without the padding maybe it looks a tad more banner-like
  • Would you be able to send me an iPad screenshot? I have trouble testing on my iPad. I can never get AppCentre to work.
  • I didn't look at landscape mode in my designs. Are you happy with it? I think maybe we could remove the padding above the icon? The other thing is the line-length looks a bit long, but not too bad. I played with having a max-width on the text, but then the icon looks lost.

empty stats build

@momo-ozawa
Copy link
Contributor Author

momo-ozawa commented Sep 20, 2021

@osullivanchris Thanks for all the feedback!

I need to make a dark mode asset for you. Will do after hack week.

Sounds good! Thanks!

Do you prefer having the card stuck to the top, like the 'Customise your insights' card, or have some padding above? @leandroalonso preferred the padding in the original design. I'm just trying to be consistent. But without the padding maybe it looks a tad more banner-like

I liked having the card stuck on top like the Customize card since it make the styling for Customize / Grow your audience more consistent. Adding padding is pretty simple though, so lmk if you feel strongly either way (cc: @leandroalonso) 😄

Would you be able to send me an iPad screenshot? I have trouble testing on my iPad. I can never get AppCentre to work.

Definitely!

iPad Air 4th gen (Portrait) iPad Air 4th gen (Landscape)
Simulator Screen Shot - iPad Air (4th generation) - 2021-09-20 at 10 51 15 Simulator Screen Shot - iPad Air (4th generation) - 2021-09-20 at 10 51 22

I didn't look at landscape mode in my designs. Are you happy with it? I think maybe we could remove the padding above the icon? The other thing is the line-length looks a bit long, but not too bad. I played with having a max-width on the text, but then the icon looks lost.

I'm pretty happy with how landscape looks 👍

By removing padding above the icon, do you mean have it top-aligned with "x Views to your site so far"?

@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@momo-ozawa
Copy link
Contributor Author

When I tested this on the newly created site I encountered an error:

After going back, switching to some other (older) site, checking out stats (which didn't show Grow Audience card), and coming back again the the newly created site I got this result:

Fixed! a0407f6
Thanks for catching this 🙏

@momo-ozawa
Copy link
Contributor Author

@nikola-milicevic @leandroalonso Ready for a re-review 🙇‍♀️

@osullivanchris
Copy link

@momo-ozawa thanks for sharing the iPad screenshots. It looks good to me. In general I think landscape is probably fine.

By removing padding above the icon, do you mean have it top-aligned with "x Views to your site so far"?

In the specs I had '4pt below text' where I found when the image was top-aligned perfectly with the 'A tip to grow your audience' heading it looked wrong. But nudging it down slightly looked more 'correct'. But actually in the build we might not have this to begin with, and its probably a ridiculous detail.

Screenshot 2021-09-20 at 12 42 24

On landscape though, I thought with just one line of text, the icon was floating a bit lower than I would like. It just doesn't look as well balanced. But even 4pt won't make a difference. It might look better on landscape if the icon was vertically centred to the block of text including the heading, but its a totally different structure to portrait so I'd imagine its way too messy to do.

Copy link
Contributor

@leandroalonso leandroalonso left a comment

Choose a reason for hiding this comment

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

@momo-ozawa I was able to see the Insights and Blogging Reminders card at the same time (Atomic site):

Screen Shot 2021-09-20 at 10 51 16

I wonder if that was caused because I didn't do a clean installation? When I did a clean install it all worked fine.

Another thing regarding the ghost cell:

I wonder if we should clean it a little bit (like the icon placeholder and the "set up" button). It looks a bit polluted to me, but that's up to @osullivanchris (and we can tackle on another PR).

@momo-ozawa
Copy link
Contributor Author

momo-ozawa commented Sep 20, 2021

@leandroalonso

I wonder if that was caused because I didn't do a clean installation? When I did a clean install it all worked fine.

I think it's because it wasn't a clean installation. However, you bring up a really good point -- I should still handle the case where the customize card is already showing before the user updates the app to a version with Empty Stats. I'll address this issue in the current PR in a future PR.

I wonder if we should clean it a little bit (like the icon placeholder and the "set up" button). It looks a bit polluted to me, but that's up to @osullivanchris (and we can tackle on another PR).

Sounds good -- I'll tackle this in a future PR if needed.

Copy link
Contributor

@nikola-milicevic nikola-milicevic left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@momo-ozawa momo-ozawa merged commit 225fe01 into feature/empty-stats-phase-1 Sep 21, 2021
@momo-ozawa momo-ozawa deleted the task/empty-stats-standalone-card branch September 21, 2021 10:29
@osullivanchris
Copy link

Ghost state isn't a big deal or anything but here's a quick riff on it. I think there's just a little bit too many blocks, and maybe some of them are a bit chunky, that's all. You don't have to match this exactly.

ghost

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

Successfully merging this pull request may close these issues.

Empty Stats: Standalone view
4 participants