Skip to content

Commit

Permalink
feat: remove taxonomy gate on event first seen/last seen (#21521)
Browse files Browse the repository at this point in the history
remove taxonomy gate on event first seen/last seen
  • Loading branch information
xrdt authored Apr 12, 2024
1 parent 8e2986b commit a5d2e10
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 45 deletions.
Binary file modified frontend/__snapshots__/filters-taxonomic-filter--actions--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 frontend/__snapshots__/filters-taxonomic-filter--actions--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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { hide } from '@floating-ui/react'
import { IconInfo, IconLock } from '@posthog/icons'
import { IconInfo } from '@posthog/icons'
import { LemonButton, LemonDivider, LemonSelect, LemonSwitch } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { ActionPopoverInfo } from 'lib/components/DefinitionPopover/ActionPopoverInfo'
Expand All @@ -16,7 +16,6 @@ import {
} from 'lib/components/TaxonomicFilter/types'
import { IconOpenInNew } from 'lib/lemon-ui/icons'
import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'
import { Link } from 'lib/lemon-ui/Link'
import { Popover } from 'lib/lemon-ui/Popover'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { CORE_FILTER_DEFINITIONS_BY_GROUP, isCoreFilter } from 'lib/taxonomy'
Expand All @@ -28,35 +27,6 @@ import { ActionType, CohortType, EventDefinition, PropertyDefinition } from '~/t
import { taxonomicFilterLogic } from '../TaxonomicFilter/taxonomicFilterLogic'
import { TZLabel } from '../TZLabel'

function TaxonomyIntroductionSection(): JSX.Element {
const Lock = (): JSX.Element => (
<div className="h-full w-full overflow-hidden text-ellipsis text-muted">
<Tooltip title="Viewing ingestion data requires a premium license">
<IconLock className="mr-1 text-warning text-xl shrink-0" />
</Tooltip>
</div>
)

return (
<>
<DefinitionPopover.Grid cols={2}>
<DefinitionPopover.Card title="First seen" value={<Lock />} />
<DefinitionPopover.Card title="Last seen" value={<Lock />} />
</DefinitionPopover.Grid>
<DefinitionPopover.Section>
<Link
to="https://posthog.com/docs/user-guides/data-management"
target="_blank"
data-attr="taxonomy-learn-more"
className="mt-2 font-semibold"
>
Learn more about Data Management
</Link>
</DefinitionPopover.Section>
</>
)
}

export function VerifiedDefinitionCheckbox({
verified,
isProperty,
Expand Down Expand Up @@ -161,20 +131,17 @@ function DefinitionView({ group }: { group: TaxonomicFilterGroup }): JSX.Element
return (
<>
{sharedComponents}
{hasTaxonomyFeatures ? (
<DefinitionPopover.Grid cols={2}>
<DefinitionPopover.Card
title="First seen"
value={_definition.created_at && <TZLabel time={_definition.created_at} />}
/>
<DefinitionPopover.Card
title="Last seen"
value={_definition.last_seen_at && <TZLabel time={_definition.last_seen_at} />}
/>
</DefinitionPopover.Grid>
) : (
<TaxonomyIntroductionSection />
)}
<DefinitionPopover.Grid cols={2}>
<DefinitionPopover.Card
title="First seen"
value={_definition.created_at && <TZLabel time={_definition.created_at} />}
/>
<DefinitionPopover.Card
title="Last seen"
value={_definition.last_seen_at && <TZLabel time={_definition.last_seen_at} />}
/>
</DefinitionPopover.Grid>

<DefinitionPopover.HorizontalLine />
<DefinitionPopover.Section>
<DefinitionPopover.Card
Expand Down

0 comments on commit a5d2e10

Please sign in to comment.