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

Fixes issue with footer overlapping side panel and fixes summary layout #353

Merged
merged 2 commits into from
Nov 21, 2018
Merged
Changes from all commits
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
31 changes: 20 additions & 11 deletions frontend/src/pages/PipelineDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { URLParser, QUERY_PARAMS } from '../lib/URLParser';
import { UnControlled as CodeMirror } from 'react-codemirror2';
import { Workflow } from '../../third_party/argo-ui/argo_template';
import { classes, stylesheet } from 'typestyle';
import { color, commonCss, padding, fontsize } from '../Css';
import { color, commonCss, padding, fontsize, fonts } from '../Css';
import { logger, errorToMessage } from '../lib/Utils';

interface PipelineDetailsState {
Expand All @@ -50,6 +50,8 @@ interface PipelineDetailsState {
templateYaml?: string;
}

const summaryCardWidth = 500;

const css = stylesheet({
containerCss: {
$nest: {
Expand All @@ -69,9 +71,14 @@ const css = stylesheet({
display: 'flex',
padding: '0 0 20px 20px',
},
footerInfoOffset: {
marginLeft: summaryCardWidth + 40,
},
infoSpan: {
color: color.lowContrast,
fontFamily: fonts.secondary,
fontSize: fontsize.small,
letterSpacing: '0.21px',
lineHeight: '24px',
paddingLeft: 6,
},
Expand All @@ -80,7 +87,7 @@ const css = stylesheet({
left: 20,
padding: 10,
position: 'absolute',
width: 500,
width: summaryCardWidth,
zIndex: 1,
},
summaryKey: {
Expand Down Expand Up @@ -183,16 +190,18 @@ class PipelineDetails extends Page<{}, PipelineDetailsState> {
</div>}
</div>
</SidePanel>
<div className={css.footer}>
{!summaryShown && (
<Button onClick={() => this.setState({ summaryShown: !summaryShown })} color='secondary'>
Show summary
</Button>
)}
<div className={classes(commonCss.flex, summaryShown && css.footerInfoOffset)}>
<InfoIcon style={{ color: color.lowContrast, height: 16, width: 16 }} />
<span className={css.infoSpan}>Static pipeline graph</span>
</div>
</div>
</div>}
<div className={css.footer}>
{!summaryShown && (
<Button onClick={() => this.setState({ summaryShown: !summaryShown })} color='secondary'>
Show summary
</Button>
)}
<InfoIcon style={{ color: color.lowContrast, height: 24, width: 13 }} />
<span className={css.infoSpan}>Static pipeline graph</span>
</div>
{!this.state.graph && <span style={{ margin: '40px auto' }}>No graph to show</span>}
</div>}
{selectedTab === 1 &&
Expand Down