Skip to content

Commit

Permalink
fix(insights): Fix paths node names truncation when custom events (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Mar 12, 2024
1 parent 941d64e commit 587bcfb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions frontend/src/scenes/paths/PathNodeCardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,27 @@ export function PathNodeCardButton({
const { user } = useValues(userLogic)
const hasAdvancedPaths = user?.organization?.available_features?.includes(AvailableFeature.PATHS_ADVANCED)

const setAsPathStart = (): void => setFilter({ startPoint: pageUrl(node) })
const setAsPathEnd = (): void => setFilter({ endPoint: pageUrl(node) })
const nodeName = pageUrl(node)
const isPath = nodeName.includes('/')

const setAsPathStart = (): void => setFilter({ startPoint: nodeName })
const setAsPathEnd = (): void => setFilter({ endPoint: nodeName })
const excludePathItem = (): void => {
setFilter({ excludeEvents: [...(filter.excludeEvents || []), pageUrl(node, false)] })
}
const viewFunnel = (): void => {
viewPathToFunnel(node)
}
const copyName = (): void => {
void copyToClipboard(pageUrl(node)).then(captureException)
void copyToClipboard(nodeName).then(captureException)
}
const openModal = (): void => openPersonsModal({ path_end_key: name })

return (
<div className="flex justify-between items-center w-full">
<div className="flex items-center font-semibold">
<div className="font-semibold overflow-hidden max-h-16">
<span className="text-xxs text-muted mr-1">{`0${name[0]}`}</span>
<span className="text-xs">{pageUrl(node, true)}</span>
<span className="text-xs break-words">{pageUrl(node, isPath)}</span>
</div>
<div className="flex flex-nowrap">
<LemonButton size="small" onClick={openModal}>
Expand Down

0 comments on commit 587bcfb

Please sign in to comment.