-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: FlowEditor edges not shown in Electron container (#2638)
* give SVGContainer dynamic size * + FlowEdges * bypass breadcrumb CI Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
- Loading branch information
Showing
10 changed files
with
45 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Composer/packages/extensions/visual-designer/src/components/lib/FlowEdges.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import React, { FC } from 'react'; | ||
|
||
import { Edge } from '../../models/EdgeData'; | ||
|
||
import { renderEdge } from './EdgeUtil'; | ||
|
||
export interface FlowEdgesProps { | ||
edges: Edge[]; | ||
} | ||
|
||
export const FlowEdges: FC<FlowEdgesProps> = ({ edges }) => { | ||
if (!Array.isArray(edges)) return null; | ||
return <>{edges.map(edge => renderEdge(edge))}</>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
Composer/packages/extensions/visual-designer/src/components/lib/SVGContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import React from 'react'; | ||
/** @jsx jsx */ | ||
import { jsx } from '@emotion/core'; | ||
|
||
export const SVGContainer = ({ children, hidden = false }) => ( | ||
<svg width="100" height="100" overflow="visible" aria-hidden={hidden}> | ||
export const SVGContainer = ({ children, width = 100, height = 100, hidden = false }) => ( | ||
<svg css={{ overflow: 'visible', width, height, position: 'absolute', left: 0, top: 0 }} aria-hidden={hidden}> | ||
{children} | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters