Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8d4a9f6
Adding va core template plug in with corresponding plugin build steps
pavolumMsft Sep 15, 2020
bd78386
Adding env variable feature flag around VA=Core template
pavolumMsft Sep 15, 2020
e46cb29
removing unused code that was initially added for custom runtime whic…
pavolumMsft Sep 15, 2020
dc389e5
Merge branch 'main' into pavolum/va-template
pavolumMsft Sep 15, 2020
c8247bc
Added creation UI workspace which is linked to and referenced from cl…
pavolumMsft Sep 16, 2020
1a61ef4
Minor styling changes
pavolumMsft Sep 17, 2020
6a7da65
Cleaning up code for review:
pavolumMsft Sep 17, 2020
ce38062
Merge branch 'main' into pavolum/va-template
pavolumMsft Sep 17, 2020
2df9855
Merging latest
pavolumMsft Sep 17, 2020
f1678c7
Cleaning up unused changes
pavolumMsft Sep 17, 2020
0f02f8c
removing bot type tile
pavolumMsft Sep 18, 2020
271ed3f
removing bot type tile
pavolumMsft Sep 18, 2020
c488301
Making requested PR changes, general clean up, conversion of interfac…
pavolumMsft Sep 22, 2020
51df024
Converting props types to intersaction with reach router, adding awai…
pavolumMsft Sep 23, 2020
e9c39bf
Fixing files to follow repoo linting rules
pavolumMsft Oct 1, 2020
4643735
Changed post creation logic to execute on useEffect as opposed to rel…
pavolumMsft Oct 1, 2020
6fabb60
resolve reentry bug
pavolumMsft Oct 1, 2020
d4d46e8
removing unused function
pavolumMsft Oct 1, 2020
3e65229
Fixing linting errors
pavolumMsft Oct 1, 2020
884032b
resolve reentry bug
pavolumMsft Oct 1, 2020
ff4de94
Merge branch 'main' into pavolum/va-template
pavolumMsft Oct 6, 2020
e4312bd
Pulling latest from main
pavolumMsft Oct 6, 2020
8774906
Fixing reference
pavolumMsft Oct 7, 2020
f51e8ed
Updating react version in creation extension
pavolumMsft Oct 7, 2020
9a50176
Updating react version in creation extension
pavolumMsft Oct 7, 2020
c348192
Making PR changes
pavolumMsft Oct 7, 2020
7f5911b
Fixed non static formatMessage calls
pavolumMsft Oct 8, 2020
fd39d61
minor syntax refactoring
pavolumMsft Oct 8, 2020
7bcaa36
Refactoring state management for more modular state.
pavolumMsft Oct 8, 2020
7f2c10e
Making additional state management changes for better readability and…
pavolumMsft Oct 8, 2020
1b7d47f
Fixing file naming
pavolumMsft Oct 9, 2020
a5710e7
Merging from master
pavolumMsft Oct 12, 2020
55e3afe
Formatting template strings for localization
pavolumMsft Oct 12, 2020
eb1c3e2
Merging from latest in va-template branch
pavolumMsft Oct 12, 2020
b92a9c2
Merge branch 'main' into pavolum/va-creation-ui
pavolum Oct 12, 2020
8c571b1
changing ReachRouter version dpendency to match client reach/router v…
pavolumMsft Oct 12, 2020
26dea81
update Azure Publish yarn.lock
pavolumMsft Oct 12, 2020
d18bd02
Updating reach router version and tamplate name
pavolumMsft Oct 12, 2020
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
3 changes: 2 additions & 1 deletion Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@
"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:runtimes",
"build:plugins": "yarn build:plugins:localpublish && yarn build:plugins:samples && yarn build:plugins:azurePublish && yarn build:plugins:runtimes & yarn build:plugins:vacore",
"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:runtimes": "cd plugins/runtimes && yarn install && yarn build",
"build:plugins:vacore": "cd plugins/vacore && yarn install && yarn build",
"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 @@ -4,7 +4,7 @@
import React from 'react';
import { render } from '@bfc/test-utils';

import { DialogWrapper, DialogTypes } from '../../../src/components/DialogWrapper';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

