diff --git a/frontend/src/layout/navigation-3000/Navigation.tsx b/frontend/src/layout/navigation-3000/Navigation.tsx index 2ed8bedc3efdd2..3e6b8d722609d6 100644 --- a/frontend/src/layout/navigation-3000/Navigation.tsx +++ b/frontend/src/layout/navigation-3000/Navigation.tsx @@ -6,7 +6,6 @@ import { BillingAlertsV2 } from 'lib/components/BillingAlertsV2' import { CommandPalette } from 'lib/components/CommandPalette/CommandPalette' import { FlaggedFeature } from 'lib/components/FlaggedFeature' import { FEATURE_FLAGS } from 'lib/constants' -import posthog from 'posthog-js' import { ReactNode, useEffect } from 'react' import { SceneConfig } from 'scenes/sceneTypes' @@ -34,8 +33,6 @@ export function Navigation({ useEffect(() => { // FIXME: Include debug notice in a non-obstructing way document.getElementById('bottom-notice')?.remove() - // TODO: Unflag Notebooks once the 3000 experiment is over - posthog.updateEarlyAccessFeatureEnrollment(FEATURE_FLAGS.NOTEBOOKS, true) }, []) if (mode !== 'full') { diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx index 2aeaa4414aa5e6..4a5c5ff24c9e6d 100644 --- a/frontend/src/layout/navigation-3000/navigationLogic.tsx +++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx @@ -335,7 +335,6 @@ export const navigation3000Logic = kea([ label: 'Notebooks', icon: , to: urls.notebooks(), - featureFlag: FEATURE_FLAGS.NOTEBOOKS, tag: 'new' as const, }, { diff --git a/frontend/src/layout/navigation/SideBar/SideBar.tsx b/frontend/src/layout/navigation/SideBar/SideBar.tsx index c8811625e90a09..ea86f54352865e 100644 --- a/frontend/src/layout/navigation/SideBar/SideBar.tsx +++ b/frontend/src/layout/navigation/SideBar/SideBar.tsx @@ -150,20 +150,18 @@ function Pages(): JSX.Element { }, }} /> - - } - identifier={Scene.Notebooks} - to={urls.notebooks()} - sideAction={{ - icon: , - to: urls.notebook('new'), - tooltip: 'New notebook', - identifier: Scene.Notebook, - onClick: hideSideBarMobile, - }} - /> - + } + identifier={Scene.Notebooks} + to={urls.notebooks()} + sideAction={{ + icon: , + to: urls.notebook('new'), + tooltip: 'New notebook', + identifier: Scene.Notebook, + onClick: hideSideBarMobile, + }} + /> } identifier={Scene.SavedInsights} diff --git a/frontend/src/layout/navigation/TopBar/TopBar.tsx b/frontend/src/layout/navigation/TopBar/TopBar.tsx index 73465b1bc83544..cf9f4125dcdb4f 100644 --- a/frontend/src/layout/navigation/TopBar/TopBar.tsx +++ b/frontend/src/layout/navigation/TopBar/TopBar.tsx @@ -34,8 +34,6 @@ export function TopBar(): JSX.Element { const { isProjectSwitcherShown } = useValues(topBarLogic) const { toggleProjectSwitcher, hideProjectSwitcher } = useActions(topBarLogic) - const hasNotebooks = !!featureFlags[FEATURE_FLAGS.NOTEBOOKS] - const groupTypes = [ TaxonomicFilterGroupType.Events, TaxonomicFilterGroupType.Persons, @@ -46,13 +44,10 @@ export function TopBar(): JSX.Element { TaxonomicFilterGroupType.Plugins, TaxonomicFilterGroupType.Experiments, TaxonomicFilterGroupType.Dashboards, + TaxonomicFilterGroupType.Notebooks, ...groupNamesTaxonomicTypes, ] - if (hasNotebooks) { - groupTypes.push(TaxonomicFilterGroupType.Notebooks) - } - return ( <> @@ -90,7 +85,7 @@ export function TopBar(): JSX.Element { url={`${window.location.origin}${window.POSTHOG_APP_CONTEXT.year_in_hog_url}`} /> )} - {hasNotebooks && } + ) : ( diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 27bf0bd049c8cb..f67e54620263e2 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -147,7 +147,6 @@ export const FEATURE_FLAGS = { POSTHOG_3000_WELCOME_ANNOUNCEMENT: 'posthog-3000-welcome-announcement', // owner: #posthog-3000 ENABLE_PROMPTS: 'enable-prompts', // owner: @lharries FEEDBACK_SCENE: 'feedback-scene', // owner: @lharries - NOTEBOOKS: 'notebooks', // owner: #team-replay HEDGEHOG_MODE: 'hedgehog-mode', // owner: @benjackwhite HEDGEHOG_MODE_DEBUG: 'hedgehog-mode-debug', // owner: @benjackwhite GENERIC_SIGNUP_BENEFITS: 'generic-signup-benefits', // experiment, owner: @raquelmsmith diff --git a/frontend/src/lib/logic/featureFlagLogic.ts b/frontend/src/lib/logic/featureFlagLogic.ts index 9a8a90a4680b74..4fa049bacc0dbc 100644 --- a/frontend/src/lib/logic/featureFlagLogic.ts +++ b/frontend/src/lib/logic/featureFlagLogic.ts @@ -1,5 +1,4 @@ import { actions, afterMount, kea, path, reducers } from 'kea' -import { FEATURE_FLAGS } from 'lib/constants' import { getAppContext } from 'lib/utils/getAppContext' import posthog from 'posthog-js' @@ -40,8 +39,6 @@ function spyOnFeatureFlags(featureFlags: FeatureFlagsSet): FeatureFlagsSet { ? { ...persistedFlags, ...featureFlags } : persistedFlags - availableFlags[FEATURE_FLAGS.NOTEBOOKS] = true - if (typeof window.Proxy !== 'undefined') { return new Proxy( {}, diff --git a/frontend/src/scenes/dashboard/DashboardHeader.tsx b/frontend/src/scenes/dashboard/DashboardHeader.tsx index f45401afd372a8..f8725e7693b201 100644 --- a/frontend/src/scenes/dashboard/DashboardHeader.tsx +++ b/frontend/src/scenes/dashboard/DashboardHeader.tsx @@ -3,7 +3,6 @@ import { router } from 'kea-router' import { TextCardModal } from 'lib/components/Cards/TextCard/TextCardModal' import { EditableField } from 'lib/components/EditableField/EditableField' import { ExportButton, ExportButtonItem } from 'lib/components/ExportButton/ExportButton' -import { FlaggedFeature } from 'lib/components/FlaggedFeature' import { FullScreen } from 'lib/components/FullScreen' import { ObjectTags } from 'lib/components/ObjectTags/ObjectTags' import { PageHeader } from 'lib/components/PageHeader' @@ -266,15 +265,13 @@ export function DashboardHeader(): JSX.Element | null { > Duplicate dashboard - - createNotebookFromDashboard(dashboard)} - status="stealth" - fullWidth - > - Create notebook from dashboard - - + createNotebookFromDashboard(dashboard)} + status="stealth" + fullWidth + > + Create notebook from dashboard + {canEditDashboard && ( { diff --git a/frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx b/frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx index a93859f812f13d..5aa2b5e4b8adf7 100644 --- a/frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx +++ b/frontend/src/scenes/notebooks/AddToNotebook/DraggableToNotebook.tsx @@ -1,11 +1,8 @@ import './DraggableToNotebook.scss' import clsx from 'clsx' -import { useActions, useValues } from 'kea' -import { FlaggedFeature } from 'lib/components/FlaggedFeature' -import { FEATURE_FLAGS } from 'lib/constants' +import { useActions } from 'kea' import { useKeyHeld } from 'lib/hooks/useKeyHeld' -import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import React, { useState } from 'react' import { NotebookNodeType } from '~/types' @@ -33,16 +30,14 @@ export function useNotebookDrag({ href, node, properties, onlyWithModifierKey }: const { startDropMode, endDropMode } = useActions(notebookPanelLogic) const [isDragging, setIsDragging] = useState(false) - const { featureFlags } = useValues(featureFlagLogic) - const notebooksEnabled = featureFlags[FEATURE_FLAGS.NOTEBOOKS] const isInNotebook = useNotebookNode() const hasDragOptions = !!(href || node) const altKeyHeld = useKeyHeld('Alt') const dragModeActive = onlyWithModifierKey ? altKeyHeld : true - if (!hasDragOptions || isInNotebook || !notebooksEnabled || !dragModeActive) { + if (!hasDragOptions || isInNotebook || !dragModeActive) { return { isDragging: false, draggable: false, @@ -89,15 +84,13 @@ export function DraggableToNotebook({ return ( <> - - - {children} - - + + {children} + ) } diff --git a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx index 4ac62106427109..b3d3251b2c046d 100644 --- a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx +++ b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.stories.tsx @@ -1,8 +1,7 @@ import { Meta, StoryFn } from '@storybook/react' -import { FEATURE_FLAGS } from 'lib/constants' import { NotebookSelectButton } from 'scenes/notebooks/NotebookSelectButton/NotebookSelectButton' -import { setFeatureFlags, useStorybookMocks } from '~/mocks/browser' +import { useStorybookMocks } from '~/mocks/browser' import { NotebookNodeType } from '~/types' export default { @@ -38,7 +37,6 @@ const allNotebooks = [ ] const Template: StoryFn = (props) => { - setFeatureFlags([FEATURE_FLAGS.NOTEBOOKS]) useStorybookMocks({ get: { '/api/projects/:team_id/notebooks/': (req, res, ctx) => { diff --git a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx index 48be40ae066bbd..1e73aabf0ab8bc 100644 --- a/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx +++ b/frontend/src/scenes/notebooks/NotebookSelectButton/NotebookSelectButton.tsx @@ -1,7 +1,5 @@ import { LemonDivider, LemonDropdown, ProfilePicture } from '@posthog/lemon-ui' import { BuiltLogic, useActions, useValues } from 'kea' -import { FlaggedFeature } from 'lib/components/FlaggedFeature' -import { FEATURE_FLAGS } from 'lib/constants' import { dayjs } from 'lib/dayjs' import { IconPlus, IconWithCount } from 'lib/lemon-ui/icons' import { LemonButton, LemonButtonProps } from 'lib/lemon-ui/LemonButton' @@ -261,9 +259,5 @@ export function NotebookSelectButton({ children, onNotebookOpened, ...props }: N ) - return ( - - {nodeLogic ? button : {button}} - - ) + return nodeLogic ? button : {button} }