Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { MoreHorizontal, Pin } from 'lucide-react'
import Link from 'next/link'
import { useParams, usePathname, useRouter } from 'next/navigation'
import { usePostHog } from 'posthog-js/react'
import { SlackIcon } from '@/components/icons'
import { useSession } from '@/lib/auth/auth-client'
import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types'
import { isMacPlatform } from '@/lib/core/utils/platform'
Expand Down Expand Up @@ -115,6 +116,9 @@ import { useSidebarStore } from '@/stores/sidebar/store'

const logger = createLogger('Sidebar')

const SLACK_COMMUNITY_URL =
'https://join.slack.com/t/sim-ott9864/shared_invite/zt-43lp8tc5v-0qrrqHGBKUsvQlpoouH~TA'

export function SidebarTooltip({
children,
label,
Expand Down Expand Up @@ -1170,6 +1174,11 @@ export const Sidebar = memo(function Sidebar({ isCollapsed }: SidebarProps) {
captureEvent(posthog, 'docs_opened', { source: 'help_menu' })
}, [posthog])

const handleOpenSlackCommunity = useCallback(() => {
window.open(SLACK_COMMUNITY_URL, '_blank', 'noopener,noreferrer')
captureEvent(posthog, 'slack_community_opened', { source: 'help_menu' })
}, [posthog])

const handleChatRenameBlur = useCallback(
() => void chatFlyoutRename.saveRename(),
[chatFlyoutRename.saveRename]
Expand Down Expand Up @@ -1670,6 +1679,10 @@ export const Sidebar = memo(function Sidebar({ isCollapsed }: SidebarProps) {
<BookOpen className='h-[14px] w-[14px]' />
Docs
</DropdownMenuItem>
<DropdownMenuItem onSelect={handleOpenSlackCommunity}>
<SlackIcon className='size-[14px]' />
Slack Community
</DropdownMenuItem>
<DropdownMenuItem onSelect={handleOpenHelpFromMenu}>
<HelpCircle className='h-[14px] w-[14px]' />
Report an issue
Expand Down
4 changes: 4 additions & 0 deletions apps/sim/lib/posthog/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ export interface PostHogEventMap {
block_type?: string
}

slack_community_opened: {
source: 'help_menu'
}

search_result_selected: {
result_type:
| 'block'
Expand Down
Loading