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: cannot select nested actions in Visual Editor #2672

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Composer/cypress/integration/Breadcrumb.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ context('breadcrumb', () => {
// Click on an action
cy.withinEditor('VisualEditor', () => {
cy.findByTestId('RuleEditor').within(() => {
cy.findByText('Send a response').click({ force: true });
cy.findByText('Send a response').click();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export const ForeachWidget: FunctionComponent<ForeachWidgetProps> = ({ id, data,
const { foreachNode, loopActionsNode, loopBeginNode, loopEndNode } = nodeMap;
return (
<div css={{ width: boundary.width, height: boundary.height, position: 'relative' }}>
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
<OffsetContainer offset={foreachNode.offset}>
<ElementWrapper id={id} onEvent={onEvent}>
<ElementMeasurer
Expand Down Expand Up @@ -97,9 +100,6 @@ export const ForeachWidget: FunctionComponent<ForeachWidgetProps> = ({ id, data,
<LoopIndicator onClick={() => onEvent(NodeEventTypes.Focus, { id })} />
</OffsetContainer>
))}
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export const IfConditionWidget: FunctionComponent<IfConditionWidgetProps> = ({

return (
<div css={{ width: boundary.width, height: boundary.height, position: 'relative' }}>
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
<OffsetContainer offset={conditionNode.offset}>
<ElementWrapper id={conditionNode.id} onEvent={onEvent}>
<ElementMeasurer
Expand Down Expand Up @@ -105,9 +108,6 @@ export const IfConditionWidget: FunctionComponent<IfConditionWidgetProps> = ({
</OffsetContainer>
);
})}
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export const PromptWidget: FC<PromptWdigetProps> = ({

return (
<div className="Action-BaseInput" css={{ width: boundary.width, height: boundary.height, position: 'relative' }}>
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
<OffsetContainer offset={botAsksNode.offset}>
<ElementWrapper id={botAsksNode.id} tab={PromptTab.BOT_ASKS} onEvent={onEvent}>
<ElementMeasurer
Expand Down Expand Up @@ -91,9 +94,6 @@ export const PromptWidget: FC<PromptWdigetProps> = ({
<IconBrick onClick={() => onEvent(NodeEventTypes.Focus, { id, tab: PromptTab.OTHER })} />
</ElementWrapper>
</OffsetContainer>
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export const SwitchConditionWidget: FunctionComponent<SwitchConditionWidgetProps

return (
<div css={{ width: boundary.width, height: boundary.height, position: 'relative' }}>
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
<OffsetContainer offset={switchNode.offset}>
<ElementWrapper id={switchNode.id} onEvent={onEvent}>
<ElementMeasurer
Expand Down Expand Up @@ -114,9 +117,6 @@ export const SwitchConditionWidget: FunctionComponent<SwitchConditionWidgetProps
/>
</OffsetContainer>
))}
<SVGContainer width={boundary.width} height={boundary.height}>
<FlowEdges edges={edges} />
</SVGContainer>
</div>
);
};
Expand Down