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

Fixed missing tracks for error notifications #12184

Merged
merged 12 commits into from Jul 20, 2020
Merged

Conversation

mzorz
Copy link
Contributor

@mzorz mzorz commented Jun 12, 2020

Fixes #12063

For a reference, check original PR in #10679

  • When a post/page upload or media upload resulted in an error notification being shown, these notifications were not being properly tracked.
    This PR fixes that, by checking the proper ARG_NOTIFICATION_TYPE in onNewIntent in the related activities (it was being set properly in the upload service and related classes, but not used when intended).

- While at it, also fixed an issue in b739754: tracking code was only being called for new instances of WPMainActivity, when it should really have been the case for new intents to always get tracked. reverted in cef1846

To test:

CASE A: Post list

  1. start writing a Post
  2. add a local video
  3. exit the editor while it's uploading
  4. send the app to the background so the notification will appear when needed (see next steps)
  5. turn airplane mode ON
  6. the error notification that the upload couldn't be made appears
  7. tap on the error notification
  8. observe the call to trackTappedNotification gets executed

Variant: try creating the post from the Post list or from the Main activity, results should be the same (special case is when the Posts list it still instantiated, so don't go back to the Main activity in step 4 to let it sit there).

CASE B: Pages
Follow the same steps above but create a Page instead.

CASE C: Media

  1. go to the Media section of the site / app
  2. tap on the + button to create a media item and upload
  3. select choose video from device
  4. tap on a video
  5. while the video is uploading, exit the activity
  6. now send the app to the background
  7. turn airplane mode ON
  8. wait for the error notification to appear
  9. tap on it
  10. observe the call to trackTappedNotification gets executed

PR submission checklist:

  • I have considered adding unit tests where possible.
  • 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 Jun 12, 2020

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

@mzorz mzorz requested a review from develric June 12, 2020 15:26
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 12, 2020

You can test the changes on this Pull Request by downloading the APK here.

@oguzkocer
Copy link
Contributor

Hi there! 15.1 is being frozen, so this PR is being bumped to 15.2. If these changes have to be shipped with 15.1, please target release/15.1 and cc me in the PR so I can cut a new beta release. Also if you can keep the release dates in mind and bump the PRs & issues you are working on before the code freeze date, we'd really appreciate it.

This is a standard release version bump message. Let me know if you have any feedback.

@oguzkocer oguzkocer modified the milestones: 15.1, 15.2 Jun 15, 2020
@develric develric self-assigned this Jun 16, 2020
Copy link
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Good catch with this @mzorz 👍 !

I did a first pass and left a couple of notes/doubts I have to get your feedback. Let me know wdyt, thanks 🙇‍♂️

@oguzkocer
Copy link
Contributor

Hi there! 15.2 is being frozen, so this PR is being bumped to 15.3. If these changes have to be shipped with 15.2, please target release/15.2 and cc me in the PR so I can cut a new beta release. Also if you can keep the release dates in mind and bump the PRs & issues you are working on before the code freeze date, we'd really appreciate it.

@oguzkocer oguzkocer modified the milestones: 15.2 ❄️, 15.3 Jun 29, 2020
@oguzkocer
Copy link
Contributor

@mzorz @develric This issue is being bumped a second time without any updates. Could you please either merge it until the next code freeze or update the milestone manually and document the blocker for it? Thank you!


Hi there! 15.3 is being frozen, so this PR is being bumped to 15.4. If these changes have to be shipped with 15.3, please target release/15.3 and cc me in the PR so I can cut a new beta release. Also if you can keep the release dates in mind and bump the PRs & issues you are working on before the code freeze date, we'd really appreciate it.

This is a standard release version bump message. Let me know if you have any feedback.

@oguzkocer oguzkocer modified the milestones: 15.3, 15.4 Jul 13, 2020
@mzorz
Copy link
Contributor Author

mzorz commented Jul 13, 2020

@mzorz @develric This issue is being bumped a second time without any updates. Could you please either merge it until the next code freeze or update the milestone manually and document the blocker for it? Thank you!

Hi @oguzkocer ! This PR was a side contribution made in the last bit of HACK week and I was planning on following up with @develric's comments, but got busy with stories alpha, hence deprioritized this one in my ToDo list since this is not even a blocker. Should have made a comment about that here, getting back at it now 👍

@oguzkocer
Copy link
Contributor

@mzorz No worries about keeping a PR open but not getting to work on it. We just need to document our intentions in the PR for others, in this case release managers, to see. For example, it'd be totally fine to remove the milestone, convert the PR to a draft and add a comment saying "This is not a priority right now, so will work on it when I can". Hope that makes sense!

@mzorz
Copy link
Contributor Author

mzorz commented Jul 13, 2020

Your point about communication is clear @oguzkocer 👍

@mzorz mzorz marked this pull request as draft July 13, 2020 13:44
@mzorz mzorz removed this from the 15.4 milestone Jul 13, 2020
@mzorz
Copy link
Contributor Author

mzorz commented Jul 13, 2020

Ready for another round @develric - this time keeping the PR constrained to fixing what the issue describes 👍 🙇

@mzorz mzorz marked this pull request as ready for review July 13, 2020 19:20
@mzorz mzorz added this to the 15.4 milestone Jul 13, 2020
@planarvoid planarvoid removed their request for review July 16, 2020 12:41
Copy link
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Hi @mzorz 👋! Checked this again and LGTM 👍. I tested the behavior as per reported steps and it works as expected. Only left a comment related to a small np, otherwise I'm fine to merge it. Let me know and thanks 🙇‍♂️.

Copy link
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Thanks for the np update 🙇‍♂️ ! LGTM :shipit:

@develric develric merged commit 143172e into develop Jul 20, 2020
@develric develric deleted the issue/12063-missing-tracks branch July 20, 2020 08:20
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.

Add tracking for missing intent entry points
3 participants