Skip to content

Conversation

@dblandin
Copy link
Member

@dblandin dblandin commented Nov 24, 2025

Important

I'm not planning to merge this PR until we have aligned on the survey content and prompt logic.

Description

Implements a new modal screen for displaying Typeform surveys using a customized WebView. The component integrates with analytics tracking to monitor survey engagement.

Key features:

  • Embeds Typeform surveys via WebView
  • Modal presentation with custom header ("Survey")
  • Tracks survey viewed, submitted, and abandoned events
  • Fullscreen form display with hidden Typeform branding
  • Thank you screen with close button after submission
  • Generic survey tracking hook for reusability

Technical implementation:

  • New /typeform/:id route with alwaysPresentModally option
  • Event handling via window.ReactNativeWebView.postMessage bridge
  • CSS to ensure fullscreen display and hide Typeform close button

Jira: ONYX-1984 🔒

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos at least on Android, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • add typeform-backed survey support

Screen Recording

Platform After
iOS
Simulator.Screen.Recording.-.iPhone.16e.-.2025-11-24.at.20.01.17.mov

Need help with something? Have a look at our docs, or get in touch with us.

Implements a new modal screen for displaying Typeform surveys using the
Typeform embed SDK. The component integrates with analytics tracking to monitor
survey engagement.

Key features:
- Embeds Typeform surveys via WebView using the official embed.js SDK
- Modal presentation with custom header ("Survey")
- Tracks survey viewed, submitted, and abandoned events
- Fullscreen form display with hidden Typeform branding
- Thank you screen with close button after submission
- Generic survey tracking hook for reusability

Technical implementation:
- New /typeform/:id route with alwaysPresentModally option
- WebView with HTML embedding Typeform SDK's createWidget() API
- Event handling via window.ReactNativeWebView.postMessage bridge
- Renamed useTypeformTracking to useSurveyTracking for generic use
- CSS to ensure fullscreen display and hide Typeform close button
@dblandin dblandin self-assigned this Nov 24, 2025
@dblandin dblandin marked this pull request as ready for review November 24, 2025 20:19
@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Cross-platform user-facing changes (add typeform-backed survey support - dblandin)

Generated by 🚫 dangerJS against c20d101

@dblandin dblandin marked this pull request as draft November 26, 2025 12:56
Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

Really nice! This opens so many opportunities!

queries: [TagScreenQuery],
},
{
path: "/typeform/:id",
Copy link
Member

Choose a reason for hiding this comment

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

nice! maybe we can add this to AndroidManifest.xml to allow opening this with a deep link

Comment on lines +43 to +44
action: "surveySubmitted" as ActionType,
context_screen_owner_type: "survey" as OwnerType,
Copy link
Member

Choose a reason for hiding this comment

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

can we add this to cohesion at a later stage 👀

Copy link
Member

Choose a reason for hiding this comment

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

nitpiclk: Do you mind moving this within hooks like here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants