chore: Implement global header in Dashboard (#20146)

* Add gloal header

* Reimplement report dropdown

* Update unit tests

* Clean up

* Clean up

* Remove unused import

* Update Cypress

* Update Cypress save dashboard test

* Fix spacing
This commit is contained in:
Geido
2022-05-25 12:56:19 +02:00
committed by GitHub
parent 40abb44ba1
commit 3a4176a8d5
22 changed files with 563 additions and 449 deletions

View File

@@ -86,26 +86,6 @@ const ExploreContainer = styled.div`
height: 100%;
`;
const ExploreHeaderContainer = styled.div`
${({ theme }) => css`
background-color: ${theme.colors.grayscale.light5};
height: ${theme.gridUnit * 16}px;
padding: 0 ${theme.gridUnit * 4}px;
.editable-title {
overflow: hidden;
& > input[type='button'],
& > span {
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
white-space: nowrap;
}
}
`}
`;
const ExplorePanelContainer = styled.div`
${({ theme }) => css`
background: ${theme.colors.grayscale.light5};
@@ -530,24 +510,22 @@ function ExploreViewContainer(props) {
return (
<ExploreContainer>
<ExploreHeaderContainer>
<ConnectedExploreChartHeader
actions={props.actions}
canOverwrite={props.can_overwrite}
canDownload={props.can_download}
dashboardId={props.dashboardId}
isStarred={props.isStarred}
slice={props.slice}
sliceName={props.sliceName}
table_name={props.table_name}
formData={props.form_data}
chart={props.chart}
user={props.user}
reports={props.reports}
onSaveChart={toggleModal}
saveDisabled={errorMessage || props.chart.chartStatus === 'loading'}
/>
</ExploreHeaderContainer>
<ConnectedExploreChartHeader
actions={props.actions}
canOverwrite={props.can_overwrite}
canDownload={props.can_download}
dashboardId={props.dashboardId}
isStarred={props.isStarred}
slice={props.slice}
sliceName={props.sliceName}
table_name={props.table_name}
formData={props.form_data}
chart={props.chart}
user={props.user}
reports={props.reports}
onSaveChart={toggleModal}
saveDisabled={errorMessage || props.chart.chartStatus === 'loading'}
/>
<ExplorePanelContainer id="explore-container">
<Global
styles={css`