: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
chore(experiments): remove dead experiment-view files (#59002)
Anderse41087045477
diff --git a/frontend/src/scenes/experiments/ExperimentView/ExperimentDate.tsx b/frontend/src/scenes/experiments/ExperimentView/ExperimentDate.tsxdeleted file mode 100644index 8a06fe0e993a..000000000000--- a/frontend/src/scenes/experiments/ExperimentView/ExperimentDate.tsx+++ /dev/null@@ -1,69 +0,0 @@-import { useState } from 'react'--import { IconPencil } from '@posthog/icons'-import { LemonButton, LemonCalendarSelectInput } from '@posthog/lemon-ui'--import { TZLabel } from 'lib/components/TZLabel'-import { dayjs } from 'lib/dayjs'-import { Label } from 'lib/ui/Label/Label'--const ExperimentDate = ({- label,- date,- onChange,- selectionLimitDate,- 'data-attr': dataAttr,-}: {- label: string- date?: string | null- selectionLimitDate?: string | null- onChange?: (date: string) => void- 'data-attr'?: string-}): JSX.Element | null => {- const [isDatePickerOpen, setIsDatePickerOpen] = useState(false)-- if (!date) {- return null- }-- return (- <div className="block" data-attr={dataAttr}>- <Label intent="menu">{label}</Label>- <div className="flex">- {isDatePickerOpen ? (- <LemonCalendarSelectInput- granularity="minute"- visible- value={dayjs(date)}- onChange={(newDate) => {- if (newDate && onChange) {- onChange(newDate.toISOString())- }- }}- onClose={() => setIsDatePickerOpen(false)}- onClickOutside={() => setIsDatePickerOpen(false)}- clearable={false}- selectionPeriod="past"- buttonProps={{ size: 'xsmall', 'data-attr': `${dataAttr}-picker` }}- selectionPeriodLimit={selectionLimitDate ? dayjs(selectionLimitDate) : undefined}- />- ) : (- <>- <TZLabel time={date} />- <LemonButton- title={`Move ${label}`}- data-attr={`move-${dataAttr}`}- icon={<IconPencil />}- size="small"- onClick={() => setIsDatePickerOpen(true)}- noPadding- className="ml-2"- />- </>- )}- </div>- </div>- )-}--export default ExperimentDatediff --git a/frontend/src/scenes/experiments/ExperimentView/RunningTime.tsx b/frontend/src/scenes/experiments/ExperimentView/RunningTime.tsxdeleted file mode 100644index 11ee096ea4f1..000000000000--- a/frontend/src/scenes/experiments/ExperimentView/RunningTime.tsx+++ /dev/null@@ -1,89 +0,0 @@-import { useActions, useValues } from 'kea'--import { IconCalculator, IconPencil } from '@posthog/icons'-import { LemonButton } from '@posthog/lemon-ui'--import { LemonProgress } from 'lib/lemon-ui/LemonProgress'-import { humanFriendlyNumber } from 'lib/utils'--import { experimentLogic } from '../experimentLogic'-import { modalsLogic } from '../modalsLogic'--export function RunningTime(): JSX.Element {- const { experiment, actualRunningTime } = useValues(experimentLogic)- const { openCalculateRunningTimeModal } = useActions(modalsLogic)-- const recommendedSampleSize = experiment.parameters.recommended_sample_size- const minimumDetectableEffect = experiment.parameters.minimum_detectable_effect- const recommendedRunningTime = experiment.parameters.recommended_running_time-- return (- <div>- <div className="flex items-center deprecated-space-x-2 mb-2">- <h2 className="mb-0 font-semibold text-lg leading-6">Running time</h2>- {recommendedRunningTime ? (- <LemonButton- icon={<IconPencil fontSize="12" />}- size="xsmall"- className="flex items-center gap-2"- type="secondary"- onClick={() => openCalculateRunningTimeModal()}- />- ) : null}- </div>- <div className="relative border rounded bg-surface-primary p-4 h-[280px] overflow-y-auto">- {!recommendedSampleSize || !recommendedRunningTime ? (- <div className="flex justify-center items-center h-full">- <div className="text-center">- <IconCalculator className="text-3xl mb-2 text-tertiary" />- <div className="text-md font-semibold leading-tight mb-3">No running time yet</div>- <div className="flex justify-center">- <LemonButton- icon={<IconPencil fontSize="12" />}- size="xsmall"- className="flex items-center gap-2"- type="secondary"- onClick={() => openCalculateRunningTimeModal()}- >- Calculate running time- </LemonButton>- </div>- </div>- </div>- ) : (- <>- <LemonProgress- className="w-full border"- bgColor="var(--color-bg-table)"- size="medium"- percent={(actualRunningTime / recommendedRunningTime) * 100}- />- <div className="text-center mt-2 mb-4 text-xs text-muted">- {actualRunningTime} of {humanFriendlyNumber(recommendedRunningTime, 0)} days completed (- {Math.round((actualRunningTime / recommendedRunningTime) * 100)}%)- </div>-- <div className="space-y-3">- <div>- <div className="card-secondary mb-1">Recommended sample size</div>- <div className="text-sm font-semibold">- {humanFriendlyNumber(recommendedSampleSize, 0)} users- </div>- </div>- <div>- <div className="card-secondary mb-1">Estimated running time</div>- <div className="text-sm font-semibold">- {humanFriendlyNumber(recommendedRunningTime, 0)} days- </div>- </div>- <div>- <div className="card-secondary mb-1">Minimum detectable effect</div>- <div className="text-sm font-semibold">{minimumDetectableEffect}%</div>- </div>- </div>- </>- )}- </div>- </div>- )-}diff --git a/frontend/src/scenes/experiments/ExperimentView/VariantScreenshot.tsx b/frontend/src/scenes/experiments/ExperimentView/VariantScreenshot.tsxindex 5f92de84a993..af758e28085e 100644--- a/frontend/src/scenes/experiments/ExperimentView/VariantScreenshot.tsx+++ b/frontend/src/scenes/experiments/ExperimentView/VariantScreenshot.tsx@@ -250,5 +250,3 @@ export function VariantScreenshot({</div>)}--export default VariantScreenshot