:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(organization): improve orgless landing with invites and nav fix (#67717)
Yasenc1d80e7e9183
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex ad44b50d2ce3..0f012cc7d4f2 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -7143,11 +7143,11 @@ snapshots:scenes-other-onboarding--alerts--dark:hash: v1.k794b7964.d66fb935e8f6fcf6d71031d9a59bf76501c90d29e5e5bae324b2cb2bbcd15ed7.4Cvshejpp_prXnrtkj5xZMl08OoFB6I6RreTrsQ4Hnoscenes-other-onboarding--alerts--light:- hash: v1.k794b7964.6289e3813dad372271836e4f1b18ed98254f952acfc6799350a8fb480cb7e025.k2a7W-1H57eRSmR8Rb0dkwBKkgC2deYg9gg6O5pEtLc+ hash: v1.k794b7964.41cd72d113dbabae6ebcf23dbfdacc8b535ad34e5436103f8945d0af47ee4deb.BvuoiWqFcTxLJvjrQHgVjzIDRfllHQ-JnuREmM5Iaukscenes-other-onboarding--authorized-domains--dark:hash: v1.k794b7964.9886263df793333bf1ee4b66415d2b1ed206610cf0e5336e4dc2bb27afce7b14.KiJTexadkCbTOL8iyc399MqFE4IY_voHSYfZ1PGNjgkscenes-other-onboarding--authorized-domains--light:- hash: v1.k794b7964.2d8822c2a95ea06c6cd2d0fba8fa416165ca6bcd724c949d321a8544acc3d05f.-0M3R1jP8KF-g6ueO8N7qSEOIt0jvjGuyyJZtqxy1Og+ hash: v1.k794b7964.67d37e90157429ae76c6f5b86ed67245d90aa27cb3ad1be3c61de8cdcc7e7ed5.FkMs-_H3XtKYvvULywMN_EpVnQ7d_qGLwrt-uR_0iCEscenes-other-onboarding--billing-plans--dark:hash: v1.k794b7964.41ab1ce887f4c1a68f45cf4044c8f479e2add2e5b9f93410aa047969aeb3fced.B9dxZudKMeS9Zh4fd-xQOMgZqpEgsIFrMs8oONCGMb4scenes-other-onboarding--billing-plans--light:@@ -7161,9 +7161,9 @@ snapshots:scenes-other-onboarding--link-data--light:hash: v1.k794b7964.f6e32ff6e7e6060d6d5c93673d1293439a0d78f7c41b2084f54fdb453f9431ea.P02zIsk71npFrOm6mlj1t0VyfyveRGnWDSOJRzEIZZoscenes-other-onboarding--product-analytics-configuration--dark:- hash: v1.k794b7964.08af688052c51fafa75fdcdc3754e7289fc18fb53596a2e928daa418aa02859d.lTGrMS9pD0saS4FeHB0VzmPt5pJKMMHzVx2nVd95gEY+ hash: v1.k794b7964.69fda09bc10c7ffeb440e0ab902416cc29d7d4c2cea68d4e3b0dfabe6c18315f.KvGVQFHDKUAKhH4k3XuFExsPsuxl4KlKWfAHw6ipvFQscenes-other-onboarding--product-analytics-configuration--light:- hash: v1.k794b7964.4a2bcedebc129a67058f79b95c15dda9797691ce565f44d529cbf83e6948d10e.w_sFYsVPreMbVJO-APEJlFdnbCBsuFN6pADVErDgyj8+ hash: v1.k794b7964.a7ee3b12a26a8d149cbdad29d69a5e74244690a0b3756b7fe3ae822db5ce6929.0phsugq0CXwKJ9akmnGUAgHdHrW1dz5CCdyCYRnU49Escenes-other-onboarding--sdk-install--dark:hash: v1.k794b7964.da85532719e44b390eb702a9bf4df7dd327fa9ee48f9fa756975dee8f0687c4b.qpGppQPiMG-9wsUnVVq0FRbrr6fYeeryRpFsep97KSEscenes-other-onboarding--sdk-install--light:@@ -7171,11 +7171,11 @@ snapshots:scenes-other-onboarding--session-replay-configuration--dark:hash: v1.k794b7964.32c694b9a586f8a71c1e309f5e13ee180c2ad0381560c5477cce901849c2e261.7Sv88LFiRZHddXLdspU3d-YHb1JB7YTWR22w_UYwfREscenes-other-onboarding--session-replay-configuration--light:- hash: v1.k794b7964.62817a088bc10850b37fce70cfa47c9cc6869f16567df1c34ce81f0dc02965a8.i6V1WD3WTN22gDYJCCA6r-IzJ1eyCul6TK_YW9jhUWk+ hash: v1.k794b7964.6992ea2fc8f523c031cd943b2e5bb5da976ed0a7485939b0739104ccef5f95ed.USRlvQ57WTk7TRXXv4tQ1fnyOUOmEo9asDHcmwlaKX4scenes-other-onboarding--session-replay-opt-in--dark:hash: v1.k794b7964.a78787c9058f2480382c55c11cdbd046113d89fbd3f8cbaf1e2fee43c1aeff25.FVeLX50ieSkQJITrMiRqK2E4v_oLj6MFiFXs7gF74OAscenes-other-onboarding--session-replay-opt-in--light:- hash: v1.k794b7964.c88de022606ce8608cad67b80e557defdb2f58da9c51a3080bed9d4058f1659f.fvJZNIjmxMd8iI0q8hNF64VPXl-UNK0dDUt1GFhOWjI+ hash: v1.k794b7964.4e3982a68467f46300a76a8e96533f5be0921b1e798da16d9e63c550e7492f65.Q40sdG5pKW5YX78jvGMilDoc_at9qaWUAn8eJ36Ybdgscenes-other-onboarding--source-maps--dark:hash: v1.k794b7964.b9d19f7693cabeefeb37c54ac172bd3496fdc49551272caedcfa1392397d207c.L9BOmU_ClF3vbpyGNg148ckjN7BGtoBYNgX5nyeVbLQscenes-other-onboarding--source-maps--light:@@ -7185,9 +7185,9 @@ snapshots:scenes-other-onboarding--workflows-custom-installation-instructions--light:hash: v1.k794b7964.2b86fc1172428acff28f9a1c1bf41bd403a91b6f867f5e3c9624c8dc282b214b.h5ITntLgMUja78FgDkd3_5BxiQiryXLqYxsubvU8w-wscenes-other-onboarding-product-selection--base--dark:- hash: v1.k794b7964.98c8c237be42cdff687a4d0e17288cf9b87c0ecfd0d45f6fb7038b1c08343afc._0bNgtLiKO3hf65SU97DiFQ1mjUjgeIIbWy7qQl3MwY+ hash: v1.k794b7964.6120efe2d034a7f6b12a5090ee0fcb1780115e97f556c1328441f4f8042954f6.uaCYol1Km8dvShjZ0Lc8RwALjVTWhd3UyBbMcaTOY44scenes-other-onboarding-product-selection--base--light:- hash: v1.k794b7964.b06b552dc3c53616de4d809c892e49843271347fcd2445900585a20a925b47b8.S8Ik2YI5dGrmmDbVIIZsLSquFs8o8GpM38j9XBe6vrM+ hash: v1.k794b7964.e6013b93d5a3062101e38804e4f7329511be7c81b41eb02770228fc5c1b1617b.X7THn8MSxWdnOOKGDNC5e1uuxbT5KnMkU_zLM_DsDaIscenes-other-onboarding-wizard-progress-fab--hidden--light:hash: v1.k794b7964.c06f06ae162e22a589f803b9d9a5baa371aeebafd575a9d69e011e6206500860.3rowYlzZnYCn9bzH6opctCBkugd16afRX5gcTh-YYE4scenes-other-onboarding-wizard-progress-fab--hidden-by-panel--light:diff --git a/frontend/src/layout/navigation-3000/Navigation.scss b/frontend/src/layout/navigation-3000/Navigation.scssindex 2d7da3b2e420..7a21c3eff81c 100644--- a/frontend/src/layout/navigation-3000/Navigation.scss+++ b/frontend/src/layout/navigation-3000/Navigation.scss@@ -16,6 +16,15 @@--scene-padding: 1rem;--scene-padding-bottom: 4rem;+ // Height of the MinimalNavigation top bar (orgless/zen modes). The settings+ // scene's viewport-fixed nav clears it via --settings-nav-top below.+ --minimal-navigation-height: 3.5rem;++ // Top offset for the settings scene's viewport-fixed nav. Defaults to the+ // scene padding (full app layout); the minimal/zen wrapper overrides it to+ // also clear the MinimalNavigation bar so the nav doesn't overlap the logo.+ --settings-nav-top: var(--scene-padding);+@media screen and (max-width: $sm) {// handle notched devices and mobile safari's bottom nav bar// provide a fallback of 80px as Safari's approach to safe-area-inset-bottom is not consistent across versionsdiff --git a/frontend/src/layout/navigation-3000/Navigation.tsx b/frontend/src/layout/navigation-3000/Navigation.tsxindex ac1164232509..67805a1a7a35 100644--- a/frontend/src/layout/navigation-3000/Navigation.tsx+++ b/frontend/src/layout/navigation-3000/Navigation.tsx@@ -102,10 +102,23 @@ export function Navigation({const noPaddingScene = sceneConfig?.layout === 'app-raw-no-header' || sceneConfig?.layout === 'app-raw'if (mode !== 'full') {+ const showMinimalNavigation = mode === 'minimal' || mode === 'zen'return (// eslint-disable-next-line react/forbid-dom-props- <div className="Navigation3000 flex-col" style={theme?.mainStyle}>- {(mode === 'minimal' || mode === 'zen') && <MinimalNavigation />}+ <div+ className="Navigation3000 flex-col"+ style={+ {+ ...theme?.mainStyle,+ // The MinimalNavigation bar sits above the scene, so push the+ // settings scene's viewport-fixed nav down to clear it.+ ...(showMinimalNavigation && {+ '--settings-nav-top': 'calc(var(--minimal-navigation-height) + var(--scene-padding))',+ }),+ } as React.CSSProperties+ }+ >+ {showMinimalNavigation && <MinimalNavigation />}<main className={mode === 'zen' ? 'p-4' : undefined}>{children}</main></div>)diff --git a/frontend/src/layout/navigation-3000/components/MinimalNavigation.tsx b/frontend/src/layout/navigation-3000/components/MinimalNavigation.tsxindex 61daabb6bc26..fce69b711564 100644--- a/frontend/src/layout/navigation-3000/components/MinimalNavigation.tsx+++ b/frontend/src/layout/navigation-3000/components/MinimalNavigation.tsx@@ -32,7 +32,7 @@ export function MinimalNavigation(): JSX.Element {: (titleAndIcon.iconType as FileSystemIconType)return (- <nav className="flex items-center gap-2 p-2 border-b">+ <nav className="flex items-center gap-2 p-2 border-b min-h-[var(--minimal-navigation-height)]"><LemonButton noPadding icon={<IconLogomark className="text-3xl mx-2" />} to={logoUrl} />{zenMode && (<span className="font-semibold text-base flex items-center gap-2">diff --git a/frontend/src/scenes/organization/CreateOrganizationModal.tsx b/frontend/src/scenes/organization/CreateOrganizationModal.tsxindex 8707e864e43f..9a45844b8d9e 100644--- a/frontend/src/scenes/organization/CreateOrganizationModal.tsx+++ b/frontend/src/scenes/organization/CreateOrganizationModal.tsx@@ -1,10 +1,13 @@import { useActions, useValues } from 'kea'import { useState } from 'react'-import { LemonButton, LemonInput, LemonModal, Link } from '@posthog/lemon-ui'+import { IconLetter } from '@posthog/icons'+import { LemonButton, LemonDivider, LemonInput, LemonModal, Link } from '@posthog/lemon-ui'+import { pendingInvitesLogic } from 'lib/components/Account/pendingInvitesLogic'import { LemonField } from 'lib/lemon-ui/LemonField'import { organizationLogic } from 'scenes/organizationLogic'+import { urls } from 'scenes/urls'export function CreateOrganizationModal({isVisible,@@ -17,8 +20,11 @@ export function CreateOrganizationModal({}): JSX.Element {const { createOrganization } = useActions(organizationLogic)const { currentOrganizationLoading } = useValues(organizationLogic)+ const { pendingInvites } = useValues(pendingInvitesLogic)const [name, setName] = useState<string>('')+ const hasPendingInvites = pendingInvites.length > 0+const closeModal: () => void = () => {if (onClose) {onClose()@@ -66,11 +72,38 @@ export function CreateOrganizationModal({isOpen={isVisible}inline={inline}>+ {hasPendingInvites && (+ <>+ <LemonField.Pure label="You've been invited to join" className="mb-2">+ <div className="flex flex-col gap-2">+ {pendingInvites.map((invite) => (+ <div+ key={invite.id}+ className="flex items-center gap-2 rounded border border-primary p-2"+ >+ <IconLetter className="text-warning text-lg shrink-0" />+ <span className="flex-1 truncate font-medium">{invite.organization_name}</span>+ <LemonButton+ type="primary"+ size="small"+ to={urls.inviteSignup(invite.id)}+ data-attr={`accept-pending-invite-${invite.id}`}+ >+ Accept+ </LemonButton>+ </div>+ ))}+ </div>+ </LemonField.Pure>+ <LemonDivider className="my-4" />+ <p className="text-secondary mb-2">Or create your own organization:</p>+ </>+ )}<LemonField.Pure label="Organization name"><LemonInputplaceholder="Acme Inc."maxLength={64}- autoFocus+ autoFocus={!hasPendingInvites}value={name}onChange={(value) => setName(value)}onKeyDown={(e) => {diff --git a/frontend/src/scenes/settings/Settings.tsx b/frontend/src/scenes/settings/Settings.tsxindex 5c52e9710b4c..f403da2ce9d9 100644--- a/frontend/src/scenes/settings/Settings.tsx+++ b/frontend/src/scenes/settings/Settings.tsx@@ -369,7 +369,7 @@ export function Settings({className={clsx('border rounded w-[var(--settings-nav-width)] flex flex-col',isFullScene- ? 'fixed top-(--scene-padding) bottom-(--scene-padding)'+ ? 'fixed top-(--settings-nav-top) bottom-(--scene-padding)': 'sticky top-(--scene-layout-header-height) self-start max-h-[calc(100dvh-var(--scene-layout-header-height)-var(--scene-padding))]')}>