Wp-calypso: Store: Review notification

Created on 4 Oct 2017  路  14Comments  路  Source: Automattic/wp-calypso

Right now you can get a normal comment notification for a review (since WooCommerce treats these as no different to a normal comment or a post).

As part of our notifications work, we should hook into the comment builder (wp-content/lib/notes/class.notification-builders-v1-1.php see build_comment) , and make our own version of the notification with some adjusted copy to make it clearer these comments are product reviews.

Store [Type] Task

Most helpful comment

Ding ding ding. We have a winner!

All 14 comments

A patch for this is now up at D8337-code. It adjusts the copy and display of the comment notification that is already generated.

Here are a few screenshots of what I have so far:

Desktop

screen shot 2017-11-16 at 2 31 49 pm

screen shot 2017-11-16 at 2 31 38 pm

iOS

screen shot 2017-11-16 at 3 10 40 pm

Could use some design feedback. I had something slightly different originally but needed to make some changes to make sure things worked mostly consistently across iOS & desktop. The rating display is currently using emoji, but we could generate some images for stars and load those instead.

cc @kellychoffman @timmyc @jameskoster

The rating display is currently using emoji, but we could generate some images for stars and load those instead.

Are we allowed to use gridicons here? Asking because this would allow us to denote 4 stars out of 5 using the stars + start-outline.

screen shot 2017-11-16 at 5 08 45 pm

I'm also thinking the 'Review for' and the 'Rating' need to be above the comment for better context.

I don't think the Gridicons will work. I remember having issues with it in the expanded view of the order notification (the one being displayed there is an image), and it just came up as a question mark box.

However, we can have 5 separate images, and just load the correct one based on the rating.

i.e.

rating-1.png

1_star

and so forth.

Would that work?

Yep, that totally works.

Eeesh using an image makes me a sad panda. I think I'd actually prefer emoji to images but it's a minor point.

Assuming we go with images, we should be sure to make it fully transparent to account for any potential changes in background color.

I don't feel strongly about the images, I just wanted to be consistent with other areas of Calypso that use the gridicon stars.

Example in /plugins:
screen shot 2017-11-17 at 7 22 36 am

@justinshreve: The color used is blue-medium, which is #00aadc.

So it turns out that images don't work well either. They get forced aligned center on mobile.

However, Normal unicode characters seem to be working OK on desktop and mobile, which has a filled and unfilled star. Unfortunately I don't have much power over the color, but with the stars linked, it's a lot closer to the rest of Calypso than the emoji.

screen shot 2017-11-17 at 2 13 40 pm

Ding ding ding. We have a winner!

Okay here are some screen grabs from Android-land:

screenshot_20171123-115340

screenshot_20171123-115257

Not sure why the default gravatar is not showing up... and the underlining of "Review For" prior to the linked product name looks a little odd.

@timmyc Thanks for testing.

I fixed up the display of the review for area and tested with an Android emulator (which was annoying to setup, but made testing tweaks there easier :P).

I can't seem to solve the Gravatar issue. The Gravatar displays on Android if one is set, but the mystery man fallback will not.

This seems to be an issue with regular comment notifications as well:

photo_2017-11-27_14-05-31

photo_2017-11-27_14-05-58

I think that is worth a bug report to Android because it's definitely odd. But I don't think it's a blocker for this, since reviews already come in as comments and have the same problem.

If that sounds OK to you, do you mind giving the latest revision a 馃憤?

I agree regarding the gravatar issue, that should just be reported upstream. So the latest iteration is looking great to me - here is the notif:

edit_media_ _testing_timmy_timmay_timmaay_timmaaay_timmaaaay_timmaaaaay_timmaaaaaay_timmaaaaaaay_timmaaaaaaaay_timmaaaaaaaaay_timmaaaaaaaaaay_ _wordpress 3

I did notice something a bit odd though - the lock-screen version of the notification is still showing as a Comment:

edit_media_ _testing_timmy_timmay_timmaay_timmaaay_timmaaaay_timmaaaaay_timmaaaaaay_timmaaaaaaay_timmaaaaaaaay_timmaaaaaaaaay_timmaaaaaaaaaay_ _wordpress

In the list-view of the App, things look fine:

edit_media_ _testing_timmy_timmay_timmaay_timmaaay_timmaaaay_timmaaaaay_timmaaaaaay_timmaaaaaaay_timmaaaaaaaay_timmaaaaaaaaay_timmaaaaaaaaaay_ _wordpress 2

I wonder if there is some other code that triggers the push notification that runs on a job server, and as such still send the initial push notif as a comment. Seems like the easiest way to test this assumption is to merge in the diff and give it a try :)

Also just noticed that the default gravatar works on the push notif too

Yeah merging the diff should correct the push notification. We only see the new content in the app since public-api.wordpress.com is sandboxed, but the notification is being sent with production code.

This has been launched in r166039-wpcom.

Was this page helpful?
0 / 5 - 0 ratings