: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(settings): add organization search and icons to the move project select (#127606)
Reece Jones2e886596d6c5
diff --git a/frontend/src/scenes/settings/project/ProjectMove.test.tsx b/frontend/src/scenes/settings/project/ProjectMove.test.tsxindex d0c411bdd2e3..5cc6c92e4a76 100644--- a/frontend/src/scenes/settings/project/ProjectMove.test.tsx+++ b/frontend/src/scenes/settings/project/ProjectMove.test.tsx@@ -15,11 +15,11 @@ import { OrganizationBasicType } from '~/types'import { ProjectMove } from './ProjectMove'-// Render LemonSelect as a native <select> so each option's disabled state is assertable from the DOM-// without driving the (portal-rendered) popover. We only override LemonSelect; the other Lemon components stay real.+// Render LemonSearchableSelect as a native <select> so each option's disabled state is assertable from the DOM+// without driving the (portal-rendered) popover. We only override LemonSearchableSelect; the other Lemon components stay real.jest.mock('@posthog/lemon-ui', () => ({...jest.requireActual('@posthog/lemon-ui'),- LemonSelect: ({ options, value, onChange, placeholder }: any): JSX.Element => (+ LemonSearchableSelect: ({ options, value, onChange, placeholder }: any): JSX.Element => (<selectaria-label="target organization"value={value === undefined ? '' : String(value)}diff --git a/frontend/src/scenes/settings/project/ProjectMove.tsx b/frontend/src/scenes/settings/project/ProjectMove.tsxindex 084124eed4ae..95166423f346 100644--- a/frontend/src/scenes/settings/project/ProjectMove.tsx+++ b/frontend/src/scenes/settings/project/ProjectMove.tsx@@ -2,10 +2,11 @@ import { useActions, useValues } from 'kea'import { Dispatch, SetStateAction, useState } from 'react'import { IconArrowRight } from '@posthog/icons'-import { LemonButton, LemonInput, LemonModal, LemonSelect } from '@posthog/lemon-ui'+import { LemonButton, LemonInput, LemonModal, LemonSearchableSelect } from '@posthog/lemon-ui'import { RestrictionScope, useRestrictedArea } from 'lib/components/RestrictedArea'import { OrganizationMembershipLevel } from 'lib/constants'+import { UploadedLogo } from 'lib/lemon-ui/UploadedLogo'import { projectLogic } from 'scenes/projectLogic'import { userLogic } from 'scenes/userLogic'@@ -103,13 +104,17 @@ export function ProjectMove(): JSX.Element {</p><div className="flex items-center gap-2">- <LemonSelect+ <LemonSearchableSelectoptions={otherOrganizations.map((o) => ({label: o.name,value: o.id,+ icon: <UploadedLogo size="xsmall" name={o.name} entityId={o.id} mediaId={o.logo_media_id} />,disabledReason: notAdminOfOrg(o) ? NOT_ADMIN_OF_TARGET_REASON : undefined,}))}placeholder="Select target organization"+ searchPlaceholder="Search organizations..."+ searchInputDataAttr="move-project-target-organization-search"+ noResultsMessage="No organizations match"onChange={(value) => {const organization = otherOrganizations.find((o) => o.id === value)setTargetOrganization(organization || null)