-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/core-agent-memory
- Loading branch information
Showing
159 changed files
with
1,130 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+103 Bytes
(100%)
frontend/__snapshots__/posthog-3000-navigation--navigation-3000--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+49 Bytes
(100%)
frontend/__snapshots__/posthog-3000-navigation--navigation-3000--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.22 KB
(100%)
frontend/__snapshots__/replay-listings--recordings-play-lists--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.24 KB
(100%)
frontend/__snapshots__/replay-listings--recordings-play-lists--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-544 Bytes
(99%)
frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-610 Bytes
(99%)
frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-87 Bytes
(100%)
frontend/__snapshots__/replay-player-success--recent-recordings--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-79 Bytes
(100%)
frontend/__snapshots__/replay-player-success--recent-recordings--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-175 Bytes
(100%)
frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-61 Bytes
(100%)
frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.24 KB
(94%)
frontend/__snapshots__/scenes-app-dashboards--list--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.4 KB
(96%)
frontend/__snapshots__/scenes-app-dashboards--list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.36 KB
(92%)
frontend/__snapshots__/scenes-app-dashboards--new--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-165 Bytes
(100%)
frontend/__snapshots__/scenes-app-dashboards--new-select-variables--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+173 Bytes
(100%)
frontend/__snapshots__/scenes-app-dashboards--new-select-variables--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+151 Bytes
(100%)
frontend/__snapshots__/scenes-app-events--event-explorer--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+140 Bytes
(100%)
frontend/__snapshots__/scenes-app-events--event-explorer--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+100 Bytes
(100%)
frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+116 Bytes
(100%)
frontend/__snapshots__/scenes-app-feature-flags--feature-flags-list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.22 KB
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+200 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-destinations-page--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-117 Bytes
(100%)
...s__/scenes-app-pipeline--pipeline-destinations-page-without-pipelines--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-786 Bytes
(100%)
...__/scenes-app-pipeline--pipeline-destinations-page-without-pipelines--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.41 KB
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.32 KB
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-landing-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+1.4 KB
(100%)
...shots__/scenes-app-pipeline--pipeline-landing-page-iff-legacy-sources--dark.png
Oops, something went wrong.
Binary file modified
BIN
+1.32 KB
(100%)
...hots__/scenes-app-pipeline--pipeline-landing-page-iff-legacy-sources--light.png
Oops, something went wrong.
Binary file modified
BIN
+16 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-legacy-sources-page--dark.png
Oops, something went wrong.
Binary file modified
BIN
+117 Bytes
(100%)
...tend/__snapshots__/scenes-app-pipeline--pipeline-legacy-sources-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+92 Bytes
(100%)
...nd/__snapshots__/scenes-app-pipeline--pipeline-node-configuration-404--dark.png
Oops, something went wrong.
Binary file modified
BIN
+142 Bytes
(100%)
...d/__snapshots__/scenes-app-pipeline--pipeline-node-configuration-404--light.png
Oops, something went wrong.
Binary file modified
BIN
+159 Bytes
(100%)
...d/__snapshots__/scenes-app-pipeline--pipeline-node-edit-configuration--dark.png
Oops, something went wrong.
Binary file modified
BIN
+172 Bytes
(100%)
.../__snapshots__/scenes-app-pipeline--pipeline-node-edit-configuration--light.png
Oops, something went wrong.
Binary file modified
BIN
+117 Bytes
(100%)
...cenes-app-pipeline--pipeline-node-edit-configuration-stateless-plugin--dark.png
Oops, something went wrong.
Binary file modified
BIN
+208 Bytes
(100%)
...enes-app-pipeline--pipeline-node-edit-configuration-stateless-plugin--light.png
Oops, something went wrong.
Binary file modified
BIN
-19 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--dark.png
Oops, something went wrong.
Binary file modified
BIN
+138 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--light.png
Oops, something went wrong.
Binary file modified
BIN
+3 Bytes
(100%)
...nd/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--dark.png
Oops, something went wrong.
Binary file modified
BIN
+130 Bytes
(100%)
...d/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--light.png
Oops, something went wrong.
Binary file modified
BIN
+43 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-node-metrics--dark.png
Oops, something went wrong.
Binary file modified
BIN
+39 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-node-metrics--light.png
Oops, something went wrong.
Binary file modified
BIN
+644 Bytes
(100%)
.../__snapshots__/scenes-app-pipeline--pipeline-node-metrics-error-modal--dark.png
Oops, something went wrong.
Binary file modified
BIN
+747 Bytes
(100%)
...__snapshots__/scenes-app-pipeline--pipeline-node-metrics-error-modal--light.png
Oops, something went wrong.
Binary file modified
BIN
+544 Bytes
(100%)
...end/__snapshots__/scenes-app-pipeline--pipeline-nodes-management-page--dark.png
Oops, something went wrong.
Binary file modified
BIN
+602 Bytes
(100%)
...nd/__snapshots__/scenes-app-pipeline--pipeline-nodes-management-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+1.41 KB
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-overview-page--dark.png
Oops, something went wrong.
Binary file modified
BIN
+1.32 KB
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-overview-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+119 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-site-apps-page--dark.png
Oops, something went wrong.
Binary file modified
BIN
+123 Bytes
(100%)
frontend/__snapshots__/scenes-app-pipeline--pipeline-site-apps-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+118 Bytes
(100%)
...tend/__snapshots__/scenes-app-pipeline--pipeline-transformations-page--dark.png
Oops, something went wrong.
Binary file modified
BIN
+85 Bytes
(100%)
...end/__snapshots__/scenes-app-pipeline--pipeline-transformations-page--light.png
Oops, something went wrong.
Binary file modified
BIN
+7 Bytes
(100%)
..._snapshots__/scenes-app-pipeline--pipeline-transformations-page-empty--dark.png
Oops, something went wrong.
Binary file modified
BIN
+50 Bytes
(100%)
...snapshots__/scenes-app-pipeline--pipeline-transformations-page-empty--light.png
Oops, something went wrong.
Binary file modified
BIN
+157 Bytes
(100%)
frontend/__snapshots__/scenes-app-saved-insights--card-view--dark.png
Oops, something went wrong.
Binary file modified
BIN
+154 Bytes
(100%)
frontend/__snapshots__/scenes-app-saved-insights--card-view--light.png
Oops, something went wrong.
Binary file modified
BIN
+50 Bytes
(100%)
frontend/__snapshots__/scenes-app-saved-insights--empty-state--dark.png
Oops, something went wrong.
Binary file modified
BIN
+93 Bytes
(100%)
frontend/__snapshots__/scenes-app-saved-insights--empty-state--light.png
Oops, something went wrong.
Binary file modified
BIN
-355 Bytes
(99%)
frontend/__snapshots__/scenes-app-saved-insights--list-view--dark.png
Oops, something went wrong.
Binary file modified
BIN
-312 Bytes
(99%)
frontend/__snapshots__/scenes-app-saved-insights--list-view--light.png
Oops, something went wrong.
Binary file modified
BIN
-106 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-activation--dark.png
Oops, something went wrong.
Binary file modified
BIN
+790 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-activation--light.png
Oops, something went wrong.
Binary file modified
BIN
-112 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--dark.png
Oops, something went wrong.
Binary file modified
BIN
+756 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png
Oops, something went wrong.
Binary file modified
BIN
-14 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-notebooks--dark.png
Oops, something went wrong.
Binary file modified
BIN
+641 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-notebooks--light.png
Oops, something went wrong.
Binary file modified
BIN
-132 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png
Oops, something went wrong.
Binary file modified
BIN
+473 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png
Oops, something went wrong.
Binary file modified
BIN
-186 Bytes
(100%)
...tend/__snapshots__/scenes-app-sidepanels--side-panel-support-no-email--dark.png
Oops, something went wrong.
Binary file modified
BIN
+883 Bytes
(100%)
...end/__snapshots__/scenes-app-sidepanels--side-panel-support-no-email--light.png
Oops, something went wrong.
Binary file modified
BIN
-625 Bytes
(100%)
...nd/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--dark.png
Oops, something went wrong.
Binary file modified
BIN
-1.79 KB
(99%)
...d/__snapshots__/scenes-app-sidepanels--side-panel-support-with-email--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--light.png
Oops, something went wrong.
Binary file modified
BIN
+26.3 KB
(100%)
...pshots__/scenes-other-settings--settings-project-with-replay-features--dark.png
Oops, something went wrong.
Binary file modified
BIN
+26.5 KB
(100%)
...shots__/scenes-other-settings--settings-project-with-replay-features--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
...apshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
...pshots__/scenes-other-settings--settings-session-timeout-all-options--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
...shots__/scenes-other-settings--settings-session-timeout-password-only--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
...hots__/scenes-other-settings--settings-session-timeout-password-only--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
..._/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
.../scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
..._/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
.../scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
...s__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
...__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png
Oops, something went wrong.
Binary file modified
BIN
+27.5 KB
(100%)
..._snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png
Oops, something went wrong.
Binary file modified
BIN
+27 KB
(100%)
...snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
frontend/src/lib/components/TaxonomicFilter/TaxonomicFilterEmptyState.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import { IconOpenSidebar, IconPlus } from '@posthog/icons' | ||
import { LemonButton } from '@posthog/lemon-ui' | ||
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' | ||
import type React from 'react' | ||
import { urls } from 'scenes/urls' | ||
|
||
import { PipelineStage } from '~/types' | ||
|
||
import { BuilderHog3 } from '../hedgehogs' | ||
|
||
type EmptyStateProps = { | ||
title: string | ||
description: string | ||
action: { | ||
to: string | ||
text: string | ||
} | ||
docsUrl?: string | ||
hog: React.ComponentType<{ className?: string }> | ||
groupType: TaxonomicFilterGroupType | ||
} | ||
|
||
const EmptyState = ({ title, description, action, docsUrl, hog: Hog, groupType }: EmptyStateProps): JSX.Element => { | ||
return ( | ||
<div className="w-full p-8 rounded mt-4 flex items-center gap-4"> | ||
<div className="w-32 h-32"> | ||
<Hog className="w-full h-full" /> | ||
</div> | ||
<div className="flex-1 text-center"> | ||
<h2 className="text-lg font-semibold">{title}</h2> | ||
<p className="text-sm text-muted mt-2">{description}</p> | ||
<div className="flex items-center justify-center gap-4 mt-4"> | ||
<LemonButton | ||
type="primary" | ||
icon={<IconPlus />} | ||
to={action.to} | ||
data-attr={`taxonomic-filter-empty-state-${groupType}-new-button`} | ||
> | ||
{action.text} | ||
</LemonButton> | ||
<LemonButton | ||
type="tertiary" | ||
sideIcon={<IconOpenSidebar className="w-4 h-4" />} | ||
to={`${docsUrl}?utm_medium=in-product&utm_campaign=taxonomic-filter-empty-state-docs-link`} | ||
data-attr="product-introduction-docs-link" | ||
targetBlank | ||
> | ||
Learn more | ||
</LemonButton> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
type Props = { | ||
groupType: TaxonomicFilterGroupType | ||
} | ||
|
||
const DataWarehouseEmptyState = (): JSX.Element => { | ||
return ( | ||
<EmptyState | ||
title="Connect external data" | ||
groupType={TaxonomicFilterGroupType.DataWarehouse} | ||
description="Use data warehouse sources to import data from your external data into PostHog." | ||
action={{ | ||
to: urls.pipelineNodeNew(PipelineStage.Source), | ||
text: 'New source', | ||
}} | ||
docsUrl="https://posthog.com/docs/data-warehouse" | ||
hog={BuilderHog3} | ||
/> | ||
) | ||
} | ||
|
||
const DefaultEmptyState = (): JSX.Element | null => { | ||
return null | ||
} | ||
|
||
const EMPTY_STATES: Partial<Record<TaxonomicFilterGroupType, () => JSX.Element>> = { | ||
[TaxonomicFilterGroupType.DataWarehouse]: DataWarehouseEmptyState, | ||
[TaxonomicFilterGroupType.DataWarehouseProperties]: DataWarehouseEmptyState, | ||
[TaxonomicFilterGroupType.DataWarehousePersonProperties]: DataWarehouseEmptyState, | ||
} as const | ||
|
||
export const taxonomicFilterGroupTypesWithEmptyStates = Object.keys(EMPTY_STATES) as TaxonomicFilterGroupType[] | ||
|
||
export const TaxonomicFilterEmptyState = (props: Props): JSX.Element => { | ||
const EmptyState = EMPTY_STATES[props.groupType] | ||
|
||
if (EmptyState) { | ||
return <EmptyState /> | ||
} | ||
|
||
return <DefaultEmptyState /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
frontend/src/scenes/settings/environment/HumanFriendlyComparisonPeriodsSetting.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { LemonSwitch } from '@posthog/lemon-ui' | ||
import { useActions, useValues } from 'kea' | ||
import { teamLogic } from 'scenes/teamLogic' | ||
|
||
export function HumanFriendlyComparisonPeriodsSetting(): JSX.Element { | ||
const { updateCurrentTeam } = useActions(teamLogic) | ||
const { currentTeam, currentTeamLoading } = useValues(teamLogic) | ||
|
||
return ( | ||
<> | ||
<p> | ||
When comparing against a previous month or year, PostHog will use the same start and end dates as the | ||
current period by default. It might be desirable, however, to compare against the same day of the week | ||
instead of the same day to account for weekend seasonality. If that's the case for your analysis, you | ||
can enable this setting. | ||
</p> | ||
<p> | ||
In practice, this means that an year comparison becomes a 52 week comparison, and a month comparison | ||
becomes a 4 week comparison. | ||
</p> | ||
<LemonSwitch | ||
onChange={(checked) => { | ||
updateCurrentTeam({ human_friendly_comparison_periods: checked }) | ||
}} | ||
checked={!!currentTeam?.human_friendly_comparison_periods} | ||
disabled={currentTeamLoading} | ||
label="Use human friendly comparison periods" | ||
bordered | ||
/> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.