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

Dashboard item description (1/2) #4240

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
clean up
liyiy committed May 7, 2021
commit 83333686c36f5b607647ff3e8bdf71bb6dba032a
2 changes: 1 addition & 1 deletion cypress/integration/dashboard.js
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ describe('Dashboard', () => {
it('Opens dashboard item in insights', () => {
cy.get('[data-attr=dashboard-name]').contains('My App Dashboard').click()
cy.get('[data-attr=dashboard-item-0] .dashboard-item-title a').click()
cy.location('pathname').should('include', '/insights/dashboard_item')
cy.location('pathname').should('include', '/insights/dashboard_insight')
cy.get('[data-attr=math-selector-0]').contains('Unique users').should('exist')
cy.get('[data-attr=trend-line-graph]').should('exist')
})
4 changes: 1 addition & 3 deletions frontend/src/scenes/dashboard/DashboardInsight.scss
Original file line number Diff line number Diff line change
@@ -7,9 +7,6 @@
.header-container {
display: flex;
justify-content: space-between;
// padding-top: $default_spacing;
// padding-bottom: $default_spacing;
// padding-left: $default_spacing;
padding: $default_spacing;
background: white;

@@ -31,6 +28,7 @@
}

.dashboard-item-description {
margin-top: 8px;
.ant-card-body {
padding: 0;
}
4 changes: 2 additions & 2 deletions frontend/src/scenes/dashboard/DashboardInsightHeader.tsx
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ export function DashboardInsightHeader({ dashboardId }: Props): JSX.Element {

<div className="header-container text-default">
<div className="title-description">
<div style={{ display: 'flex', marginBottom: 8 }}>
<div style={{ display: 'flex' }}>
{isDashboardItemEditMode ? <EditOutlined /> : <IconDashboard />}
<span style={{ paddingLeft: 6 }}>
{isDashboardItemEditMode ? 'Editing graph' : 'Viewing graph'}{' '}
@@ -85,7 +85,7 @@ export function DashboardInsightHeader({ dashboardId }: Props): JSX.Element {
icon={<SaveOutlined />}
onClick={() => updateDashboardItem(dashboardItem.id, { description: newDescription })}
type="primary"
data-attr="dashboard-item-description-submit"
data-attr="dashboard-insight-description-submit"
>
Save changes
</Button>