diff --git a/frontend/src/layout/navigation/TopBar/TopBar.tsx b/frontend/src/layout/navigation/TopBar/TopBar.tsx index 585cb5554b1c0..9c307caa1c6f7 100644 --- a/frontend/src/layout/navigation/TopBar/TopBar.tsx +++ b/frontend/src/layout/navigation/TopBar/TopBar.tsx @@ -16,12 +16,19 @@ import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { FEATURE_FLAGS } from 'lib/constants' import { NotebookButton } from '~/layout/navigation/TopBar/NotebookButton' import { ActivationSidebarToggle } from 'lib/components/ActivationSidebar/ActivationSidebarToggle' +import { organizationLogic } from 'scenes/organizationLogic' +import { LemonButtonWithDropdown, Lettermark } from '@posthog/lemon-ui' +import { ProjectSwitcherOverlay } from '../ProjectSwitcher' +import { topBarLogic } from './topBarLogic' export function TopBar(): JSX.Element { const { isSideBarShown, noSidebar, minimalTopBar, mobileLayout } = useValues(navigationLogic) const { toggleSideBarBase, toggleSideBarMobile } = useActions(navigationLogic) const { groupNamesTaxonomicTypes } = useValues(groupsModel) const { featureFlags } = useValues(featureFlagLogic) + const { currentOrganization } = useValues(organizationLogic) + const { isProjectSwitcherShown } = useValues(topBarLogic) + const { toggleProjectSwitcher, hideProjectSwitcher } = useActions(topBarLogic) const hasNotebooks = !!featureFlags[FEATURE_FLAGS.NOTEBOOKS] @@ -71,11 +78,32 @@ export function TopBar(): JSX.Element { )}
How pricing works
@@ -231,8 +239,8 @@ export const PlanComparison = ({ > |
|
@@ -283,6 +291,10 @@ export const PlanComparison = ({
---|---|
([
},
],
isDemoProject: [
- teamLogic.values.currentTeam?.is_demo as null | boolean,
+ false as null | boolean,
{
setState: (_, { isDemoProject }) => isDemoProject,
},
diff --git a/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx b/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx
index c6901e9d7b829..552a490688887 100644
--- a/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx
+++ b/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx
@@ -43,7 +43,7 @@ export const OnboardingBillingStep = ({
reportBillingUpgradeClicked(product.type)
}}
>
- Upgrade to paid
+ Subscribe
)
}
diff --git a/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx b/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx
index 54618e56a0d64..6c3e92e9af68c 100644
--- a/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx
+++ b/frontend/src/scenes/onboarding/OnboardingOtherProductsStep.tsx
@@ -1,8 +1,8 @@
-import { LemonButton, LemonCard } from '@posthog/lemon-ui'
+import { useWindowSize } from 'lib/hooks/useWindowSize'
import { OnboardingStep } from './OnboardingStep'
import { OnboardingStepKey, onboardingLogic } from './onboardingLogic'
import { useActions, useValues } from 'kea'
-import { getProductIcon } from 'scenes/products/Products'
+import { ProductCard } from 'scenes/products/Products'
export const OnboardingOtherProductsStep = ({
stepKey = OnboardingStepKey.OTHER_PRODUCTS,
@@ -11,6 +11,8 @@ export const OnboardingOtherProductsStep = ({
}): JSX.Element => {
const { product, suggestedProducts } = useValues(onboardingLogic)
const { completeOnboarding } = useActions(onboardingLogic)
+ const { width } = useWindowSize()
+ const horizontalCard = width && width >= 640
return (
+
{suggestedProducts?.map((suggestedProduct) => (
-
diff --git a/frontend/src/scenes/onboarding/OnboardingStep.tsx b/frontend/src/scenes/onboarding/OnboardingStep.tsx
index a4bfdd92cbf42..171c607bf3d43 100644
--- a/frontend/src/scenes/onboarding/OnboardingStep.tsx
+++ b/frontend/src/scenes/onboarding/OnboardingStep.tsx
@@ -14,6 +14,7 @@ export const OnboardingStep = ({
showSkip = false,
onSkip,
continueOverride,
+ backActionOverride,
}: {
stepKey: OnboardingStepKey
title: string
@@ -22,6 +23,7 @@ export const OnboardingStep = ({
showSkip?: boolean
onSkip?: () => void
continueOverride?: JSX.Element
+ backActionOverride?: () => void
}): JSX.Element => {
const { hasNextStep, hasPreviousStep } = useValues(onboardingLogic)
const { completeOnboarding, goToNextStep, goToPreviousStep } = useActions(onboardingLogic)
@@ -39,14 +41,20 @@ export const OnboardingStep = ({
-
- {getProductIcon(suggestedProduct.icon_key, 'text-2xl')}
-
-
- {suggestedProduct.name}-{suggestedProduct.description} -
-
-
+ {title}{subtitle} {children} diff --git a/frontend/src/scenes/onboarding/sdks/SDKs.tsx b/frontend/src/scenes/onboarding/sdks/SDKs.tsx index 9a91ad06268d6..94556254fab58 100644 --- a/frontend/src/scenes/onboarding/sdks/SDKs.tsx +++ b/frontend/src/scenes/onboarding/sdks/SDKs.tsx @@ -8,6 +8,8 @@ import { useEffect } from 'react' import React from 'react' import { SDKInstructionsMap } from '~/types' import { InviteMembersButton } from '~/layout/navigation/TopBar/SitePopover' +import { IconArrowLeft } from '@posthog/icons' +import { useWindowSize } from 'lib/hooks/useWindowSize' export function SDKs({ usersAction, @@ -20,23 +22,37 @@ export function SDKs({ subtitle?: string stepKey?: OnboardingStepKey }): JSX.Element { - const { setSourceFilter, setSelectedSDK, setAvailableSDKInstructionsMap } = useActions(sdksLogic) - const { sourceFilter, sdks, selectedSDK, sourceOptions, showSourceOptionsSelect } = useValues(sdksLogic) + const { setSourceFilter, setSelectedSDK, setAvailableSDKInstructionsMap, setShowSideBySide, setPanel } = + useActions(sdksLogic) + const { sourceFilter, sdks, selectedSDK, sourceOptions, showSourceOptionsSelect, showSideBySide, panel } = + useValues(sdksLogic) const { productKey } = useValues(onboardingLogic) + const { width } = useWindowSize() + const minimumSideBySideSize = 768 useEffect(() => { setAvailableSDKInstructionsMap(sdkInstructionMap) }, []) + useEffect(() => { + width && setShowSideBySide(width > minimumSideBySideSize) + }, [width]) + return (
-
+
{showSourceOptionsSelect && (
{selectedSDK && productKey && !!sdkInstructionMap[selectedSDK.key] && (
-
+
+ {!showSideBySide && (
+
)}
diff --git a/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx b/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
index 83203a1ef7bc4..2cfef0711bf10 100644
--- a/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
+++ b/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
@@ -40,6 +40,8 @@ export const sdksLogic = kea
- {getProductIcon(product.icon_key, 'text-2xl')}
+
+
-
+
{getProductIcon(product.icon_key, 'text-2xl')}
+
- {product.name}+
+
- {product.name}+{product.description} {product.description} -
+
{onboardingCompleted ? (
+
)}
|