describe('<DialogWrapper />', () => {
const props = {
Expand Down
2 changes: 2 additions & 0 deletions Composer/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@bfc/extension-client": "*",
"@bfc/indexers": "*",
"@bfc/shared": "*",
"@bfc/ui-shared": "*",
"@bfc/ui-plugin-composer": "*",
"@bfc/ui-plugin-dialog-schema-editor": "*",
"@bfc/ui-plugin-lg": "*",
Expand All @@ -33,6 +34,7 @@
"@bfc/ui-plugin-prompts": "*",
"@bfc/ui-plugin-select-dialog": "*",
"@bfc/ui-plugin-select-skill-dialog": "*",
"@bfc/ui-plugin-va-creation": "*",
"@emotion/core": "^10.0.27",
"@reach/router": "^1.2.1",
"@uifabric/fluent-theme": "^7.1.107",
Expand Down
3 changes: 1 addition & 2 deletions Composer/packages/client/src/components/CreateSkillModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { useRecoilValue } from 'recoil';
import debounce from 'lodash/debounce';
import { Skill } from '@bfc/shared';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { addSkillDialog } from '../constants';
import httpClient from '../utils/httpUtil';
import { skillsState } from '../recoilModel';

import { DialogWrapper, DialogTypes } from './DialogWrapper';

export interface SkillFormDataErrors {
endpoint?: string;
manifestUrl?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import {
} from 'office-ui-fabric-react/lib/DetailsList';
import { Sticky, StickyPositionType } from 'office-ui-fabric-react/lib/Sticky';
import { ProjectTemplate } from '@bfc/shared';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';
import { NeutralColors } from '@uifabric/fluent-theme';

import { DialogCreationCopy, EmptyBotTemplateId, QnABotTemplateId } from '../../constants';
import { DialogWrapper, DialogTypes } from '../DialogWrapper';

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

Expand Down
101 changes: 64 additions & 37 deletions Composer/packages/client/src/components/CreationFlow/CreationFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// TODO: Remove path module
import Path from 'path';

import React, { useEffect, useRef, Fragment, useState } from 'react';
import React, { useEffect, useRef, Fragment, useState, useMemo } from 'react';
import { RouteComponentProps, Router, navigate } from '@reach/router';
import { useRecoilValue } from 'recoil';

Expand All @@ -26,6 +26,10 @@ import { useProjectIdCache } from '../../utils/hooks';
import { CreateOptions } from './CreateOptions';
import { OpenProject } from './OpenProject';
import DefineConversation from './DefineConversation';
import { VirtualAssistantCreationModal } from '@bfc/ui-plugin-va-creation';
import { useShell } from '../../shell';
import { PluginConfig, mergePluginConfigs, EditorExtension } from '@bfc/extension-client';
import plugins from '../../plugins';

type CreationFlowProps = RouteComponentProps<{}>;

Expand Down Expand Up @@ -55,8 +59,8 @@ const CreationFlow: React.FC<CreationFlowProps> = () => {
const currentStorageIndex = useRef(0);
const storage = storages[currentStorageIndex.current];
const currentStorageId = storage ? storage.id : 'default';
const [formData, setFormData] = useState({ name: '' });

const [formData, setFormData] = useState({ name: '', description: '', location: '' });
const shellForCreation = useShell('VaCreation', projectId);
useEffect(() => {
if (storages && storages.length) {
const storageId = storage.id;
Expand Down Expand Up @@ -129,6 +133,11 @@ const CreationFlow: React.FC<CreationFlowProps> = () => {
navigate(`./QnASample/importQnA`);
return;
}
if (templateId === 'va-core') {
Comment thread
pavolum marked this conversation as resolved.
setFormData(formData);
navigate(`./va-core/customize`);
return;
}
handleSubmit(formData, templateId);
};

Expand All @@ -150,43 +159,61 @@ const CreationFlow: React.FC<CreationFlowProps> = () => {
navigate(`./create/${data}`);
};

const pluginConfig: PluginConfig = useMemo(() => {
Comment thread
pavolum marked this conversation as resolved.
Outdated
const sdkUISchema = {};
const userUISchema = {};
return mergePluginConfigs({ uiSchema: sdkUISchema }, plugins, { uiSchema: userUISchema });
}, []);
return (
<Fragment>
<Home />
<Router>
<DefineConversation
createFolder={createFolder}
focusedStorageFolder={focusedStorageFolder}
path="create/:templateId"
updateFolder={updateFolder}
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onSubmit={handleSubmitOrImportQnA}
/>
<CreateOptions path="create" templates={templateProjects} onDismiss={handleDismiss} onNext={handleCreateNext} />
<DefineConversation
createFolder={createFolder}
focusedStorageFolder={focusedStorageFolder}
path=":projectId/:templateId/save"
updateFolder={updateFolder}
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onSubmit={handleSubmitOrImportQnA}
/>
<OpenProject
focusedStorageFolder={focusedStorageFolder}
path="open"
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onOpen={openBot}
/>
<ImportQnAFromUrlModal
dialogId={formData.name.toLowerCase()}
path="create/QnASample/importQnA"
onDismiss={handleDismiss}
onSubmit={handleCreateQnA}
/>
</Router>
<EditorExtension projectId={projectId} plugins={pluginConfig} shell={shellForCreation}>
<Router>
<DefineConversation
createFolder={createFolder}
focusedStorageFolder={focusedStorageFolder}
path="create/:templateId"
updateFolder={updateFolder}
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onSubmit={handleSubmitOrImportQnA}
/>
<CreateOptions
path="create"
templates={templateProjects}
onDismiss={handleDismiss}
onNext={handleCreateNext}
/>
<DefineConversation
createFolder={createFolder}
focusedStorageFolder={focusedStorageFolder}
path=":projectId/:templateId/save"
updateFolder={updateFolder}
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onSubmit={handleSubmitOrImportQnA}
/>
<OpenProject
focusedStorageFolder={focusedStorageFolder}
path="open"
onCurrentPathUpdate={updateCurrentPath}
onDismiss={handleDismiss}
onOpen={openBot}
/>
<ImportQnAFromUrlModal
dialogId={formData.name.toLowerCase()}
path="create/QnASample/importQnA"
onDismiss={handleDismiss}
onSubmit={handleCreateQnA}
/>
<VirtualAssistantCreationModal
handleCreateNew={handleCreateNew}
formData={formData}
onDismiss={handleDismiss}
path="create/va-core/*"
/>
</Router>
</EditorExtension>
</Fragment>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { RouteComponentProps } from '@reach/router';
import querystring from 'query-string';
import { FontWeights } from '@uifabric/styling';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { DialogCreationCopy, QnABotTemplateId, nameRegex } from '../../constants';
import { DialogWrapper, DialogTypes } from '../DialogWrapper';

import { FieldConfig, useForm } from '../../hooks/useForm';
import { StorageFolder } from '../../recoilModel/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { RouteComponentProps } from '@reach/router';

import { StorageFolder } from '../../recoilModel/types';
import { DialogCreationCopy } from '../../constants';
import { DialogWrapper, DialogTypes } from '../DialogWrapper';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { LocationSelectContent } from './LocationSelectContent';
interface OpenProjectProps extends RouteComponentProps<{}> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import { Checkbox } from 'office-ui-fabric-react/lib/Checkbox';
import { Label } from 'office-ui-fabric-react/lib/Label';
import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';

import { DialogWrapper, DialogTypes } from '../DialogWrapper';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { MultiLanguagesDialog } from '../../constants';

import { ILanguageFormData } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { Stack, StackItem } from 'office-ui-fabric-react/lib/Stack';
import { Checkbox } from 'office-ui-fabric-react/lib/Checkbox';
import { Label } from 'office-ui-fabric-react/lib/Label';

import { DialogWrapper, DialogTypes } from '../DialogWrapper';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { MultiLanguagesDialog } from '../../constants';

import { ILanguageFormData } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { useRecoilValue } from 'recoil';

import { DialogCreationCopy, nameRegex } from '../../constants';
import { StorageFolder } from '../../recoilModel/types';
import { DialogWrapper, DialogTypes } from '../../components/DialogWrapper';
import { DialogWrapper, DialogTypes } from '@bfc/ui-shared';

import { FieldConfig, useForm } from '../../hooks/useForm';
import { validateDialogSelectorFamily } from '../../recoilModel';

Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/src/shell/useShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { useTriggerApi } from './triggerApi';

const FORM_EDITOR = 'PropertyEditor';

type EventSource = 'FlowEditor' | 'PropertyEditor' | 'DesignPage';
type EventSource = 'FlowEditor' | 'PropertyEditor' | 'DesignPage' | 'VaCreation';

export function useShell(source: EventSource, projectId: string): Shell {
const dialogMapRef = useRef({});
Expand Down
1 change: 1 addition & 0 deletions Composer/packages/lib/ui-shared/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

export * from './ListOverview';
export * from './PropertyAssignment';
export * from './DialogWrapper';
Loading