Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(sidebar): remove sidebar-search-command-hint experiment code (#66006)

Fernando Gomes6e420b9aa087
diff --git a/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx b/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
index a55853a49ca4..4d4870328004 100644
--- a/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
+++ b/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
@@ -1,5 +1,3 @@
-import { useValues } from 'kea'
-
import { IconSearch } from '@posthog/icons'
import { RenderKeybind } from 'lib/components/Shortcuts/ShortcutMenu'
@@ -7,19 +5,15 @@ import { keyBinds } from 'lib/components/Shortcuts/shortcuts'
import posthog from 'lib/posthog-typed'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { searchButtonLogic } from './searchButtonLogic'
-
interface NavSearchButtonProps {
isLayoutNavCollapsed: boolean
toggleCommand: () => void
}
export function NavSearchButton({ isLayoutNavCollapsed, toggleCommand }: NavSearchButtonProps): JSX.Element {
- const { showHint } = useValues(searchButtonLogic)
-
return (
<ButtonPrimitive
- iconOnly={!showHint}
+ iconOnly
data-attr="nav-search"
tooltip={
<div className="flex items-center gap-2">
@@ -31,18 +25,8 @@ export function NavSearchButton({ isLayoutNavCollapsed, toggleCommand }: NavSear
posthog.capture('nav search clicked')
toggleCommand()
}}
- className="gap-0"
>
<IconSearch className="size-4 shrink-0 text-secondary" />
- <div
- className={`overflow-hidden whitespace-nowrap transition-[max-width,opacity] duration-300 ease-in-out ${
- showHint ? 'max-w-xs opacity-100' : 'max-w-0 opacity-0'
- }`}
- >
- <span className="flex items-center gap-1 pl-1 text-xs text-secondary">
- <RenderKeybind keybind={[keyBinds.search]} minimal />
- </span>
- </div>
</ButtonPrimitive>
)
}
diff --git a/frontend/src/lib/components/NavSearchButton/searchButtonLogic.tsx b/frontend/src/lib/components/NavSearchButton/searchButtonLogic.tsx
deleted file mode 100644
index 604edb4327b2..000000000000
--- a/frontend/src/lib/components/NavSearchButton/searchButtonLogic.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { kea, connect, path, actions, reducers, selectors, afterMount } from 'kea'
-
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-
-import type { searchButtonLogicType } from './searchButtonLogicType'
-
-export const searchButtonLogic = kea<searchButtonLogicType>([
- path(['lib', 'components', 'NavSearchButton', 'searchButtonLogic']),
- connect(() => ({
- values: [featureFlagLogic, ['featureFlags']],
- })),
- actions(() => ({
- hideHint: true,
- })),
- reducers(() => ({
- hintVisible: [
- true,
- {
- hideHint: () => false,
- },
- ],
- })),
- selectors(() => ({
- isHintEnabled: [
- (s) => [s.featureFlags],
- (featureFlags) => featureFlags[FEATURE_FLAGS.SIDEBAR_SEARCH_COMMAND_HINT] === 'test',
- ],
- showHint: [
- (s) => [s.hintVisible, s.isHintEnabled],
- (hintVisible, isHintEnabled) => hintVisible && isHintEnabled,
- ],
- })),
- afterMount(({ actions, cache }) => {
- cache.disposables.add(() => {
- const id = setTimeout(() => actions.hideHint(), 5000)
-
- return () => clearTimeout(id)
- }, 'hintTimer')
- }),
-])
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 4f70fbd125aa..b2c0ee8aaa9c 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -467,7 +467,6 @@ export const FEATURE_FLAGS = {
SHOW_DATA_PIPELINES_NAV_ITEM: 'show-data-pipelines-nav-item', // owner: @raquelmsmith
SHOW_REFERRER_FAVICON: 'show-referrer-favicon', // owner: @jordanm-posthog #team-web-analytics
SHOW_REPLAY_FILTERS_FEEDBACK_BUTTON: 'show-replay-filters-feedback-button', // owner: @ksvat #team-replay
- SIDEBAR_SEARCH_COMMAND_HINT: 'sidebar-search-command-hint', // owner: @fercgomes
SIGNUP_AA_TEST_4_WAY: 'signup-aa-test-4-way', // owner: @andehen #team-experiments multivariate=control,test-1,test-2,test-3
SLACK_DWH: 'slack-dwh', // owner: @MarconLP #team-warehouse-sources
SNAPCHAT_ADS_SOURCE: 'snapchat-ads-source', // owner: @jabahamondes #team-web-analytics