Skip to content

Commit

Permalink
Merge branch 'master' into visual/dynamic-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
yeze322 authored Feb 20, 2020
2 parents 988e3b5 + 3a9b11b commit fefd425
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 15 deletions.
1 change: 1 addition & 0 deletions Composer/packages/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
4 changes: 2 additions & 2 deletions Composer/packages/client/src/components/NavItem/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const link = (active, disabled) => css`
}
&:hover {
background-color: ${active ? NeutralColors.gray40 : NeutralColors.gray30};
background-color: ${NeutralColors.gray50};
}
&:focus {
Expand All @@ -40,7 +40,7 @@ export const link = (active, disabled) => css`
}
${active &&
`background-color: ${NeutralColors.gray40};
`background-color: ${NeutralColors.white};
&::after {
border-left: 3px solid ${CommunicationColors.primary};
Expand Down
7 changes: 5 additions & 2 deletions Composer/packages/client/src/components/ProjectTree/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ export const searchBox = {
height: '45px',
},
};

export const root = css`
width: 180px;
border-right: 1px solid #c4c4c4;
box-sizing: border-box;
overflow-y: auto;
.ms-List-cell {
min-height: 36px;
}
`;

export const navItem = (isActive: boolean, isSubItemActive: boolean) => css`
width: 100%;
position: relative;
height: 36px;
font-size: 12px;
color: #545454;
background: ${isActive && !isSubItemActive ? '#f2f2f2' : 'transparent'};
Expand Down Expand Up @@ -95,7 +98,7 @@ export const overflowSet = css`
height: 100%;
padding-left: 12px;
box-sizing: border-box;
line-height: 40px;
line-height: 36px;
justify-content: space-between;
& : hover {
.dialog-more-btn {
Expand Down
3 changes: 2 additions & 1 deletion Composer/packages/client/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const sideBar = isExpand => css`
width: ${isExpand ? '220' : '48'}px;
background-color: ${NeutralColors.gray20};
height: 100%;
border-right: 1px solid ${NeutralColors.gray50};
transition: width 0.3s ease-in-out;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -43,7 +44,7 @@ export const globalNav = css`
font-size: ${FontSizes.size16};
color: #106ebe;
&:hover {
background: ${NeutralColors.gray40};
background: ${NeutralColors.gray50};
}
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { createPath } from './../../src/dialogUtils/dialogChecker';

describe('create right diagnostic path', () => {
it('should check if the diagnostics have errors', () => {
expect(createPath('Main.triggers[7].actions[0].cases[1].actions[0].condition', 'type')).toBe(
'Main.triggers[7].actions[0].cases[1].actions[0]#type#condition'
);
expect(createPath('Main.triggers[7].actions[0].condition', 'type')).toBe(
'Main.triggers[7].actions[0]#type#condition'
);
expect(createPath('Main.triggers[7].condition', 'type')).toBe('Main.triggers[7]#type#condition');
expect(createPath('Main.triggers[7].actions[0].elseActions[0].condition', 'type')).toBe(
'Main.triggers[7].actions[0].elseActions[0]#type#condition'
);
expect(createPath('Main.triggers[7].actions[0]', 'type')).toBe('Main.triggers[7].actions[0]#type');
});
});
14 changes: 10 additions & 4 deletions Composer/packages/lib/indexers/src/dialogUtils/dialogChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@

import get from 'lodash/get';
import { FieldNames } from '@bfc/shared';
import values from 'lodash/values';

import { Diagnostic } from '../diagnostic';

import { ExpressionType } from './validation';
import { CheckerFunc } from './types';
import { validate } from './validation';

const createPath = (path: string, type: string): string => {
const steps = [FieldNames.Events, FieldNames.Actions, FieldNames.ElseActions];
export const createPath = (path: string, type: string): string => {
let list = path.split('.');
const matches = list.filter(x => !steps.every(step => !x.startsWith(step)));
const matches = list.filter(x => {
if (/\[|\]/.test(x)) {
const reg = /\[.*\]/;
x = x.replace(reg, '');
return ~values(FieldNames).indexOf(x);
}
});

const focused = matches.join('.');
list = path.split(`${focused}.`);
if (list.length !== 2) return path;
if (list.length !== 2) return `${path}#${type}`;

return `${list[0]}${focused}#${type}#${list[1]}`;
};
Expand Down
13 changes: 7 additions & 6 deletions Composer/packages/lib/shared/src/appschema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,13 @@ export const appschema: OBISchema = {
description: 'One or more options that are passed to the dialog that is called.',
additionalProperties: true,
},
includeActivity: {
type: 'boolean',
title: 'Include Activity',
description: 'When set to true, dialog that is called can process the current activity.',
default: false,
examples: [false],
activityProcessed: {
$role: 'expression',
type: 'string',
title: 'Activity Processed',
description: 'When set to false, the dialog that is called can process the current activity.',
default: 'true',
examples: ['true'],
},
resultProperty: {
$role: 'expression',
Expand Down

0 comments on commit fefd425

Please sign in to comment.