Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Paths fixes for Start/End Buttons #6175

Merged
merged 1 commit into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions frontend/src/scenes/insights/InsightTabs/PathTab/NewPathTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@
padding: 0;
}
}

.paths-close-button {
cursor: 'pointer';
float: 'none';
padding-left: 8;
align-self: 'center';

&:hover {
border-radius: 4px 4px 0px 0px;
color: black;
z-index: 999;
}
}
32 changes: 19 additions & 13 deletions frontend/src/scenes/insights/InsightTabs/PathTab/NewPathTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,24 @@ export function NewPathTab(): JSX.Element {
>
{filter.start_point ? (
<>
{filter.start_point}
<CloseButton
onClick={(e: Event) => {
setFilter({ start_point: null })
e.stopPropagation()
}}
style={{
cursor: 'pointer',
float: 'none',
paddingLeft: 8,
alignSelf: 'center',
}}
/>
<Col span={22} style={{ overflow: 'hidden' }}>
{filter.start_point}
</Col>
<Col span={2}>
<CloseButton
onClick={(e: Event) => {
setFilter({ start_point: null })
e.stopPropagation()
}}
className="paths-close-button"
style={{
cursor: 'pointer',
float: 'none',
paddingLeft: 8,
alignSelf: 'center',
}}
/>
</Col>
</>
) : (
<span style={{ color: 'var(--muted)' }}>Add start point</span>
Expand Down Expand Up @@ -222,6 +227,7 @@ export function NewPathTab(): JSX.Element {
setFilter({ end_point: null })
e.stopPropagation()
}}
className="paths-close-button"
style={{
cursor: 'pointer',
float: 'none',
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/scenes/paths/NewPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export function NewPaths({ dashboardItemId = null, filters = null, color = 'whit
elements.forEach((node) => node.parentNode.removeChild(node))

if (!paths || paths.nodes.length === 0) {
setPathItemCards([])
return
}
let width = canvas.current.offsetWidth
Expand Down Expand Up @@ -344,7 +345,7 @@ export function NewPaths({ dashboardItemId = null, filters = null, color = 'whit
Average time{' '}
</span>
{humanFriendlyDuration(
pathItemCard.targetLinks[0].average_conversion_time
pathItemCard.targetLinks[0].average_conversion_time / 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this the wrong unit before?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. 6 hours average time on Paths makes no sense 😂 .

)}
</Menu.Item>
)}
Expand Down