Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Display tab hints on hover

Blue Mousef07c4586ef56
diff --git a/web/app/pages/Project/View/components/ProjectSidebar.tsx b/web/app/pages/Project/View/components/ProjectSidebar.tsx
index 8e43eb260..cff17b402 100644
--- a/web/app/pages/Project/View/components/ProjectSidebar.tsx
+++ b/web/app/pages/Project/View/components/ProjectSidebar.tsx
@@ -70,6 +70,21 @@ interface ProjectSidebarProps {
onMobileClose?: () => void
}
+const TAB_HINT_KEYS: Record<string, string> = {
+ ai: 'dashboard.askAiHint',
+ traffic: 'dashboard.trafficHint',
+ performance: 'dashboard.performanceHint',
+ funnels: 'dashboard.funnelsHint',
+ alerts: 'dashboard.alertsHint',
+ profiles: 'dashboard.profilesHint',
+ sessions: 'dashboard.sessionsHint',
+ errors: 'dashboard.errorsHint',
+ goals: 'dashboard.goalsHint',
+ experiments: 'dashboard.experimentsHint',
+ featureFlags: 'dashboard.featureFlagsHint',
+ captcha: 'dashboard.captchaHint',
+}
+
const CollapsibleGroup: React.FC<{
group: TabGroup
activeTab: ProjectTabKey
@@ -80,6 +95,7 @@ const CollapsibleGroup: React.FC<{
isCollapsed?: boolean
onMobileClose?: () => void
}> = ({ group, activeTab, onTabChange, projectId, dataLoading, searchParams, isCollapsed, onMobileClose }) => {
+ const { t } = useTranslation('common')
const [isExpanded, setIsExpanded] = useState(true)
const hasActiveTab = useMemo(() => {
@@ -198,23 +214,32 @@ const CollapsibleGroup: React.FC<{
? routes.project_settings.replace(':id', projectId)
: { search: newSearchParams.toString() }
+ const hintKey = TAB_HINT_KEYS[tab.id]
+ const hintText = hintKey ? t(hintKey) : undefined
+
return (
- <Link
+ <Tooltip
key={tab.id}
- to={tabUrl}
- onClick={handleClick}
- className={cn('group flex items-center gap-1.5 rounded-md px-2.5 py-2 transition-colors', {
- 'bg-gray-100 dark:bg-slate-800': isCurrent,
- 'hover:bg-gray-100 dark:hover:bg-slate-800/60': !isCurrent,
- 'cursor-wait': dataLoading && tab.id !== 'settings',
- })}
- aria-current={isCurrent ? 'page' : undefined}
- >
- <TabIcon className={cn('size-4 shrink-0', iconColorClass)} strokeWidth={1.5} aria-hidden='true' />
- <Text as='span' size='sm' weight='medium' truncate className='max-w-full'>
- {tab.label}
- </Text>
- </Link>
+ text={hintText}
+ delay={1000}
+ tooltipNode={
+ <Link
+ to={tabUrl}
+ onClick={handleClick}
+ className={cn('group flex items-center gap-1.5 rounded-md px-2.5 py-2 transition-colors', {
+ 'bg-gray-100 dark:bg-slate-800': isCurrent,
+ 'hover:bg-gray-100 dark:hover:bg-slate-800/60': !isCurrent,
+ 'cursor-wait': dataLoading && tab.id !== 'settings',
+ })}
+ aria-current={isCurrent ? 'page' : undefined}
+ >
+ <TabIcon className={cn('size-4 shrink-0', iconColorClass)} strokeWidth={1.5} aria-hidden='true' />
+ <Text as='span' size='sm' weight='medium' truncate className='max-w-full'>
+ {tab.label}
+ </Text>
+ </Link>
+ }
+ />
)
})}
</nav>
@@ -420,22 +445,29 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
}
return (
- <Link
- to={{ search: newSearchParams.toString() }}
- onClick={handleClick}
- className={cn('group flex items-center gap-2 rounded-md px-2.5 py-2 transition-colors', {
- 'bg-linear-to-r from-violet-500/10 to-purple-500/10 dark:from-violet-500/20 dark:to-purple-500/20':
- isCurrent,
- 'hover:bg-gray-100 dark:hover:bg-slate-800/60': !isCurrent,
- 'cursor-wait': dataLoading,
- })}
- aria-current={isCurrent ? 'page' : undefined}
- >
- <TabIcon className={cn('size-4 shrink-0', iconColorClass)} strokeWidth={1.5} aria-hidden='true' />
- <Text as='span' size='sm' weight='medium' truncate className='max-w-full'>
- {askAiTab.label}
- </Text>
- </Link>
+ <Tooltip
+ text={t('dashboard.askAiHint')}
+ delay={1000}
+ className='w-full'
+ tooltipNode={
+ <Link
+ to={{ search: newSearchParams.toString() }}
+ onClick={handleClick}
+ className={cn('group flex items-center gap-2 rounded-md px-2.5 py-2 transition-colors', {
+ 'bg-linear-to-r from-violet-500/10 to-purple-500/10 dark:from-violet-500/20 dark:to-purple-500/20':
+ isCurrent,
+ 'hover:bg-gray-100 dark:hover:bg-slate-800/60': !isCurrent,
+ 'cursor-wait': dataLoading,
+ })}
+ aria-current={isCurrent ? 'page' : undefined}
+ >
+ <TabIcon className={cn('size-4 shrink-0', iconColorClass)} strokeWidth={1.5} aria-hidden='true' />
+ <Text as='span' size='sm' weight='medium' truncate className='max-w-full'>
+ {askAiTab.label}
+ </Text>
+ </Link>
+ }
+ />
)
})()}
</div>
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 8d7da543f..868849319 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -893,6 +893,18 @@
"featureFlags": "Feature Flags",
"featureFlagsDesc": "Feature flags allow you to toggle features for cohorts or individuals.\nTest the impact before rolling out to everyone.",
"askAi": "Ask AI",
+ "askAiHint": "Get AI-powered insights and answers about your analytics data.",
+ "trafficHint": "Monitor your website visitors, page views, and traffic sources.",
+ "performanceHint": "Analyze page load times and user experience metrics.",
+ "funnelsHint": "Track user conversion through multi-step processes.",
+ "alertsHint": "Set up automated notifications for traffic and event changes.",
+ "profilesHint": "View detailed information about your website visitors.",
+ "sessionsHint": "Explore individual user sessions and their journey.",
+ "errorsHint": "Track and analyze your error data to understand and fix issues.",
+ "goalsHint": "Define and track conversion goals for important user actions.",
+ "experimentsHint": "Run A/B tests to optimize your website.",
+ "featureFlagsHint": "Toggle features for specific user cohorts.",
+ "captchaHint": "Protect your forms with privacy-focused CAPTCHA.",
"webAnalytics": "Web analytics",
"productAnalytics": "Product analytics",
"revenueAnalytics": "Revenue analytics",
@@ -1292,6 +1304,8 @@
"allUsers": "All",
"anonymous": "Anonymous",
"identified": "Identified",
+ "sessionNew": "New",
+ "sessionReturn": "Return",
"online": "Online",
"lastSeenAgo": "Last seen {{time}}",
"searchUsers": "Search users...",