Skip to content

Commit 10f2e05

Browse files
committed
feat(sidebar): add Slack Community link to help dropdown
1 parent fad9728 commit 10f2e05

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { MoreHorizontal, Pin } from 'lucide-react'
3939
import Link from 'next/link'
4040
import { useParams, usePathname, useRouter } from 'next/navigation'
4141
import { usePostHog } from 'posthog-js/react'
42+
import { SlackIcon } from '@/components/icons'
4243
import { useSession } from '@/lib/auth/auth-client'
4344
import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types'
4445
import { isMacPlatform } from '@/lib/core/utils/platform'
@@ -115,6 +116,9 @@ import { useSidebarStore } from '@/stores/sidebar/store'
115116

116117
const logger = createLogger('Sidebar')
117118

119+
const SLACK_COMMUNITY_URL =
120+
'https://join.slack.com/t/sim-ott9864/shared_invite/zt-451nu802o-ZS8Q5qHLXK1EJ0Mt~wycYA'
121+
118122
export function SidebarTooltip({
119123
children,
120124
label,
@@ -1170,6 +1174,11 @@ export const Sidebar = memo(function Sidebar({ isCollapsed }: SidebarProps) {
11701174
captureEvent(posthog, 'docs_opened', { source: 'help_menu' })
11711175
}, [posthog])
11721176

1177+
const handleOpenSlackCommunity = useCallback(() => {
1178+
window.open(SLACK_COMMUNITY_URL, '_blank', 'noopener,noreferrer')
1179+
captureEvent(posthog, 'slack_community_opened', { source: 'help_menu' })
1180+
}, [posthog])
1181+
11731182
const handleChatRenameBlur = useCallback(
11741183
() => void chatFlyoutRename.saveRename(),
11751184
[chatFlyoutRename.saveRename]
@@ -1670,6 +1679,10 @@ export const Sidebar = memo(function Sidebar({ isCollapsed }: SidebarProps) {
16701679
<BookOpen className='h-[14px] w-[14px]' />
16711680
Docs
16721681
</DropdownMenuItem>
1682+
<DropdownMenuItem onSelect={handleOpenSlackCommunity}>
1683+
<SlackIcon className='size-[14px]' />
1684+
Slack Community
1685+
</DropdownMenuItem>
16731686
<DropdownMenuItem onSelect={handleOpenHelpFromMenu}>
16741687
<HelpCircle className='h-[14px] w-[14px]' />
16751688
Report an issue

apps/sim/lib/posthog/events.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,10 @@ export interface PostHogEventMap {
547547
block_type?: string
548548
}
549549

550+
slack_community_opened: {
551+
source: 'help_menu'
552+
}
553+
550554
search_result_selected: {
551555
result_type:
552556
| 'block'

0 commit comments

Comments
 (0)