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

Always remove the window when an IAM is dismissed #1276

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Koji23
Copy link
Contributor

@Koji23 Koji23 commented Jul 14, 2023

Description

One Line Summary

Always remove the window when an IAM is dismissed

Details

If you do any kind of prompt action while having another IAM queued for display with the same trigger the IAM, the IAM can get stuck and prevent clicking on the app beneath it. We can avoid this by ensuring the window is always removed when the IAM is dismissed

Asana Task

https://app.asana.com/0/1198177413178126/1204945334125976/f

Motivation

REQUIRED - Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X.

Customer is complaining that when they open the iOS native payment screen from an IAM button click, the IAM gets stuck and prevents payment.

Scope

RECOMMEND - OPTIONAL - What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.

OPTIONAL - Other

OPTIONAL - Feel free to add any other sections or sub-sections that can explain your PR better.

Testing

Unit testing

OPTIONAL - Explain unit tests added, if not clear in the code.

Manual testing

RECOMMEND - OPTIONAL - Explain what scenarios were tested and the environment.
Example: Tested opening a notification while the app was foregrounded, app build with Android Studio 2020.3 with a fresh install of the OneSignal example app on a Pixel 6 with Android 12.

We've tested trying to dismiss the IAM while simultaneously adding a click name and pausing all IAMs. This can occasionally cause the IAM's view controller to get stuck and it's window will block you from clicking the app underneath

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@Koji23 Koji23 changed the title Prevent prompt action window bug Always remove the window when an IAM is dismissed Jul 14, 2023
@Koji23 Koji23 requested a review from emawby July 14, 2023 18:29
@emawby emawby requested a review from jkasten2 July 14, 2023 19:08
Copy link
Contributor

@emawby emawby left a comment

Choose a reason for hiding this comment

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

Looks good lets just cleanup the commit history!

This is required for a bug when doing prompt actions if there are multiple IAMs in the queue.
@Koji23 Koji23 force-pushed the prevent_prompt_action_window_bug branch from 6e49878 to e4af367 Compare July 14, 2023 19:43
@Koji23 Koji23 requested a review from emawby July 14, 2023 20:10
@emawby
Copy link
Contributor

emawby commented Jul 17, 2023

It looks like the iOS 9 unit tests are flaky (they succeed when run individually locally for me). I wouldn't worry about the test failure

@emawby emawby merged commit a7a6142 into main Jul 17, 2023
1 of 2 checks passed
@emawby emawby deleted the prevent_prompt_action_window_bug branch July 17, 2023 18:45
@emawby emawby mentioned this pull request Jul 27, 2023
emawby added a commit that referenced this pull request Aug 10, 2023
@emawby emawby mentioned this pull request Aug 10, 2023
18 tasks
nan-li pushed a commit that referenced this pull request Oct 30, 2023
nan-li pushed a commit that referenced this pull request Oct 30, 2023
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