Skip to content

: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.

chore(flags): remove fully rolled out event-media-previews flag (#102139)

posthog[bot]c2d631739104
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 3a868bfb8766..f0ffa5ee65c4 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -316,7 +316,6 @@ export const FEATURE_FLAGS = {
ERROR_TRACKING_RECOMMENDATIONS: 'error-tracking-recommendations', // owner: @ablaszkiewicz #team-error-tracking
ERROR_TRACKING_RELATED_ISSUES: 'error-tracking-related-issues', // owner: #team-error-tracking
ERROR_TRACKING_WEEKLY_DIGEST: 'error-tracking-weekly-digest', // owner: #team-error-tracking
- EVENT_MEDIA_PREVIEWS: 'event-media-previews', // owner: @alexlider
EXPERIMENT_BEHAVIOR_COMPARISON: 'experiment-behavior-comparison', // owner: @mp-hog #team-experiments
EXPERIMENT_METRIC_EVENT_BREAKDOWNS: 'experiment-metric-event-breakdowns', // owner: @rodrigoi #team-experiments
EXPERIMENTS_DW_AA_TEST: 'experiments-dw-aa-test', // owner: @rodrigoi #team-experiments
diff --git a/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx b/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx
index 3a4c6d5ae388..866c4acb98e0 100644
--- a/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx
+++ b/frontend/src/scenes/data-management/definition/DefinitionEdit.tsx
@@ -178,67 +178,63 @@ export function DefinitionEdit(rawProps: DefinitionLogicProps): JSX.Element {
</div>
{/* Allow uploading media previews only for custom events; not that useful for properties or autocapture events */}
- <FlaggedFeature flag={FEATURE_FLAGS.EVENT_MEDIA_PREVIEWS}>
- {objectStorageAvailable && !isProperty && !isCoreFilter(editDefinition.name) && (
- <div className="ph-ignore-input">
- <LemonField
- name="media_preview"
- label={
- <LemonLabel info="Previews show where a client side event is triggered. Upload a screenshot or design.">
- Media preview
- </LemonLabel>
- }
- >
- <div>
- <div
- ref={mediaPreviewDragTarget}
- className="mb-4 border-2 border-dashed rounded p-4 flex items-center justify-center cursor-pointer"
- onClick={(e) => {
- if (e.target === e.currentTarget) {
- const input = mediaPreviewDragTarget.current?.querySelector(
- 'input[type="file"]'
- ) as HTMLInputElement
- input?.click()
- }
- }}
- >
- <LemonFileInput
- accept="image/*"
- multiple={false}
- onChange={setFilesToUpload}
- loading={uploading}
- value={filesToUpload}
- alternativeDropTargetRef={mediaPreviewDragTarget}
- callToAction={
- <div className="flex items-center gap-2">
- <IconImage />
- <span>Click or drag and drop to upload an image</span>
- </div>
- }
- />
- </div>
+ {objectStorageAvailable && !isProperty && !isCoreFilter(editDefinition.name) && (
+ <div className="ph-ignore-input">
+ <LemonField
+ name="media_preview"
+ label={
+ <LemonLabel info="Previews show where a client side event is triggered. Upload a screenshot or design.">
+ Media preview
+ </LemonLabel>
+ }
+ >
+ <div>
+ <div
+ ref={mediaPreviewDragTarget}
+ className="mb-4 border-2 border-dashed rounded p-4 flex items-center justify-center cursor-pointer"
+ onClick={(e) => {
+ if (e.target === e.currentTarget) {
+ const input = mediaPreviewDragTarget.current?.querySelector(
+ 'input[type="file"]'
+ ) as HTMLInputElement
+ input?.click()
+ }
+ }}
+ >
+ <LemonFileInput
+ accept="image/*"
+ multiple={false}
+ onChange={setFilesToUpload}
+ loading={uploading}
+ value={filesToUpload}
+ alternativeDropTargetRef={mediaPreviewDragTarget}
+ callToAction={
+ <div className="flex items-center gap-2">
+ <IconImage />
+ <span>Click or drag and drop to upload an image</span>
+ </div>
+ }
+ />
+ </div>
- {(previewsLoading || (previews && previews.length > 0)) && (
- <ImageCarousel
- loading={previewsLoading}
- imageUrls={
- previews?.map((p: ObjectMediaPreview) => p.media_url) ?? []
+ {(previewsLoading || (previews && previews.length > 0)) && (
+ <ImageCarousel
+ loading={previewsLoading}
+ imageUrls={previews?.map((p: ObjectMediaPreview) => p.media_url) ?? []}
+ onDelete={(url: string) => {
+ const preview = previews.find(
+ (p: ObjectMediaPreview) => p.media_url === url
+ )
+ if (preview) {
+ deleteMediaPreview(preview.id)
}
- onDelete={(url: string) => {
- const preview = previews.find(
- (p: ObjectMediaPreview) => p.media_url === url
- )
- if (preview) {
- deleteMediaPreview(preview.id)
- }
- }}
- />
- )}
- </div>
- </LemonField>
- </div>
- )}
- </FlaggedFeature>
+ }}
+ />
+ )}
+ </div>
+ </LemonField>
+ </div>
+ )}
{(allowVerification || showHiddenOption) && (
<div className="ph-ignore-input">
diff --git a/frontend/src/toolbar/bar/Toolbar.tsx b/frontend/src/toolbar/bar/Toolbar.tsx
index f125fd082d02..fe22edc48e6e 100644
--- a/frontend/src/toolbar/bar/Toolbar.tsx
+++ b/frontend/src/toolbar/bar/Toolbar.tsx
@@ -290,8 +290,6 @@ function MoreMenu(): JSX.Element {
}, false)
}, [posthog])
- const showScreenshotForEvent = useToolbarFeatureFlag('event-media-previews')
-
// KLUDGE: if there is no theme, assume light mode, which shouldn't be, but seems to be, necessary
const currentlyLightMode = !theme || theme === 'light'
@@ -327,14 +325,12 @@ function MoreMenu(): JSX.Element {
label: `Switch to ${currentlyLightMode ? 'dark' : 'light'} mode`,
onClick: () => toggleTheme(),
},
- showScreenshotForEvent
- ? {
- icon: <IconCamera />,
- label: 'Screenshot for event',
- onClick: takeScreenshot,
- disabled: isTakingScreenshot,
- }
- : undefined,
+ {
+ icon: <IconCamera />,
+ label: 'Screenshot for event',
+ onClick: takeScreenshot,
+ disabled: isTakingScreenshot,
+ },
...piiMaskingMenuItem(
piiMaskingEnabled,
piiMaskingColor,