Skip to content

Commit

Permalink
chore(experiments): Show notice when web experiments disabled (#26492)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Nov 29, 2024
1 parent c80f775 commit 240192d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IconPlus } from '@posthog/icons'
import { LemonBanner } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { IconOpenInNew } from 'lib/lemon-ui/icons'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
Expand Down Expand Up @@ -29,6 +30,21 @@ const ExperimentsListToolbarMenu = (): JSX.Element => {
return (
<ToolbarMenu>
<ToolbarMenu.Header>
{window.parent.posthog.config.disable_web_experiments && (
<div className="p-2">
<LemonBanner type="warning">
Web experiments are disabled in your PostHog web snippet configuration. To run experiments,
add <code>disable_web_experiments: false</code> to your configuration.{' '}
<Link
target="_blank"
targetBlankIcon
to="https://posthog.com/docs/experiments/no-code-web-experiments"
>
Learn more
</Link>
</LemonBanner>
</div>
)}
<LemonInput
autoFocus
fullWidth
Expand Down

0 comments on commit 240192d

Please sign in to comment.