-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mobile replay onboarding (#21122)
* feat: mobile replay in onboarding * wrap replay in a flag too * Update frontend/src/scenes/onboarding/sdks/product-analytics/android.tsx * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * change text * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4d75323
commit a54ae88
Showing
11 changed files
with
126 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
frontend/src/scenes/onboarding/sdks/product-analytics/android.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,44 @@ | ||
import { CodeSnippet, Language } from 'lib/components/CodeSnippet' | ||
import { FlaggedFeature } from 'lib/components/FlaggedFeature' | ||
import { FEATURE_FLAGS } from 'lib/constants' | ||
import { LemonTag } from 'lib/lemon-ui/LemonTag' | ||
import { Link } from 'lib/lemon-ui/Link' | ||
import { OnboardingStepKey } from 'scenes/onboarding/onboardingLogic' | ||
import { urls } from 'scenes/urls' | ||
|
||
import { SDKKey } from '~/types' | ||
|
||
import { SDKInstallAndroidInstructions } from '../sdk-install-instructions' | ||
|
||
function AndroidCaptureSnippet(): JSX.Element { | ||
return <CodeSnippet language={Language.Kotlin}>{`PostHog.capture(event = "test-event")`}</CodeSnippet> | ||
} | ||
|
||
function AdvertiseAndroidReplay(): JSX.Element { | ||
return ( | ||
<div> | ||
<h3 className="mt-8"> | ||
Session Replay for Android <LemonTag type="highlight">NEW</LemonTag> | ||
</h3> | ||
<div> | ||
Session replay is now in beta for Android.{' '} | ||
<Link to={urls.onboarding('session_replay', OnboardingStepKey.INSTALL, SDKKey.ANDROID)}> | ||
Learn how to set it up | ||
</Link> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export function ProductAnalyticsAndroidInstructions(): JSX.Element { | ||
return ( | ||
<> | ||
<SDKInstallAndroidInstructions /> | ||
<h3>Send an Event</h3> | ||
<AndroidCaptureSnippet /> | ||
<FlaggedFeature flag={FEATURE_FLAGS.SESSION_REPLAY_MOBILE_ONBOARDING} match={true}> | ||
<AdvertiseAndroidReplay /> | ||
</FlaggedFeature> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
frontend/src/scenes/onboarding/sdks/session-replay/android.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { SDKInstallAndroidInstructions } from '../sdk-install-instructions' | ||
import { SessionReplayFinalSteps } from '../shared-snippets' | ||
|
||
export function AndroidInstructions(): JSX.Element { | ||
return ( | ||
<> | ||
<SDKInstallAndroidInstructions includeReplay={true} /> | ||
<SessionReplayFinalSteps /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './android' | ||
export * from './html-snippet' | ||
export * from './js-web' | ||
export * from './next-js' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters