-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dashboard item information to insights page (cherry picked from commit 63cec8e6c9416a3d89a0420894c9184dec36256d) * update all dashboard item links * add logic to include dashboard name on insights dashboard item * add back to dashboards link and update all dashboard item links * style clean up * typescript fixes * add comments for posterity * update dashboard item design and componentize item header * remove dashboardName variable * refactor displayMap * update dashboard item logic and props * span fix * clean up insight dashboard item view url * fix weird state bug with trends * update dashboard item view for paths * clean up params for dashboardItemHeader * maintain update dashboard item functionality * bandaid fix retention insight history bug * remove stale comment * typing tweak * feedback updates * url namespace update for clarity * update e2e Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
- Loading branch information
1 parent
f4009c1
commit 19d3042
Showing
17 changed files
with
317 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import { Link } from 'lib/components/Link' | ||
import { PageHeader } from 'lib/components/PageHeader' | ||
import { ArrowLeftOutlined } from '@ant-design/icons' | ||
import { IconDashboard } from 'lib/components/icons' | ||
import { useValues } from 'kea' | ||
import { dashboardLogic } from './dashboardLogic' | ||
import './Dashboard.scss' | ||
import { insightLogic } from 'scenes/insights/insightLogic' | ||
|
||
interface Props { | ||
dashboardId: number | ||
} | ||
|
||
export function DashboardItemHeader({ dashboardId }: Props): JSX.Element { | ||
const { dashboard } = useValues(dashboardLogic({ id: dashboardId })) | ||
const { dashboardItem } = useValues(insightLogic) | ||
|
||
return ( | ||
<div className="dashboard-item-header"> | ||
<Link to={`/dashboard/${dashboardId}`}> | ||
<ArrowLeftOutlined /> To {dashboard?.name} dashboard | ||
</Link> | ||
<div style={{ marginTop: -16 }}> | ||
<PageHeader title={dashboardItem?.name} /> | ||
<div className="dashboard-item-description text-default"> | ||
<div className="title"> | ||
<IconDashboard /> | ||
<span style={{ paddingLeft: 6 }}> | ||
Viewing graph <b>{dashboardItem?.name}</b> from{' '} | ||
<Link to={`/dashboard/${dashboardId}`}>{dashboard?.name}</Link> dashboard. | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.