Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fix flickering in journey nodes.
Mike Cao21ff3d1280b9
diff --git a/src/app/(main)/reports/journey/JourneyView.module.css b/src/app/(main)/reports/journey/JourneyView.module.cssindex d5c779b6b..f6b50b692 100644--- a/src/app/(main)/reports/journey/JourneyView.module.css+++ b/src/app/(main)/reports/journey/JourneyView.module.css@@ -71,10 +71,13 @@position: relative;display: flex;flex-direction: column;- gap: 10px;height: 100%;}+.wrapper {+ padding-bottom: 10px;+}+.item {position: relative;cursor: pointer;diff --git a/src/app/(main)/reports/journey/JourneyView.tsx b/src/app/(main)/reports/journey/JourneyView.tsxindex 7a5295431..9b9179380 100644--- a/src/app/(main)/reports/journey/JourneyView.tsx+++ b/src/app/(main)/reports/journey/JourneyView.tsx@@ -188,59 +188,63 @@ export default function JourneyView() {return (<divkey={name}- className={classNames(styles.item, {- [styles.selected]: selected,- [styles.active]: active,- })}- onClick={() => handleClick(name, columnIndex, paths)}+ className={styles.wrapper}onMouseEnter={() => selected && setActiveNode({ name, columnIndex, paths })}onMouseLeave={() => selected && setActiveNode(null)}>- <div className={styles.name}>{name}</div>- <TooltipPopup label={dropOffPercent} disabled={!selected}>- <div className={styles.count}>- {selected ? (active ? activeCount : selectedCount) : totalCount}- </div>- </TooltipPopup>- {columnIndex < columns.length &&- lines.map(([fromIndex, nodeIndex], i) => {- const height =- (Math.abs(nodeIndex - fromIndex) + 1) * (NODE_HEIGHT + NODE_GAP) -- NODE_GAP;- const midHeight =- (Math.abs(nodeIndex - fromIndex) - 1) * (NODE_HEIGHT + NODE_GAP) +- NODE_GAP +- LINE_WIDTH;- const nodeName = columns[columnIndex - 1]?.nodes[fromIndex].name;-- return (- <div- key={`${fromIndex}${nodeIndex}${i}`}- className={classNames(styles.line, {- [styles.active]:- active &&- activeNode?.paths.find(- path =>- path.items[columnIndex] === name &&- path.items[columnIndex - 1] === nodeName,- ),- [styles.up]: fromIndex < nodeIndex,- [styles.down]: fromIndex > nodeIndex,- [styles.flat]: fromIndex === nodeIndex,- })}- style={{ height }}- >- <div className={classNames(styles.segment, styles.start)} />- <div- className={classNames(styles.segment, styles.mid)}- style={{- height: midHeight,- }}- />- <div className={classNames(styles.segment, styles.end)} />- </div>- );+ <div+ className={classNames(styles.item, {+ [styles.selected]: selected,+ [styles.active]: active,})}+ onClick={() => handleClick(name, columnIndex, paths)}+ >+ <div className={styles.name}>{name}</div>+ <TooltipPopup label={dropOffPercent} disabled={!selected}>+ <div className={styles.count}>+ {selected ? (active ? activeCount : selectedCount) : totalCount}+ </div>+ </TooltipPopup>+ {columnIndex < columns.length &&+ lines.map(([fromIndex, nodeIndex], i) => {+ const height =+ (Math.abs(nodeIndex - fromIndex) + 1) * (NODE_HEIGHT + NODE_GAP) -+ NODE_GAP;+ const midHeight =+ (Math.abs(nodeIndex - fromIndex) - 1) * (NODE_HEIGHT + NODE_GAP) ++ NODE_GAP ++ LINE_WIDTH;+ const nodeName = columns[columnIndex - 1]?.nodes[fromIndex].name;++ return (+ <div+ key={`${fromIndex}${nodeIndex}${i}`}+ className={classNames(styles.line, {+ [styles.active]:+ active &&+ activeNode?.paths.find(+ path =>+ path.items[columnIndex] === name &&+ path.items[columnIndex - 1] === nodeName,+ ),+ [styles.up]: fromIndex < nodeIndex,+ [styles.down]: fromIndex > nodeIndex,+ [styles.flat]: fromIndex === nodeIndex,+ })}+ style={{ height }}+ >+ <div className={classNames(styles.segment, styles.start)} />+ <div+ className={classNames(styles.segment, styles.mid)}+ style={{+ height: midHeight,+ }}+ />+ <div className={classNames(styles.segment, styles.end)} />+ </div>+ );+ })}+ </div></div>);},