Skip to content

Commit 3cd49c5

Browse files
committed
Style tweaks for reports without footers
1 parent 2cf2ade commit 3cd49c5

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

public/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
}
9696

9797
.react-resizable-handle {
98-
bottom: 1px !important;
98+
bottom: 4px !important;
99+
right: -2px !important;
99100
opacity: 0.5;
100101
color: rgb(222, 222, 222);
101102
}
@@ -216,7 +217,7 @@
216217
}
217218

218219
.card-view .MuiTablePagination-root {
219-
margin-top: -40px;
220+
margin-top: 0px;
220221

221222
}
222223

src/card/settings/CardSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const NeoCardSettings = ({
3636
expanded,
3737
onToggleCardExpand,
3838
}) => {
39-
const reportHeight = heightPx - CARD_HEADER_HEIGHT + 24;
39+
const reportHeight = heightPx - CARD_HEADER_HEIGHT + 19;
4040

4141
const cardSettingsHeader = (
4242
<NeoCardSettingsHeader

src/card/view/CardView.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const NeoCardView = ({
4444
expanded,
4545
onToggleCardExpand,
4646
}) => {
47-
const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 22;
47+
const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 20;
4848
const cardHeight = heightPx - CARD_FOOTER_HEIGHT + 23;
4949
const ref = React.useRef();
5050

@@ -137,10 +137,10 @@ const NeoCardView = ({
137137

138138
const localParameters = { ...getLocalParameters(query), ...getLocalParameters(settings.drilldownLink) };
139139
const reportTypes = getReportTypes(extensions);
140-
const withoutFooter =
141-
reportTypes[type] && reportTypes[type].withoutFooter
142-
? reportTypes[type].withoutFooter
143-
: (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections);
140+
const reportTypeHasNoFooter = reportTypes[type] && reportTypes[type].withoutFooter;
141+
const withoutFooter = reportTypeHasNoFooter
142+
? reportTypes[type].withoutFooter
143+
: (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections);
144144

145145
const getGlobalParameter = (key: string): unknown => {
146146
return globalParameters ? globalParameters[key] : undefined;
@@ -170,13 +170,13 @@ const NeoCardView = ({
170170
paddingRight: '0px',
171171
paddingTop: '0px',
172172
width: '100%',
173-
marginTop: '-3px',
173+
marginTop: '-9px',
174174
height: expanded
175175
? withoutFooter
176176
? '100%'
177177
: `calc(100% - ${CARD_FOOTER_HEIGHT}px)`
178178
: withoutFooter
179-
? `${reportHeight + CARD_FOOTER_HEIGHT}px`
179+
? `${reportHeight + CARD_FOOTER_HEIGHT - (reportTypeHasNoFooter ? 0 : 20)}px`
180180
: `${reportHeight}px`,
181181
overflow: 'auto',
182182
};
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
import React from 'react';
22

3-
const canvasStyle = { paddingLeft: '10px', position: 'relative', overflow: 'hidden', width: '100%', height: '100%' };
3+
const canvasStyle = {
4+
paddingLeft: '10px',
5+
marginBottom: 5,
6+
position: 'relative',
7+
overflow: 'hidden',
8+
width: '100%',
9+
height: '100%',
10+
};
411

512
/**
613
* Renders the canvas on which the graph visualization is projected.
714
*/
815
export const NeoGraphChartCanvas = ({ children }) => {
9-
return <div style={canvasStyle}>{children}</div>;
16+
return (
17+
<div className='graph-chart-canvas' style={canvasStyle}>
18+
{children}
19+
</div>
20+
);
1021
};

0 commit comments

Comments
 (0)