Skip to content

Fallback to modal if elementId is not found during live preview#131

Merged
BernardGatt merged 1 commit intodevelopfrom
INAPP-14308
Mar 26, 2026
Merged

Fallback to modal if elementId is not found during live preview#131
BernardGatt merged 1 commit intodevelopfrom
INAPP-14308

Conversation

@BernardGatt
Copy link
Copy Markdown
Collaborator

@BernardGatt BernardGatt commented Mar 26, 2026

During live preview, if an elementId is not found we fallback to a modal and show an indicator around the elementId text field.

Addresses: INAPP-14308


Note

Medium Risk
Changes message rendering behavior during preview sessions by conditionally switching from embedded to overlay display; risk is moderate because it affects how in-app messages are presented and could alter preview vs. production parity if the gating is wrong.

Overview
Improves live preview resilience when an embedded message’s elementId is invalid or missing.

handleMessage now detects live preview embedded messages and, if the target element can’t be found via findElement, falls back to showMessage (overlay/modal) so the message still renders and placement can be adjusted; otherwise it continues embedding as before. The preview bar also validates the element selector field and visually marks it invalid via a new gist-pb-input--invalid style, and tests were added/updated to cover the new preview fallback behavior.

Written by Cursor Bugbot for commit 8355d91. This will update automatically on new commits. Configure here.

…dal and show an indicator around the elementId text field.
@BernardGatt BernardGatt requested a review from a team as a code owner March 26, 2026 08:46
@BernardGatt BernardGatt merged commit afecdd1 into develop Mar 26, 2026
2 checks passed
@BernardGatt BernardGatt deleted the INAPP-14308 branch March 26, 2026 08:53
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.

2 participants