Skip to content

Commit

Permalink
Merge branch 'master' into cwhitten/fix-activityprocessed
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhitten committed Mar 6, 2020
2 parents 0036336 + c17b59e commit 793361c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
7 changes: 2 additions & 5 deletions Composer/cypress/integration/LUPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ context('LU Page', () => {
cy.contains('ToDoBotWithLuisSample.Main');
cy.contains('All');

cy.get('.toggleEditMode button').as('switchButton');

// all multiple file, edit mode button is disabled.
cy.get('@switchButton').should('be.disabled');
cy.get('.toggleEditMode button').should('not.exist');

// by default is table view
cy.findByTestId('LUEditor')
Expand All @@ -28,7 +25,7 @@ context('LU Page', () => {
cy.findByTestId('LUEditor').within(() => {
cy.findByText('__TestToDoBotWithLuisSample.Main').click();
});

cy.get('.toggleEditMode button').as('switchButton');
// goto edit-mode
cy.get('@switchButton').click();
cy.findByTestId('LUEditor')
Expand Down
21 changes: 11 additions & 10 deletions Composer/packages/client/src/pages/language-understanding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,17 @@ const LUPage: React.FC<LUPageProps> = props => {
<div css={ContentHeaderStyle}>
<div css={HeaderText}>{formatMessage('User Input')}</div>
<div css={flexContent}>
<Toggle
className={'toggleEditMode'}
css={actionButton}
onText={formatMessage('Edit mode')}
offText={formatMessage('Edit mode')}
defaultChecked={false}
checked={!!edit}
disabled={isRoot && edit === false}
onChange={onToggleEditMode}
/>
{(!isRoot || edit) && (
<Toggle
className={'toggleEditMode'}
css={actionButton}
onText={formatMessage('Edit mode')}
offText={formatMessage('Edit mode')}
defaultChecked={false}
checked={!!edit}
onChange={onToggleEditMode}
/>
)}
</div>
</div>
<div css={ContentStyle} data-testid="LUEditor">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ export const drawSVGEdge = (
const [p1, p2] = calculateArrowPoints(endPoint, direction);
const points = [p1, endPoint, p2].map(p => `${p.x},${p.y}`).join(' ');
const arrow = (
<polyline key={`edge-${id}__arrow`} points={points} {...strokeProps} fill="none" strokeDasharray="none" />
<polyline
key={`edge-${id}__arrow`}
name={id}
points={points}
{...strokeProps}
fill="none"
strokeDasharray="none"
/>
);
elements.push(arrow);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const declareElementAttributes = (id: string) => {
[AttrNames.SelectedId]: `${id}${MenuTypes.NodeMenu}`,
};
};
export const NodeMenu = ({ id, onEvent }): JSX.Element => {
export const NodeMenu = ({ id, onEvent }) => {
const menuItems = [
{
key: 'delete',
Expand All @@ -35,6 +35,7 @@ export const NodeMenu = ({ id, onEvent }): JSX.Element => {

return (
<div
data-name="nodeMenu"
css={{
marginRight: '1px',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const StepEditor = ({ id, data, onEvent, trigger, addCoachMarkRef }): JSX
{ directed: true }
)}
<circle
name="editor__end"
r={TerminatorSize.height / 2 - 1}
cx={editorAxisX}
cy={contentBoundary.height + HeadSize.height + ElementInterval.y / 2 + TerminatorSize.height / 2}
Expand Down

0 comments on commit 793361c

Please sign in to comment.