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

[User Model] Add back the dropshadow to In App Messages with a plist option to disable it #1395

Merged
merged 1 commit into from Apr 15, 2024

Conversation

emawby
Copy link
Contributor

@emawby emawby commented Apr 4, 2024

Description

One Line Summary

Add back the dropshadow to In App Messages with a plist option to disable it

Details

The drop shadow was removed from iOS In App Messages to support transparent In App Messages. However this results in banner IAMs not looking correct if the background color of the message matches the color of the app underneath it.

To solve both use cases developers can now use boolean plist setting OneSignal_in_app_message_hide_drop_shadow to toggle if they want a drop shadow or not. Note that this is a setting that would apply to all in app messages.

Examples without the dropshadow

Examples with the dropshadow

Motivation

Banner IAMs look incorrect when matching the background color of the app

Scope

New and existing In App Messsage visual behavior

Testing

Unit testing

n/a

Manual testing

tested on multiple IAM types with a simulator without plist, with plist option to yes, and with plist option to no

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

This was removed when supporting transparent background IAMs, but it makes banner IAMs with white backgrounds look incorrect.

control the IAM dropshadow with a plist setting
Copy link
Contributor

@jennantilla jennantilla 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! Observed default drop shadow on IAM and then tested setting OneSignal_in_app_message_hide_drop_shadow to YES in plist, confirmed that drop shadow is removed on same IAM where it was previously visible.

@nan-li nan-li merged commit 472249f into main Apr 15, 2024
4 checks passed
@nan-li nan-li deleted the dropshadow_fix branch April 15, 2024 21:35
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.

None yet

3 participants