Skip to content

Commit

Permalink
chore: merge from master (#3616)
Browse files Browse the repository at this point in the history
* fix: add logo-clicking to tests (#3500)

* add logo-clicking to tests

* bump elliptic version

* Update yarn.lock

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* feat: support validate lg custom functions (#3273)

* fix: support validate lg custom functions and separate the dialog validation from parser

* use file name as namespace

* add unit test

* fix lint

* fix: inline editing LU mess up whole file (#3478)

* upgrade lu packages

* update package

* clean

* update

* clean up

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* refactor: change term primary key to authoring key (#3516)

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* fix: replace the endpoint to authoringEndpoint when publishing luis (#3517)

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* propagate code editor settings to all editor surfaces (#3520)

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* run coverage on all source files (#3522)

without this config, jest would only collect coverage on files that were imported in a test

* feat: add loading indicator when waiting on form data or schema to load (#3523)

* move AdaptiveForm components out of sub directory

* show loading spinner while waiting for form data and schema

Co-authored-by: Ben Yackley <61990921+beyackle@users.noreply.github.com>

* feat: allow inputting path (#3302)

* allow input path

* handle corner case

* lint fix

* fix the flicker issue

* update UX and create or update folder operation

* refine code structure

* remove commented code

* fix unit test

* use esc to cancel operation

* handle comments

* handle comments

* add test case

* fix test case

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* chore: Index file renames part 1 (#3519)

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Renamed components, hooks, Onboarding only

* Renamed components, hooks, Onboarding only

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Fixing imports

* test: increase 'adaptive-flow' test coverage to 77% (#3530)

* + UT: adaptive-flow-renderer/widgets

* + UT: adaptive-flow-editor/utils

* remove unref hook: useWindowDimension

* + UT: KeyboardZone

* + UT: cursorTracker

* + UT: adaptive-flow-editor/constants

* +UT: AdaptiveFlowEditor

* + UT: adaptive-flow-editor/contexts

* + UT: useEditorEventApi

* fix CI error

* + UT: NodeWrapper

* + UT: EdgeMenu

* KeyboardZone behavioror test

* change the test file structure of cursorTracker

* update a test case (#3531)

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* fix lgWorker test failure (#3529)

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* chore: adds webpack bundle analyzer (#3542)

* issues#3309

* fixes lints

* Default to bot settings if no route cache

* fix: #3485

* fix: #3486 Debug/Fix HMR support

* webpack bundle analyzer

Co-authored-by: Soroush <sorgh@microsoft.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: Andy Brown <asbrown002@gmail.com>

* refactor: split some actions off setSettings (#3525)

* split some actions off setSettings

* add more actions - eject still not working

* fix arguments in eject

* split some actions off setSettings

* add more actions - eject still not working

* fix arguments in eject

* Update setting.ts

* fix some tests

* Update index.ts

* move logo-clicking to commands.ts

* Update commands.ts

* fix: Dialog validate throw error when delete an action (#3537)

* fix: Dialog validate throw error when delete an action

* use optional chaining and more explicit length check

* fix lint

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: Andy Brown <asbrown002@gmail.com>

* fix: composer will crashed when add a new publish profile (#3550)

* replace function callbacks with arrows (#3545)

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* fix: location initialization (#3549)

* fix bug

* fix e2e test

* fix bug

* chore: Index file renames part 2 (#3546)

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Renamed components, hooks, Onboarding only

* Renamed components, hooks, Onboarding only

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Fixing imports

* Index file renames Part 2

* fix: deploy issue while zipping the folder (#3557)

* move bot-deploy to plugins

* fix profile edit and save not saving to settings

* add dependency to electron-server

* update settings file clicking customized runtime toggle

Co-authored-by: Wenyi Luo <wenyluo@microsoft.com>
Co-authored-by: Dong Lei <donglei@microsoft.com>

* docs: archive old docs (#3572)

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* chore(deps-dev): bump electron from 8.0.2 to 8.2.4 in /Composer (#3577)

Bumps [electron](https://github.com/electron/electron) from 8.0.2 to 8.2.4.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](electron/electron@v8.0.2...v8.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Anziano <toanzian@microsoft.com>

* Bumped electron-builder config to correct electron version. (#3584)

* doc: add some missing details to plugin readme (#3585)

* handle schema parsing error better (#3586)

* fix nodemon `--inspect` error in lgWorker (#3590)

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* feat: Disable / Enable actions (#3416)

* impl disable/enable editor API

* disable / enable e2e

* propagate the 'disabled' property

* take css out of CardTemplate

* take css out of ActionHeader

* connect to the 'disabled' property in data

* CSS: disbaled effect

* update icon of Disabled/Enabled

* rename inheritParentProperty

* shallow copy json in IndexedNode to support immutable

* rename files with  '.style' suffix

* apply disable effect to PromptWidget

* only disable nodes when disabled === true

* contextual Disable/Enable btn state

* move disable/enable button into toolbar

* avoid undefined array in UT

* release: 1.0.2 (#3595)

* Change versions

* Adds 1.0.2.md

* update uncategorized commits

Co-authored-by: Andy Brown <asbrown002@gmail.com>

* chore: Moved styles inline for components in client package. (#3598)

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Renamed components, hooks, Onboarding only

* Reverting changed from yar build

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Renamed components, hooks, Onboarding only

* Renamed components, hooks, Onboarding only

* Fixing lint issues

* test import fixes

* Have to rename to fix case of file name

* Fixing case with another commit.

* Fixing imports

* Index file renames Part 2

* Inlined styles in ts

* Fixed test mocks

* feat: grouping Toolbar buttons under the 'Edit' dropdown button (#3608)

* let ToolBar support 'dropdown' type

* move 'design' page only toolbar items into DesignPage

* migrate 'Add New Trigger' coachmark feature

* grouping 'Edit' buttons together as a dropdown

* loosen 'type' TS type in toolbar

* fix: Syntax error when creating a "Send a response" node (#3604)

* refine diagnostics

* fix lg parse line number range

* update inline diagnostic

* update test

* resue websocket connection

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>

* Merge from master with fixes

Co-authored-by: Ben Yackley <61990921+beyackle@users.noreply.github.com>
Co-authored-by: Andy Brown <asbrown002@gmail.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: Zhixiang Zhan <zhixzhan@microsoft.com>
Co-authored-by: liweitian <liweitian93@outlook.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Co-authored-by: zeye <2295905420@qq.com>
Co-authored-by: Soroush <hatpick@gmail.com>
Co-authored-by: Soroush <sorgh@microsoft.com>
Co-authored-by: Wenyi Luo <wenyluo@microsoft.com>
Co-authored-by: Dong Lei <donglei@microsoft.com>
Co-authored-by: Yan Liu <32497439+zxyanliu@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Anziano <toanzian@microsoft.com>
Co-authored-by: Ben Brown <benbro@microsoft.com>
  • Loading branch information
16 people authored Jul 10, 2020
1 parent caf8260 commit f0020d1
Show file tree
Hide file tree
Showing 430 changed files with 3,101 additions and 6,339 deletions.
6 changes: 1 addition & 5 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@
"build:server": "yarn workspace @bfc/server build",
"build:client": "yarn workspace @bfc/client build",
"build:tools": "yarn workspace @bfc/tools build:all",
"build:plugins": "yarn build:plugins:localpublish && yarn build:plugins:samples && yarn build:plugins:azurePublish && yarn build:plugins:azureFunctionsPublish",
"build:plugins:localpublish": "cd plugins/localPublish && yarn install && yarn build",
"build:plugins:samples": "cd plugins/samples && yarn install && yarn build",
"build:plugins:azurePublish": "cd plugins/azurePublish && yarn install && yarn build",
"build:plugins:azureFunctionsPublish": "cd plugins/azureFunctionsPublish && yarn install && yarn build",
"build:plugins": "cd plugins && yarn install && yarn build:all",
"start": "cross-env NODE_ENV=production PORT=3000 yarn start:server",
"startall": "yarn start",
"start:dev": "concurrently \"npm:start:client\" \"npm:start:server:dev\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { fireEvent } from '@bfc/test-utils';

import { renderWithStore } from '../../../testUtils';
import { CreateOptions } from '../../../../src/components/CreationFlow/CreateOptions/CreateOptions';
import { CreateOptions } from '../../../../src/components/CreationFlow/CreateOptions';

describe('<CreateOptions/>', () => {
const handleDismissMock = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { fireEvent } from '@bfc/test-utils';

import { renderWithStore } from '../../../testUtils';
import { StorageFolder } from '../../../../src/store/types';
import DefineConversation from '../../../../src/components/CreationFlow/DefineConversation/DefineConversation';
import DefineConversation from '../../../../src/components/CreationFlow/DefineConversation';

describe('<DefineConversation/>', () => {
const onCurrentPathUpdateMock = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { render, fireEvent } from '@bfc/test-utils';

import { StorageFolder } from '../../../../src/store/types';
import { FileSelector } from '../../../../src/components/CreationFlow/LocationBrowser/FileSelector';
import { FileSelector } from '../../../../src/components/CreationFlow/FileSelector';

describe('<FileSelector/>', () => {
const onFileChosen = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { fireEvent } from '@bfc/test-utils';

import { StorageFolder } from '../../../../src/store/types';
import { LocationSelectContent } from '../../../../src/components/CreationFlow/LocationBrowser/LocationSelectContent';
import { LocationSelectContent } from '../../../../src/components/CreationFlow/LocationSelectContent';
import { renderWithStore } from '../../../testUtils';
import { CreationFlowStatus } from '../../../../src/constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@ import { createHistory, createMemorySource, LocationProvider } from '@reach/rout

import { StoreContext } from '../../../src/store';
import CreationFlow from '../../../src/components/CreationFlow/CreationFlow';
import { DialogWrapper } from '../../../src/components/DialogWrapper';
import { CreationFlowStatus } from '../../../src/constants';

jest.mock('../../../src/components/DialogWrapper/DialogWrapper', () => {
return {
DialogWrapper: jest.fn((props) => {
return props.children;
}),
};
});
jest.mock('../../../src/components/DialogWrapper');

describe('<CreationFlow/>', () => {
let storeContext, saveTemplateMock, locationMock, createProjectMock;
Expand All @@ -36,6 +31,10 @@ describe('<CreationFlow/>', () => {
}

beforeEach(() => {
(DialogWrapper as jest.Mock).mockImplementation((props) => {
return props.children;
});

saveTemplateMock = jest.fn();
locationMock = {};
storeContext = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import React from 'react';
import { render } from '@bfc/test-utils';

import { DialogWrapper } from '../../../src/components/DialogWrapper/DialogWrapper';
import { DialogTypes } from '../../../src/components/DialogWrapper/styles';
import { DialogWrapper, DialogTypes } from '../../../src/components/DialogWrapper';

describe('<DialogWrapper />', () => {
const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import React from 'react';

import { AppUpdater } from '../../src/components/AppUpdater/AppUpdater';
import { AppUpdater } from '../../src/components/AppUpdater';
import { AppUpdaterStatus } from '../../src/constants';
import { renderWithStore } from '../testUtils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import { render } from '@bfc/test-utils';

import '../../src/components/Conversation/Conversation';
import '../../src/components/Conversation';

describe('<Conversation/>', () => {
it('should render the conversation', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import { render } from '@bfc/test-utils';

import { ErrorBoundary } from '../../src/components/ErrorBoundary/ErrorBoundary';
import { ErrorBoundary } from '../../src/components/ErrorBoundary';

const Store = React.createContext({
actions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import { render } from '@bfc/test-utils';

import { Header } from '../../src/components/Header/Header';
import { Header } from '../../src/components/Header';

describe('<Header />', () => {
it('should render the header', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { fireEvent, render } from '@bfc/test-utils';

import { RecentBotList } from '../../src/pages/home/RecentBotList';
import { ExampleList } from '../../src/pages/home/ExampleList';
import { ToolBar } from '../../src/components/ToolBar/ToolBar';
import { ToolBar } from '../../src/components/ToolBar';
describe('<Home/>', () => {
it('should dispatch onSelectionChanged event when clicked on a link on <RecentBotList>', () => {
const recentProjects = [
Expand Down
10 changes: 6 additions & 4 deletions Composer/packages/client/__tests__/components/skill.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import * as React from 'react';
import { render, fireEvent, getByLabelText, getByTestId } from '@bfc/test-utils';
import { Skill } from '@bfc/shared';

import httpClient from '../../src//utils/httpUtil';
import Skills from '../../src/pages/skills';
import SkillList from '../../src/pages/skills/skill-list';
import CreateSkillModal from '../../src/components/SkillForm/CreateSkillModal/CreateSkillModal';
import CreateSkillModal from '../../src/components/CreateSkillModal';
import { renderWithStore } from '../testUtils';

jest.mock('../../src/components/SkillForm/CreateSkillModal/validateManifestUrl', () => ({
validateManifestUrl: () => {},
}));
jest.mock('../../src//utils/httpUtil');

const items: Skill[] = [
{
Expand Down Expand Up @@ -81,6 +80,9 @@ describe('<SkillForm />', () => {
const onSubmit = jest.fn((formData) => {
expect(formData.manifestUrl).toBe('http://AwesomeSkill');
});

(httpClient.post as jest.Mock).mockResolvedValue(undefined);

const onDismiss = jest.fn(() => {});
const { getByLabelText, getByText } = render(
<CreateSkillModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import { fireEvent, render } from '@bfc/test-utils';

import { ToolBar } from '../../src/components/ToolBar/ToolBar';
import { ToolBar } from '../../src/components/ToolBar';

const toolbarItems = (onClick) => [
{
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/__tests__/navItem.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as React from 'react';
import { render } from '@bfc/test-utils';

import { NavItem } from '../src/components/NavItem/NavItem';
import { NavItem } from '../src/components/NavItem';
import { StoreProvider } from '../src/store';

describe('<Header />', () => {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/__tests__/notFound.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as React from 'react';
import { render } from '@bfc/test-utils';

import { BASEPATH } from '../src/constants';
import { NotFound } from '../src/components/NotFound/NotFound';
import { NotFound } from '../src/components/NotFound';

describe('<NotFound />', () => {
it('should render a not found page', async () => {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function getClientEnvironment(publicUrl) {
PUBLIC_URL: publicUrl,
GIT_SHA: getGitSha().toString().replace('\n', ''),
SDK_PACKAGE_VERSION: '4.9.3', // TODO: change this when Composer supports custom schema/custom runtime
COMPOSER_VERSION: '1.0.1',
COMPOSER_VERSION: '1.0.2',
LOCAL_PUBLISH_PATH:
process.env.LOCAL_PUBLISH_PATH || path.resolve(process.cwd(), '../../plugins/localPublish/hostedBots'),
}
Expand Down
10 changes: 5 additions & 5 deletions Composer/packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { FocusZone } from 'office-ui-fabric-react/lib/FocusZone';
import { TooltipHost, DirectionalHint } from 'office-ui-fabric-react/lib/Tooltip';
import formatMessage from 'format-message';

import { Header } from './components/Header/Header';
import { NavItem } from './components/NavItem/NavItem';
import { Header } from './components/Header';
import { NavItem } from './components/NavItem';
import { BASEPATH } from './constants';
import Routes from './router';
import { StoreContext } from './store';
import { main, sideBar, content, divider, globalNav, leftNavBottom, rightPanel, dividerTop } from './styles';
import { resolveToBasePath } from './utils/fileUtil';
import { ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary';
import { RequireAuth } from './components/RequireAuth/RequireAuth';
import { ErrorBoundary } from './components/ErrorBoundary';
import { RequireAuth } from './components/RequireAuth';
import onboardingState from './utils/onboardingStorage';
import { isElectron } from './utils/electronUtil';
import { useLinks } from './utils/hooks';
Expand All @@ -27,7 +27,7 @@ initializeIcons(undefined, { disableWarnings: true });

const Onboarding = React.lazy(() => import('./Onboarding/Onboarding'));
const AppUpdater = React.lazy(() =>
import('./components/AppUpdater/AppUpdater').then((module) => ({ default: module.AppUpdater }))
import('./components/AppUpdater').then((module) => ({ default: module.AppUpdater }))
);

// eslint-disable-next-line react/display-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,57 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx, css } from '@emotion/core';
import React, { useContext, useEffect, useMemo, useState, useCallback } from 'react';
import { Dialog, DialogFooter, DialogType } from 'office-ui-fabric-react/lib/Dialog';
import { DefaultButton, PrimaryButton } from 'office-ui-fabric-react/lib/Button';
import { DefaultButton, PrimaryButton, IButtonStyles } from 'office-ui-fabric-react/lib/Button';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { ProgressIndicator } from 'office-ui-fabric-react/lib/ProgressIndicator';
import { ChoiceGroup } from 'office-ui-fabric-react/lib/ChoiceGroup';
import formatMessage from 'format-message';
import { IDialogContentStyles, IDialogFooterStyles } from 'office-ui-fabric-react/lib/Dialog';
import { NeutralColors, SharedColors } from '@uifabric/fluent-theme';

import { AppUpdaterStatus } from '../constants';
import { StoreContext } from '../store';

// -------------------- Styles -------------------- //

const optionIcon = (checked) => css`
vertical-align: text-bottom;
font-size: 18px;
margin-right: 10px;
color: ${checked ? SharedColors.cyanBlue10 : NeutralColors.black};
`;

const optionRoot = css`
width: 100%;
height: 100%;
`;

const dialogCopy = css`
margin: 0px;
color: #000;
`;

const dialogContent: Partial<IDialogContentStyles> = {
subText: { color: NeutralColors.black },
header: { paddingBottom: '6px' },
};

import { StoreContext } from '../../store';
import { AppUpdaterStatus } from '../../constants';
const dialogFooter: Partial<IDialogFooterStyles> = {
actions: {
marginTop: '46px',
},
};

import { dialogContent, dialogCopy, dialogFooter, optionRoot, optionIcon, updateAvailableDismissBtn } from './styles';
const updateAvailableDismissBtn: Partial<IButtonStyles> = {
root: {
marginRight: '6px;',
},
};

// -------------------- Helpers -------------------- //

const { ipcRenderer } = window;

Expand All @@ -33,6 +71,8 @@ const downloadOptions = {
installAndUpdate: 'installAndUpdate',
};

// -------------------- AppUpdater -------------------- //

export const AppUpdater: React.FC<{}> = () => {
const {
actions: { setAppUpdateError, setAppUpdateProgress, setAppUpdateShowing, setAppUpdateStatus },
Expand Down
41 changes: 0 additions & 41 deletions Composer/packages/client/src/components/AppUpdater/styles.ts

This file was deleted.

33 changes: 33 additions & 0 deletions Composer/packages/client/src/components/Conversation.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';

// -------------------- Styles -------------------- //

const container = css`
width: 100%;
background-color: #ffffff;
height: 100%;
overflow: auto;
position: relative;
`;

const top = css`
width: 100%;
height: 10px;
background-color: #efeaf5;
`;

// -------------------- Conversation -------------------- //

const Conversation = (props) => {
return (
<div css={container} {...props}>
{props.children}
</div>
);
};

export { Conversation };

This file was deleted.

Loading

0 comments on commit f0020d1

Please sign in to comment.