Skip to content

Commit

Permalink
Hide divider when chart is hidden, and increase padding below toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
davismcphee committed Oct 19, 2023
1 parent da8e417 commit f636952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { DiscoverStateContainer } from '../../services/discover_state';
import { FieldStatisticsTab } from '../field_stats_table';
import { DiscoverDocuments } from './discover_documents';
import { DOCUMENTS_VIEW_CLICK, FIELD_STATISTICS_VIEW_CLICK } from '../field_stats_table/constants';
import { useAppStateSelector } from '../../services/discover_app_state_container';

const DROP_PROPS = {
value: {
Expand Down Expand Up @@ -80,6 +81,8 @@ export const DiscoverMainContent = ({
) : undefined;
}, [viewMode, setDiscoverViewMode, isPlainRecord]);

const showChart = useAppStateSelector((state) => !state.hideChart);

return (
<DragDrop
draggable={false}
Expand All @@ -96,7 +99,7 @@ export const DiscoverMainContent = ({
responsive={false}
data-test-subj="dscMainContent"
>
<EuiHorizontalRule margin="none" />
{showChart && <EuiHorizontalRule margin="none" />}
{viewMode === VIEW_MODE.DOCUMENT_LEVEL ? (
<DiscoverDocuments
viewModeToggle={viewModeToggle}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.dscGridToolbar {
padding: $euiSizeS $euiSizeS 0 $euiSizeS;
padding: $euiSizeS;
}

.dscGridToolbarControlButton .euiDataGrid__controlBtn {
Expand Down

0 comments on commit f636952

Please sign in to comment.