diff --git a/Composer/packages/client/.gitignore b/Composer/packages/client/.gitignore new file mode 100644 index 0000000000..567609b123 --- /dev/null +++ b/Composer/packages/client/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/Composer/packages/client/src/components/NavItem/styles.ts b/Composer/packages/client/src/components/NavItem/styles.ts index f5fa2d02ea..dea80eab7c 100644 --- a/Composer/packages/client/src/components/NavItem/styles.ts +++ b/Composer/packages/client/src/components/NavItem/styles.ts @@ -24,7 +24,7 @@ export const link = (active, disabled) => css` } &:hover { - background-color: ${active ? NeutralColors.gray40 : NeutralColors.gray30}; + background-color: ${NeutralColors.gray50}; } &:focus { @@ -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}; diff --git a/Composer/packages/client/src/components/ProjectTree/styles.ts b/Composer/packages/client/src/components/ProjectTree/styles.ts index f5854734b8..afb5647bd4 100644 --- a/Composer/packages/client/src/components/ProjectTree/styles.ts +++ b/Composer/packages/client/src/components/ProjectTree/styles.ts @@ -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'}; @@ -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 { diff --git a/Composer/packages/client/src/styles.ts b/Composer/packages/client/src/styles.ts index d6dfd937fd..582ce18e19 100644 --- a/Composer/packages/client/src/styles.ts +++ b/Composer/packages/client/src/styles.ts @@ -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; @@ -43,7 +44,7 @@ export const globalNav = css` font-size: ${FontSizes.size16}; color: #106ebe; &:hover { - background: ${NeutralColors.gray40}; + background: ${NeutralColors.gray50}; } `; diff --git a/Composer/packages/lib/indexers/__tests__/dialogUtils/dialogChecker.test.ts b/Composer/packages/lib/indexers/__tests__/dialogUtils/dialogChecker.test.ts new file mode 100644 index 0000000000..89fb34f690 --- /dev/null +++ b/Composer/packages/lib/indexers/__tests__/dialogUtils/dialogChecker.test.ts @@ -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'); + }); +}); diff --git a/Composer/packages/lib/indexers/src/dialogUtils/dialogChecker.ts b/Composer/packages/lib/indexers/src/dialogUtils/dialogChecker.ts index bc4c2983e2..518fabb749 100644 --- a/Composer/packages/lib/indexers/src/dialogUtils/dialogChecker.ts +++ b/Composer/packages/lib/indexers/src/dialogUtils/dialogChecker.ts @@ -3,6 +3,7 @@ import get from 'lodash/get'; import { FieldNames } from '@bfc/shared'; +import values from 'lodash/values'; import { Diagnostic } from '../diagnostic'; @@ -10,14 +11,19 @@ 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]}`; }; diff --git a/Composer/packages/lib/shared/src/appschema.ts b/Composer/packages/lib/shared/src/appschema.ts index 5d213744c1..711f1045dc 100644 --- a/Composer/packages/lib/shared/src/appschema.ts +++ b/Composer/packages/lib/shared/src/appschema.ts @@ -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',