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

Update IAM view controller to hide status bar on full-bleed In-App Messages #1390

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

jennantilla
Copy link
Contributor

@jennantilla jennantilla commented Mar 21, 2024

Description

One Line Summary

Update OSInAppMessageViewController to hide status bar on full screen, no margin (AKA full-bleed) In-App Messages.

Details

Motivation

When an In-App Message displays, the iOS Status Bar appears even if hidden in the app. This fix assess whether the In-App Message is full screen without margins and if so, sets the property prefersStatusBarHidden to true so that the status bar will not display. Note that for banner, center modal, and full screen with margin In-App Messages, the status bar will remain visible.

Scope

This change affects only the OSInAppMessageViewController.

Testing

Manual testing

Tested a series on In-App Messages where the status bar appears on a center modal IAM, full screen IAM, and banner IAM, then is removed for a full-bleed IAM:

Testing was done on an iPhone 15 Emulator running iOS 17.2.

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

@jennantilla jennantilla changed the title Update IAM view controller to hide status bar Update IAM view controller's prefersStatusBarHidden property to match root view controller Apr 4, 2024
@jennantilla jennantilla force-pushed the fix/iam_status_bar branch 2 times, most recently from 2140c45 to 360ad31 Compare April 10, 2024 19:40
@jennantilla jennantilla changed the title Update IAM view controller's prefersStatusBarHidden property to match root view controller Update IAM view controller to hide status bar on full screen In-App Messages Apr 10, 2024
@jennantilla
Copy link
Contributor Author

PR has been updated to only remove status bar on full screen IAM.
cc @emawby

@nan-li
Copy link
Contributor

nan-li commented Apr 10, 2024

General question for all reviewers: Should we distinguish between full-screen w/margin vs. full-bleed IAMs without margin? Keep the status bar for the first one below?

@jennantilla jennantilla changed the title Update IAM view controller to hide status bar on full screen In-App Messages Update IAM view controller to hide status bar on full-bleed In-App Messages Apr 11, 2024
@jennantilla
Copy link
Contributor Author

Updated to only hide status bar for full-bleed IAMs.

@nan-li nan-li merged commit b3b2a8b into main Apr 15, 2024
4 checks passed
@nan-li nan-li deleted the fix/iam_status_bar 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.

3 participants