modifying-taxonomic-filter

Guides safe modification of PostHog's TaxonomicFilter picker across its three live variants.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill modifying-taxonomic-filter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modifying-taxonomic-filter
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/modifying-taxonomic-filter
Command: npx skills add https://github.com/PostHog/posthog-foss --skill modifying-taxonomic-filter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The TaxonomicFilter is PostHog's multi-tab picker for events, properties, actions, and cohorts, and it exists as three live variants behind two feature flags. Changes made against only one variant, or that demote items users actually pick, cause real regressions that tests alone won't catch.

Core Features & Use Cases

  • Product reality grounding: Front-loads production telemetry (selection rates, top search terms, position distribution) so ordering and promotion changes are judged against real user behavior.
  • Variant mirroring map: Documents the legacy-control, legacy-pill, and rebuild-menu surfaces with a concern-by-concern table showing which file to change in each implementation.
  • Telemetry contract: Defines shared event payloads that must stay comparable across experiment arms, with rules for adding or removing properties.
  • Use Case: When adding a new TaxonomicFilterGroupType, the Skill directs you to update the shared enum, add group config in both the legacy logic and the rebuild, register local overrides, and test all three surfaces.

Quick Start

Use the modifying-taxonomic-filter skill to add a new group type to the TaxonomicFilter and mirror the change across the legacy and rebuild implementations.

Frequently Asked Questions about modifying-taxonomic-filter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely modify the PostHog TaxonomicFilter component?

Read the product reality data first, since the top three rows carry about 80% of selections and demoting popular items is a regression. Then determine whether the change must be mirrored across the legacy and rebuild implementations, and test all three surfaces before shipping.

What are the three TaxonomicFilter variants in PostHog?

The variants are legacy-control (original tab UI), legacy-pill (category dropdown behind TAXONOMIC_FILTER_CATEGORY_DROPDOWN), and rebuild-menu (a hooks-based rewrite behind TAXONOMIC_FILTER_MENU_REBUILD). The rebuild reimplements the data layer rather than wrapping the legacy kea logic.

How do I add a new TaxonomicFilterGroupType?

Add the enum value in the shared types.ts, then add group configuration in both taxonomicFilterLogic.tsx and buildTaxonomicGroups.tsx. Also update shortcut routing, telemetry, every consumer's taxonomicGroupTypes prop, and register logic-backed data in useTaxonomicLocalOverrides.

Why do TaxonomicFilter tests render nothing even when they pass?

The virtualized list renders at zero height without an AutoSizer mock, so queries like getByTestId return nothing silently. Mock AutoSizer to render at a fixed height and use search-aware API mock handlers that respect the search parameter.

When does a TaxonomicFilter change need human sign-off?

Any change affecting ordering, promotion, or position-0 placement needs explicit human sign-off, since these directly impact the roughly 80% of selections landing in the top three rows. Agents should not decide these changes alone even when all tests pass.