Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelmsmith committed Nov 15, 2023
1 parent 57472d4 commit 6745813
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
3 changes: 1 addition & 2 deletions frontend/src/layout/navigation-3000/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import './Navigation.scss'
import { themeLogic } from './themeLogic'
import { navigation3000Logic } from './navigationLogic'
import clsx from 'clsx'
import { Scene, SceneConfig } from 'scenes/sceneTypes'
import { SceneConfig } from 'scenes/sceneTypes'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
import { FEATURE_FLAGS } from 'lib/constants'
import { SidePanel } from './sidepanel/SidePanel'
Expand All @@ -18,7 +18,6 @@ export function Navigation({
sceneConfig,
}: {
children: ReactNode
scene: Scene | null
sceneConfig: SceneConfig | null
}): JSX.Element {
useMountedLogic(themeLogic)
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/layout/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from 'clsx'
import { BillingAlertsV2 } from 'lib/components/BillingAlertsV2'
import { Scene, SceneConfig } from 'scenes/sceneTypes'
import { SceneConfig } from 'scenes/sceneTypes'
import { Breadcrumbs } from './Breadcrumbs/Breadcrumbs'
import { ProjectNotice } from './ProjectNotice'
import { SideBar } from './SideBar/SideBar'
Expand All @@ -9,16 +9,14 @@ import { ReactNode } from 'react'

export function Navigation({
children,
scene,
sceneConfig,
}: {
children: ReactNode
scene: Scene | null
sceneConfig: SceneConfig | null
}): JSX.Element {
return (
<div className="h-screen flex flex-col">
{scene !== Scene.Ingestion && <TopBar />}
<TopBar />
<SideBar>
<div
className={clsx(
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/lib/utils/eventUsageLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
reportRecordingOpenedFromRecentRecordingList: true,
reportPersonOpenedFromNewlySeenPersonsList: true,
reportIngestionContinueWithoutVerifying: true,
reportAutocaptureToggled: (autocapture_opt_out: boolean) => ({ autocapture_opt_out }),
reportAutocaptureExceptionsToggled: (autocapture_opt_in: boolean) => ({ autocapture_opt_in }),
reportFailedToCreateFeatureFlagWithCohort: (code: string, detail: string) => ({ code, detail }),
reportInviteMembersButtonClicked: true,
reportDashboardLoadingTime: (loadingMilliseconds: number, dashboardId: number) => ({
Expand Down Expand Up @@ -1029,6 +1031,16 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
reportIngestionContinueWithoutVerifying: () => {
posthog.capture('ingestion continue without verifying')
},
reportAutocaptureToggled: ({ autocapture_opt_out }) => {
posthog.capture('autocapture toggled', {
autocapture_opt_out,
})
},
reportAutocaptureExceptionsToggled: ({ autocapture_opt_in }) => {
posthog.capture('autocapture exceptions toggled', {
autocapture_opt_in,
})
},
reportFailedToCreateFeatureFlagWithCohort: ({ detail, code }) => {
posthog.capture('failed to create feature flag with cohort', { detail, code })
},
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/scenes/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ function AppScene(): JSX.Element | null {

return (
<>
<Navigation scene={activeScene} sceneConfig={sceneConfig}>
{wrappedSceneElement}
</Navigation>
<Navigation sceneConfig={sceneConfig}>{wrappedSceneElement}</Navigation>
{toastContainer}
<GlobalModals />
</>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/scenes/settings/project/AutocaptureSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function AutocaptureSettings(): JSX.Element {
const { userLoading } = useValues(userLogic)
const { currentTeam } = useValues(teamLogic)
const { updateCurrentTeam } = useActions(teamLogic)
const { reportIngestionAutocaptureToggled } = useActions(eventUsageLogic)
const { reportAutocaptureToggled } = useActions(eventUsageLogic)

return (
<>
Expand All @@ -33,7 +33,7 @@ export function AutocaptureSettings(): JSX.Element {
updateCurrentTeam({
autocapture_opt_out: !checked,
})
reportIngestionAutocaptureToggled(!checked)
reportAutocaptureToggled(!checked)
}}
checked={!currentTeam?.autocapture_opt_out}
disabled={userLoading}
Expand All @@ -49,7 +49,7 @@ export function ExceptionAutocaptureSettings(): JSX.Element {
const { userLoading } = useValues(userLogic)
const { currentTeam } = useValues(teamLogic)
const { updateCurrentTeam } = useActions(teamLogic)
const { reportIngestionAutocaptureExceptionsToggled } = useActions(eventUsageLogic)
const { reportAutocaptureExceptionsToggled } = useActions(eventUsageLogic)

const { errorsToIgnoreRules, rulesCharacters } = useValues(autocaptureExceptionsLogic)
const { setErrorsToIgnoreRules } = useActions(autocaptureExceptionsLogic)
Expand All @@ -62,7 +62,7 @@ export function ExceptionAutocaptureSettings(): JSX.Element {
updateCurrentTeam({
autocapture_exceptions_opt_in: checked,
})
reportIngestionAutocaptureExceptionsToggled(checked)
reportAutocaptureExceptionsToggled(checked)
}}
checked={!!currentTeam?.autocapture_exceptions_opt_in}
disabled={userLoading}
Expand Down

0 comments on commit 6745813

Please sign in to comment.