🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add tooltips for user identification guidance in UsersPage and SessionsList components
Bill Yangd8c94e0eff6f
diff --git a/client/src/app/[site]/users/page.tsx b/client/src/app/[site]/users/page.tsxindex b6eab1047..4bbb9ddc7 100644--- a/client/src/app/[site]/users/page.tsx+++ b/client/src/app/[site]/users/page.tsx@@ -28,6 +28,7 @@ import { Button } from "../../../components/ui/button";import { Label } from "../../../components/ui/label";import { Switch } from "../../../components/ui/switch";import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip";+import { Info } from "lucide-react";import { useSetPageTitle } from "../../../hooks/useSetPageTitle";import { USER_PAGE_FILTERS } from "../../../lib/filterGroups";import { getCountryName, getUserDisplayName } from "../../../lib/utils";@@ -301,6 +302,16 @@ export default function UsersPage() {<Label htmlFor="identified-only" className="text-sm text-neutral-600 dark:text-neutral-400 cursor-pointer">Identified only</Label>+ <Tooltip>+ <TooltipTrigger asChild>+ <Link href="https://www.rybbit.io/docs/identify-users" target="_blank">+ <Info className="h-4 w-4 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-300 cursor-pointer" />+ </Link>+ </TooltipTrigger>+ <TooltipContent>+ <p>Learn how to identify users</p>+ </TooltipContent>+ </Tooltip></div><div className="rounded-md border border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900"><div className="relative overflow-x-auto">diff --git a/client/src/components/Sessions/SessionsList.tsx b/client/src/components/Sessions/SessionsList.tsxindex 468ace20f..6456f8b29 100644--- a/client/src/components/Sessions/SessionsList.tsx+++ b/client/src/components/Sessions/SessionsList.tsx@@ -1,10 +1,12 @@-import { ChevronLeft, ChevronRight, Rewind } from "lucide-react";+import { ChevronLeft, ChevronRight, Info, Rewind } from "lucide-react";import { GetSessionsResponse } from "../../api/analytics/endpoints";import { NothingFound } from "../NothingFound";import { Button } from "../ui/button";import { SessionCard, SessionCardSkeleton } from "./SessionCard";import { Switch } from "../ui/switch";import { Label } from "../ui/label";+import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";+import Link from "next/link";interface SessionsListProps {sessions: GetSessionsResponse;@@ -33,14 +35,6 @@ export function SessionsList({setIdentifiedOnly,pageSize,}: SessionsListProps) {- if (sessions.length === 0 && !isLoading) {- return (- <div className="space-y-3">- <NothingFound icon={<Rewind className="w-10 h-10" />} title={"No sessions found"} description={emptyMessage} />- </div>- );- }-return (<div className="space-y-3">{/* Pagination controls */}@@ -51,6 +45,16 @@ export function SessionsList({<Label htmlFor="identified-only" className="text-sm text-neutral-600 dark:text-neutral-400 cursor-pointer">Identified only</Label>+ <Tooltip>+ <TooltipTrigger asChild>+ <Link href="https://www.rybbit.io/docs/identify-users" target="_blank">+ <Info className="h-4 w-4 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-300 cursor-pointer" />+ </Link>+ </TooltipTrigger>+ <TooltipContent>+ <p>Learn how to identify users</p>+ </TooltipContent>+ </Tooltip></div>)}<div className="flex items-center justify-end gap-2">@@ -64,6 +68,10 @@ export function SessionsList({</div></div>+ {sessions.length === 0 && !isLoading && (+ <NothingFound icon={<Rewind className="w-10 h-10" />} title={"No sessions found"} description={emptyMessage} />+ )}+{/* Session cards */}{isLoading ? (<SessionCardSkeleton userId={userId} count={pageSize} />