Skip to content

Commit

Permalink
Include the insight ID in the url for "saved funnels" (#6531)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra authored Oct 20, 2021
1 parent 4fd848d commit f84b447
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion frontend/src/scenes/insights/SavedCard/SavedFunnels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export function SavedFunnels(): JSX.Element {
<List.Item>
<Col style={{ whiteSpace: 'pre-line', width: '100%', padding: 0 }}>
<Row justify="space-between" align="middle">
<Link to={'/insights?' + toParams(funnel.filters)} style={{ flex: 1 }}>
<Link
to={`/insights?${toParams(funnel.filters)}#fromItem=${
funnel.id
}&fromSavedFunnels=true`}
style={{ flex: 1 }}
>
{funnel.name}
</Link>
<Popconfirm
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/scenes/insights/insightLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ export const insightLogic = kea<insightLogicType>({
// - not saved if on the history "insight" for some reason
(insight.filters.insight as ViewType) !== ViewType.HISTORY &&
// - not saved if we came from a dashboard --> there's a separate "save" button for that
!router.values.hashParams.fromDashboard
!router.values.hashParams.fromDashboard &&
// - not saved if we come from the "saved funnels" list, TO BE REMOVED with release of "3408-saved-insights"
!router.values.hashParams.fromSavedFunnels
) {
const filterLength = Object.keys(insight.filters).length
if (filterLength === 0 || (filterLength === 1 && 'from_dashboard' in insight.filters)) {
Expand Down

0 comments on commit f84b447

Please sign in to comment.