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

fix: polish workflow details page #215

Merged
merged 4 commits into from
Sep 24, 2021
Merged
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
Added fix for providing React flow flex dimensions
Signed-off-by: Jason Porter <[email protected]>
jsonporter committed Sep 24, 2021
commit e9f283cec71b41bbe566ce946b343d8bf8fb086c
11 changes: 6 additions & 5 deletions src/components/Workflow/StaticGraphContainer.tsx
Original file line number Diff line number Diff line change
@@ -42,11 +42,12 @@ export interface StaticGraphContainerProps {
export const StaticGraphContainer: React.FC<StaticGraphContainerProps> = ({
workflowId
}) => {
const containerStyle = {
width: '100%',
height: '30%',
maxHeight: '400px',
minHeight: '220px'
const containerStyle: React.CSSProperties = {
display: 'flex',
flexDirection: 'column',
flex: `1 1 100%`,
minHeight: 300,
padding: '1rem 0'
};
const workflowQuery = useQuery<Workflow, Error>(
makeWorkflowQuery(useQueryClient(), workflowId)
13 changes: 11 additions & 2 deletions src/components/flytegraph/ReactFlow/ReactFlowGraphComponent.tsx
Original file line number Diff line number Diff line change
@@ -25,11 +25,20 @@ const ReactFlowGraphComponent = props => {
rfGraphJson: rfGraphJson,
type: RFGraphTypes.main
};

const containerStyle: React.CSSProperties = {
display: 'flex',
flex: `1 1 100%`,
flexDirection: 'column',
minHeight: '100px',
minWidth: '200px'
};

return (
<>
<div style={containerStyle}>
<Legend />
<ReactFlowWrapper {...ReactFlowProps} />
</>
</div>
);
};

4 changes: 3 additions & 1 deletion src/components/flytegraph/ReactFlow/ReactFlowWrapper.tsx
Original file line number Diff line number Diff line change
@@ -134,7 +134,9 @@ export const ReactFlowWrapper: React.FC<RFWrapperProps> = ({
* React Flow's min height to make it render
*/
const reactFlowStyle: React.CSSProperties = {
minHeight: 220
display: 'flex',
flex: `1 1 100%`,
flexDirection: 'column'
};

return (