+
+ Step {column.index + 1}
-
-
- {column.totalSessions.toLocaleString()}
+
+
+ {column.totalSessions.toLocaleString()} visitors
-
-
- visitors
+ {column.dropOffPercent !== 0 && (
+
+ {column.dropOffPercent > 0 ? '+' : ''}
+ {column.dropOffPercent}%
- {column.dropOffPercent !== 0 && (
-
- {column.dropOffPercent > 0 ? '+' : ''}
- {column.dropOffPercent}%
-
- )}
-
+ )}
- {/* Colored connector line from header to cards */}
-
)
}
@@ -157,7 +145,6 @@ function ColumnHeader({
function PageRow({
page,
colIndex,
- colColor,
columnTotal,
maxCount,
isSelected,
@@ -166,13 +153,13 @@ function PageRow({
}: {
page: ColumnPage
colIndex: number
- colColor: string
columnTotal: number
maxCount: number
isSelected: boolean
isOther: boolean
onClick: () => void
}) {
+ const pct = columnTotal > 0 ? Math.round((page.sessionCount / columnTotal) * 100) : 0
const barWidth = maxCount > 0 ? (page.sessionCount / maxCount) * 100 : 0
return (
@@ -185,29 +172,24 @@ function PageRow({
data-path={page.path}
className={`
group flex items-center justify-between w-full relative overflow-hidden
- px-3 py-2.5 rounded-lg text-left transition-all
+ h-9 px-2 -mx-2 rounded-lg text-left transition-colors
${isOther ? 'cursor-default' : 'cursor-pointer'}
- ${
- isSelected
- ? 'border-l-[3px] border border-neutral-200 dark:border-neutral-700'
- : isOther
- ? 'border border-neutral-100 dark:border-neutral-800'
- : 'border border-neutral-200 dark:border-neutral-700 hover:border-neutral-300 dark:hover:border-neutral-600 hover:shadow-sm'
+ ${isSelected
+ ? 'bg-brand-orange/10 dark:bg-brand-orange/10'
+ : isOther
+ ? ''
+ : 'hover:bg-neutral-50 dark:hover:bg-neutral-800/50'
}
`}
- style={isSelected ? { borderLeftColor: colColor, backgroundColor: `${colColor}08` } : undefined}
>
{/* Background bar */}
- {!isOther && !isSelected && (
+ {!isOther && (
- )}
- {isSelected && (
-
)}
{isOther ? page.path : smartLabel(page.path)}
-
+ {!isOther && (
+
+ {pct}%
+
+ )}
+
- {page.sessionCount.toLocaleString()}
-
+ : 'text-neutral-600 dark:text-neutral-400'
+ }`}
+ >
+ {page.sessionCount.toLocaleString()}
+
+
)
}
function JourneyColumn({
column,
- color,
selectedPath,
exitCount,
onSelect,
}: {
column: Column
- color: string
selectedPath: string | undefined
exitCount: number
onSelect: (path: string) => void
}) {
if (column.pages.length === 0 && exitCount === 0) {
return (
-