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

Added snackbar when coming from Zendesk notfication #8043

Merged
merged 4 commits into from
Jul 17, 2018

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented Jul 16, 2018

While testing notifications for WPAndroid 10.4 we identified a (what seemed to us broken) flow when tapping a Zendesk notification that only brings you to the Me screen in WPAndroid, leaving it up to the user to figure out that they have to tap on Help & Support and then My Tickets, then finally select the conversation to be able to take it up from there.

From conversations with @oguzkocer and @aerych it looks like there were many hurdles with this integration, and this was actually a expected behavior as explained in #7839 and was so described in the tests steps in #7955

This PR adds a snackbar that explains the user a bit more as to what they need to do in order to complete the desired action (to look into an HE answer to a question they initiated through Help & Support -> Contact Us section of the app).

BEFORE:
zendesksnackbarno

AFTER:
zendesksnackbar
(see even on a screen not so small, the Help & Support section of the app is not even shown, so it's even harder to decide what to do next weren't it for the snackbar).

To test:

  1. initiate a conversation on Zendesk by going to the Me tab, then tap Help & Support and finally Contact us.
  2. Send the app to the background (even ideally, just exist the section by tapping back twice).
  3. have a HE answer your message
  4. Observe the push notification is received, and a notification is shown
  5. Tap on the notification and see the WP app is opened in the Me tab and a snackbar appears, explaining what to do next in order to complete the desired action.

cc-ing @SylvesterWilmott by recommendation from @aerych: even if there's not much space of action here, I'd love to hear your feedback - feel free to please recommend a better message if needed, and we can also make the length to which the Snackbar stays on screen to a specific amount of time (for example, 5 seconds).
Maybe not as urgently, if I may request, do you think there might be better way to explain / close the gap in this flow while we still don't have proper deep-linking (i.e. a way to make a tap on the notification directly open the conversation within context)?. Thanks in advance.

cc @oguzkocer for code review

cc @loremattei so we keep an eye on it before full rollout of 10.4

@mzorz mzorz added this to the 10.4 milestone Jul 16, 2018
@mzorz mzorz requested a review from oguzkocer July 16, 2018 21:02
Copy link
Contributor

@oguzkocer oguzkocer left a comment

Choose a reason for hiding this comment

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

Code looks good! :shipit:

I kind of want to figure out the deep linking issue though, this still feels weird, albeit better than the current solution. Thanks for the PR @mzorz, I'll wait for the design review and feedback for the merge!

@mzorz
Copy link
Contributor Author

mzorz commented Jul 16, 2018

Totally agreed we should aim at having deep linking; this is only a patch to all extent 👍

@@ -292,6 +294,11 @@ private void handleOpenPageIntent(Intent intent) {
break;
case ARG_ME:
mBottomNav.setCurrentPosition(PAGE_ME);
if (intent.getBooleanExtra(WPMainActivity.ARG_SHOW_ZENDESK_HINT_SNACKBAR, false)) {
Snackbar.make(findViewById(R.id.coordinator),
R.string.support_push_notification_message_hint_snackbar, Snackbar.LENGTH_LONG).show();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can I suggest to use a timeout of 2 x Snackbar.LENGTH_LONG ?
Since there is no way to bring it back when it's gone, and the users can still don't know where to go to open the tickets. (feel free to ignore this if the current timeout on real usage is long enough).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in 998274e

@SylvesterWilmott
Copy link

@oguzkocer @mzorz

Is there a way to bring the user to the "Help & Support" View instead of "Me" then we can guide them using the orange dot on the tickets row?

@mzorz
Copy link
Contributor Author

mzorz commented Jul 17, 2018

Hi @SylvesterWilmott
I like that idea - I only followed what's described in points 2 and 3 in #7839; as per that it seems there is no easy way. I'd like to explore a bit more myself but unfortunately we need to release 10.4 soon and that doesn't give us much time - but we can continue the exploration of course in a new ticket. I can explore a bit during the next few hours and if not, may I suggest we go forward with this, adding the length in time wait suggested by @daniloercoli and then open the discussion for the better option on a other issue?

@SylvesterWilmott
Copy link

Sounds good to me @mzorz

@mzorz
Copy link
Contributor Author

mzorz commented Jul 17, 2018

Merging this one into 10.4, and will make #8054 a part of the 10.5 alpha/beta cc @loremattei

@mzorz mzorz merged commit 795d4b9 into release/10.4 Jul 17, 2018
@mzorz mzorz deleted the fix/zendesk-notification-flow branch July 17, 2018 20:26
@oguzkocer
Copy link
Contributor

Is there a way to bring the user to the "Help & Support" View instead of "Me" then we can guide them using the orange dot on the tickets row?

@SylvesterWilmott We couldn't add the dot, because Zendesk doesn't provide that functionality and iOS relies on push notifications which is not very reliable, at least not on Android. If we were to implement it, it's likely that we'd show the dot in some cases where there is no new ticket and we won't show the dot when there is one. I think that's more confusing than not having the dot at all.

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.

4 participants