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

chore: dismiss message if message expires #733

Merged
merged 22 commits into from
Jun 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f0c5d97
chore: get WebView for inline message and add to Inline View to display
levibostian May 20, 2024
1c38f27
chore: add AutoLayout constraints to make inline messages visible in …
levibostian May 20, 2024
f96607f
chore: display inline messages fetched after View constructed
levibostian May 20, 2024
434d587
chore: when in-app web content rendered, animate visibility of inline…
levibostian May 22, 2024
b6a03f9
animate height to 0
levibostian Jun 4, 2024
b0231ea
when fetch is done and message expired, dismiss it.
levibostian Jun 4, 2024
66e9b4d
write test inline view that checks if a fetch is done and message exp…
levibostian Jun 4, 2024
2951c97
Apply suggestions from code review
levibostian Jun 4, 2024
966e3f9
improve onDoneRenderingInAppMessage in tests by better explaining how…
levibostian Jun 4, 2024
7b9008b
Merge remote-tracking branch 'origin/levi/inline-dismiss-when-expire'…
levibostian Jun 4, 2024
d89934a
revert failed test. I'll fix it in previous commit where it was intro…
levibostian Jun 4, 2024
22b4183
Merge branch 'feature-inline-inapp' into levi/display-inline-uiview-a…
levibostian Jun 4, 2024
8b62311
fix failed test.
levibostian Jun 11, 2024
c89822c
fix the message comparison to use the queue id and not the template id.
levibostian Jun 11, 2024
7cede1d
Merge branch 'levi/display-inline-uiview-afterfetch' into levi/inline…
levibostian Jun 11, 2024
7363f0c
Merge branch 'levi/inline-animate-open' into levi/inline-dismiss-when…
levibostian Jun 11, 2024
4aa0f25
Merge branch 'feature-inline-inapp' into levi/inline-dismiss-when-expire
levibostian Jun 12, 2024
12c5cad
Merge branch 'feature-inline-inapp' into levi/inline-dismiss-when-expire
levibostian Jun 25, 2024
1b114ce
get code and tests to compile and pass
levibostian Jun 26, 2024
d816d9c
add tests for height and width constraints
levibostian Jun 26, 2024
863775a
fix lint
levibostian Jun 26, 2024
eeaec8e
add tests for verifying dismissed after constructed.
levibostian Jun 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'feature-inline-inapp' into levi/inline-dismiss-when-expire
  • Loading branch information
levibostian committed Jun 12, 2024
commit 4aa0f258cf1702cd5a951d2b74c57e60ba130ca6
2 changes: 1 addition & 1 deletion Sources/MessagingInApp/Views/InAppMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
private func setupView() {
// Customer did not set a height constraint. Create one so the View has one.
// It's important to have only 1 active constraint for height or UIKit will ignore some constraints.
// Try to re-use a constraint is one is already added instead of replacing it. Some scenarios such as
// Try to re-use a constraint if one is already added instead of replacing it. Some scenarios such as
// when UIView is nested in a UIStackView and distribution is .fillProportionally, the height constraint StackView adds is important to keep.
if viewHeightConstraint == nil {
heightAnchor.constraint(equalToConstant: 0).isActive = true
Expand Down Expand Up @@ -104,7 +104,7 @@

private func displayInAppMessage(_ message: Message) {
// Do not re-show the existing message if already shown to prevent the UI from flickering as it loads the same message again.
if let currentlyShownMessage = inlineMessageManager?.currentMessage, currentlyShownMessage.queueId == messageToDisplay.queueId {

Check failure on line 107 in Sources/MessagingInApp/Views/InAppMessageView.swift

View workflow job for this annotation

GitHub Actions / automated-tests

cannot find 'messageToDisplay' in scope

Check failure on line 107 in Sources/MessagingInApp/Views/InAppMessageView.swift

View workflow job for this annotation

GitHub Actions / Generate SDK size reports

cannot find 'messageToDisplay' in scope

Check failure on line 107 in Sources/MessagingInApp/Views/InAppMessageView.swift

View workflow job for this annotation

GitHub Actions / Building app...CocoaPods-FCM

cannot find 'messageToDisplay' in scope

Check failure on line 107 in Sources/MessagingInApp/Views/InAppMessageView.swift

View workflow job for this annotation

GitHub Actions / Building app...APN-UIKit

cannot find 'messageToDisplay' in scope
return // already showing this message, exit early.
}

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.