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 all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8d58b7c
Added support to handle botproject space
Sep 17, 2020
7041fd3
More updates
Sep 18, 2020
e94c5f5
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Sep 18, 2020
425df2e
temp
Sep 18, 2020
c64ecf2
Backup
Sep 21, 2020
29044a0
More updates
Sep 24, 2020
d20ce8e
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Sep 24, 2020
28f917c
More updates
Sep 24, 2020
0b6aa25
update the recoil to 0.0.13
lei9444 Sep 25, 2020
1230a20
fix lint
lei9444 Sep 25, 2020
bee0818
remove @type/recoil
lei9444 Sep 25, 2020
5b4e928
Merge branch 'main' into recoil
cwhitten Sep 25, 2020
d491bac
router work
Sep 25, 2020
671bf84
Merge branch 'recoil' of https://github.com/lei9444/BotFramework-Comp…
Sep 25, 2020
cb0c67e
Bot Project file
Sep 27, 2020
f105aea
Migrate to old desing page and project tree
Oct 2, 2020
48d7f0b
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Oct 2, 2020
9aa46ca
Revert usage of React 16.13.1 to 16.13.0
Oct 2, 2020
98c60d6
Revert "Revert usage of React 16.13.1 to 16.13.0"
Oct 2, 2020
6d76657
Rename api handlers
Oct 2, 2020
7588efb
Merge branch 'main' into srravich/botproject-file-handler
srinaath Oct 3, 2020
86d7443
Add existing skill tests passing
Oct 3, 2020
955bab7
Merge branch 'srravich/botproject-file-handler' of https://github.com…
Oct 3, 2020
26581e2
Manifest tests updated
Oct 4, 2020
7e4f5d0
Removed code for bot migration
Oct 6, 2020
9d5bbc6
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Oct 6, 2020
493c604
Server side tests added
Oct 6, 2020
12648f7
Updated schema url to the correct one
Oct 6, 2020
fc707fe
Fix lint and update schema url on echobot
Oct 6, 2020
52844ff
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Oct 6, 2020
729fff3
botstates
Oct 6, 2020
4fc8e2d
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Oct 7, 2020
103c7b7
Clean up paths
Oct 7, 2020
21ce792
Spellings cleanup
Oct 7, 2020
de1a414
Set project ignore validation to true while opening remote skill
Oct 7, 2020
32fa411
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
Oct 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('<CreationFlow/>', () => {
const createProjectMock = jest.fn();
const initRecoilState = ({ set }) => {
set(dispatcherState, {
createProject: createProjectMock,
createNewBot: createProjectMock,
fetchStorages: jest.fn(),
fetchTemplateProjects: jest.fn(),
onboardingAddCoachMarkRef: jest.fn(),
Expand Down Expand Up @@ -70,14 +70,14 @@ describe('<CreationFlow/>', () => {
act(() => {
fireEvent.click(node);
});
expect(createProjectMock).toHaveBeenCalledWith(
'EchoBot',
'EchoBot-1',
'',
expect.stringMatching(/(\/|\\)test-folder(\/|\\)Desktop/),
'',
'en-US',
undefined
);
expect(createProjectMock).toHaveBeenCalledWith({
appLocale: 'en-US',
description: '',
location: '/test-folder/Desktop',
name: 'EchoBot-1',
qnaKbUrls: undefined,
schemaUrl: '',
templateId: 'EchoBot',
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as React from 'react';
import { fireEvent } from '@bfc/test-utils';

import { PublishDialog } from '../../../src/components/TestController/publishDialog';
import { botNameState, settingsState, dispatcherState, currentProjectIdState } from '../../../src/recoilModel';
import { botDisplayNameState, settingsState, dispatcherState, currentProjectIdState } from '../../../src/recoilModel';
import { renderWithRecoil } from '../../testUtils';
jest.useFakeTimers();

Expand All @@ -31,7 +31,7 @@ describe('<PublishDialog />', () => {
setSettings: setSettingsMock,
});
set(currentProjectIdState, projectId);
set(botNameState(projectId), 'sampleBot0');
set(botDisplayNameState(projectId), 'sampleBot0');
set(settingsState(projectId), {
luis: luisConfig,
qna: qnaConfig,
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/__tests__/components/skill.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe('<SkillForm />', () => {
manifestUrl: 'Validating',
})
);
expect(httpClient.get).toBeCalledWith(`/projects/${projectId}/skill/retrieve-skill-manifest`, {
expect(httpClient.get).toBeCalledWith(`/projects/${projectId}/skill/retrieveSkillManifest`, {
params: {
url: formData.manifestUrl,
},
Expand Down Expand Up @@ -261,7 +261,7 @@ describe('<SkillForm />', () => {
manifestUrl: 'Validating',
})
);
expect(httpClient.get).toBeCalledWith(`/projects/${projectId}/skill/retrieve-skill-manifest`, {
expect(httpClient.get).toBeCalledWith(`/projects/${projectId}/skill/retrieveSkillManifest`, {
params: {
url: formData.manifestUrl,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
import { renderWithRecoil } from '../../testUtils';
import {
settingsState,
botNameState,
botDisplayNameState,
publishTypesState,
publishHistoryState,
currentProjectIdState,
Expand Down Expand Up @@ -53,7 +53,7 @@ const state = {

const initRecoilState = ({ set }) => {
set(currentProjectIdState, state.projectId);
set(botNameState(state.projectId), state.botName);
set(botDisplayNameState(state.projectId), state.botName);
set(publishTypesState(state.projectId), state.publishTypes);
set(publishHistoryState(state.projectId), state.publishHistory);
set(settingsState(state.projectId), state.settings);
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/Onboarding/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useRecoilValue } from 'recoil';
import onboardingStorage from '../utils/onboardingStorage';
import { OpenConfirmModal } from '../components/Modal/ConfirmDialog';
import { useLocation } from '../utils/hooks';
import { dispatcherState, onboardingState, botProjectsSpaceState, validateDialogSelectorFamily } from '../recoilModel';
import { dispatcherState, onboardingState, botProjectIdsState, validateDialogSelectorFamily } from '../recoilModel';

import OnboardingContext from './OnboardingContext';
import TeachingBubbles from './TeachingBubbles/TeachingBubbles';
Expand All @@ -20,7 +20,7 @@ const getCurrentSet = (stepSets) => stepSets.findIndex(({ id }) => id === onboar

const Onboarding: React.FC = () => {
const didMount = useRef(false);
const botProjects = useRecoilValue(botProjectsSpaceState);
const botProjects = useRecoilValue(botProjectIdsState);
const rootBotProjectId = botProjects[0];
const dialogs = useRecoilValue(validateDialogSelectorFamily(rootBotProjectId));
const { onboardingSetComplete } = useRecoilValue(dispatcherState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const validateManifestUrl = async ({
} else {
try {
setValidationState({ ...validationState, manifestUrl: ValidationState.Validating });
const { data } = await httpClient.get(`/projects/${projectId}/skill/retrieve-skill-manifest`, {
const { data } = await httpClient.get(`/projects/${projectId}/skill/retrieveSkillManifest`, {
params: {
url: manifestUrl,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ type CreationFlowProps = RouteComponentProps<{}>;
const CreationFlow: React.FC<CreationFlowProps> = () => {
const {
fetchTemplates,
openProject,
createProject,
saveProjectAs,
fetchStorages,
fetchFolderItemsByPath,
setCreationFlowStatus,
createFolder,
updateCurrentPathForStorage,
updateFolder,
saveTemplateId,
fetchProjectById,
fetchRecentProjects,
openProject,
createNewBot,
saveProjectAs,
fetchProjectById,
} = useRecoilValue(dispatcherState);

const creationFlowStatus = useRecoilValue(creationFlowStatusState);
const projectId = useRecoilValue(currentProjectIdState);
const templateProjects = useRecoilValue(templateProjectsState);
Expand Down Expand Up @@ -102,15 +103,16 @@ const CreationFlow: React.FC<CreationFlowProps> = () => {
};

const handleCreateNew = async (formData, templateId: string, qnaKbUrls?: string[]) => {
createProject(
templateId || '',
formData.name,
formData.description,
formData.location,
formData.schemaUrl,
const newBotData = {
templateId: templateId || '',
name: formData.name,
description: formData.description,
location: formData.location,
schemaUrl: formData.schemaUrl,
appLocale,
qnaKbUrls
);
qnaKbUrls,
};
createNewBot(newBotData);
};

const handleSaveAs = (formData) => {
Expand Down
10 changes: 8 additions & 2 deletions Composer/packages/client/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ import { useRecoilValue } from 'recoil';
import { SharedColors } from '@uifabric/fluent-theme';
import { FontWeights } from 'office-ui-fabric-react/lib/Styling';

import { dispatcherState, appUpdateState, botNameState, localeState, currentProjectIdState } from '../recoilModel';
import {
dispatcherState,
appUpdateState,
botDisplayNameState,
localeState,
currentProjectIdState,
} from '../recoilModel';
import composerIcon from '../images/composerIcon.svg';
import { AppUpdaterStatus } from '../constants';

Expand Down Expand Up @@ -75,7 +81,7 @@ const headerTextContainer = css`
export const Header = () => {
const { setAppUpdateShowing } = useRecoilValue(dispatcherState);
const projectId = useRecoilValue(currentProjectIdState);
const projectName = useRecoilValue(botNameState(projectId));
const projectName = useRecoilValue(botDisplayNameState(projectId));
const locale = useRecoilValue(localeState(projectId));
const appUpdate = useRecoilValue(appUpdateState);
const { showing, status } = appUpdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
dispatcherState,
validateDialogSelectorFamily,
botStatusState,
botNameState,
botDisplayNameState,
luFilesState,
qnaFilesState,
settingsState,
Expand Down Expand Up @@ -62,7 +62,7 @@ export const TestController: React.FC<{ projectId: string }> = (props) => {

const dialogs = useRecoilValue(validateDialogSelectorFamily(projectId));
const botStatus = useRecoilValue(botStatusState(projectId));
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const luFiles = useRecoilValue(luFilesState(projectId));
const settings = useRecoilValue(settingsState(projectId));
const qnaFiles = useRecoilValue(qnaFilesState(projectId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useRecoilValue } from 'recoil';
import { v4 as uuid } from 'uuid';

import { ContentProps } from '../constants';
import { botNameState } from '../../../../recoilModel';
import { botDisplayNameState } from '../../../../recoilModel';

const styles = {
row: css`
Expand Down Expand Up @@ -51,7 +51,7 @@ const InlineLabelField: React.FC<FieldProps> = (props) => {
};

export const Description: React.FC<ContentProps> = ({ errors, value, schema, onChange, projectId }) => {
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const { $schema, ...rest } = value;

const { hidden, properties } = useMemo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useRecoilValue } from 'recoil';
import formatMessage from 'format-message';

import { ContentProps, VERSION_REGEX } from '../constants';
import { botNameState, skillManifestsState } from '../../../../recoilModel';
import { botDisplayNameState, skillManifestsState } from '../../../../recoilModel';

const styles = {
container: css`
Expand Down Expand Up @@ -42,7 +42,7 @@ export const getManifestId = (
};

export const SaveManifest: React.FC<ContentProps> = ({ errors, manifest, setSkillManifest, projectId }) => {
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const skillManifests = useRecoilValue(skillManifestsState(projectId));

const { id } = manifest;
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/pages/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { navigate } from '@reach/router';
import { useRecoilValue } from 'recoil';

import { CreationFlowStatus } from '../../constants';
import { dispatcherState, botNameState } from '../../recoilModel';
import { dispatcherState, botDisplayNameState } from '../../recoilModel';
import {
recentProjectsState,
templateProjectsState,
Expand Down Expand Up @@ -63,7 +63,7 @@ const tutorials = [
const Home: React.FC<RouteComponentProps> = () => {
const templateProjects = useRecoilValue(templateProjectsState);
const projectId = useRecoilValue(currentProjectIdState);
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const recentProjects = useRecoilValue(recentProjectsState);
const templateId = useRecoilValue(templateIdState);
const { openProject, setCreationFlowStatus, onboardingAddCoachMarkRef, saveTemplateId } = useRecoilValue(
Expand Down
5 changes: 3 additions & 2 deletions Composer/packages/client/src/pages/knowledge-base/QnAPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { navigateTo } from '../../utils/navigation';
import { TestController } from '../../components/TestController/TestController';
import { INavTreeItem } from '../../components/NavTree';
import { Page } from '../../components/Page';
import { botNameState, dialogsState, qnaAllUpViewStatusState } from '../../recoilModel/atoms/botState';
import { botDisplayNameState, dialogsState, qnaAllUpViewStatusState } from '../../recoilModel/atoms/botState';
import { dispatcherState } from '../../recoilModel';
import { QnAAllUpViewStatus } from '../../recoilModel/types';

Expand All @@ -31,9 +31,10 @@ interface QnAPageProps extends RouteComponentProps<{}> {

const QnAPage: React.FC<QnAPageProps> = (props) => {
const { dialogId = '', projectId = '' } = props;

const actions = useRecoilValue(dispatcherState);
const dialogs = useRecoilValue(dialogsState(projectId));
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
//To do: support other languages
const locale = 'en-us';
//const locale = useRecoilValue(localeState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
skillManifestsState,
dialogSchemasState,
qnaFilesState,
botProjectFileState,
} from '../../recoilModel';

import {
Expand All @@ -38,6 +39,7 @@ export default function useNotifications(projectId: string, filter?: string) {
const skillManifests = useRecoilValue(skillManifestsState(projectId));
const dialogSchemas = useRecoilValue(dialogSchemasState(projectId));
const qnaFiles = useRecoilValue(qnaFilesState(projectId));
const botProjectFile = useRecoilValue(botProjectFileState(projectId));

const botAssets = {
projectId,
Expand All @@ -48,6 +50,7 @@ export default function useNotifications(projectId: string, filter?: string) {
skillManifests,
setting,
dialogSchemas,
botProjectFile,
};

const memoized = useMemo(() => {
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/pages/publish/Publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { projectContainer } from '../design/styles';
import {
dispatcherState,
settingsState,
botNameState,
botDisplayNameState,
publishTypesState,
publishHistoryState,
} from '../../recoilModel';
Expand All @@ -36,7 +36,7 @@ const Publish: React.FC<RouteComponentProps<{ projectId: string; targetName?: st
const { projectId = '' } = props;
const [selectedTarget, setSelectedTarget] = useState<PublishTarget | undefined>();
const settings = useRecoilValue(settingsState(projectId));
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const publishTypes = useRecoilValue(publishTypesState(projectId));
const publishHistory = useRecoilValue(publishHistoryState(projectId));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const getProjectLink = (path: string, id?: string) => {
const SettingPage: React.FC<RouteComponentProps> = () => {
const projectId = useRecoilValue(currentProjectIdState);
const {
deleteBotProject,
deleteBot: deleteBotProject,
addLanguageDialogBegin,
addLanguageDialogCancel,
delLanguageDialogBegin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
import cloneDeep from 'lodash/cloneDeep';
import { Label } from 'office-ui-fabric-react/lib/Label';

import { dispatcherState, userSettingsState, botNameState, localeState, settingsState } from '../../../recoilModel';
import {
dispatcherState,
userSettingsState,
botDisplayNameState,
localeState,
settingsState,
} from '../../../recoilModel';
import { languageListTemplates } from '../../../components/MultiLanguage';

import { settingsEditor, toolbar } from './style';
import { BotSettings } from './constants';

export const DialogSettings: React.FC<RouteComponentProps<{ projectId: string }>> = (props) => {
const { projectId = '' } = props;
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const locale = useRecoilValue(localeState(projectId));
const settings = useRecoilValue(settingsState(projectId));
const userSettings = useRecoilValue(userSettingsState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
dispatcherState,
ejectRuntimeSelector,
boilerplateVersionState,
botNameState,
botDisplayNameState,
settingsState,
isEjectRuntimeExistState,
} from '../../../recoilModel';
Expand All @@ -30,7 +30,7 @@ import { breathingSpace, runtimeSettingsStyle, runtimeControls, runtimeToggle, c

export const RuntimeSettings: React.FC<RouteComponentProps<{ projectId: string }>> = (props) => {
const { projectId = '' } = props;
const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const settings = useRecoilValue(settingsState(projectId));
const ejectedRuntimeExists = useRecoilValue(isEjectRuntimeExistState(projectId));

Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/pages/skills/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import formatMessage from 'format-message';
import { useRecoilValue } from 'recoil';
import { SkillSetting } from '@bfc/shared';

import { dispatcherState, settingsState, botNameState } from '../../recoilModel';
import { dispatcherState, settingsState, botDisplayNameState } from '../../recoilModel';
import { Toolbar, IToolbarItem } from '../../components/Toolbar';
import { TestController } from '../../components/TestController/TestController';
import { CreateSkillModal } from '../../components/CreateSkillModal';
Expand All @@ -22,7 +22,7 @@ const Skills: React.FC<RouteComponentProps<{ projectId: string }>> = (props) =>
const { projectId = '' } = props;
const [showAddSkillDialogModal, setShowAddSkillDialogModal] = useState(false);

const botName = useRecoilValue(botNameState(projectId));
const botName = useRecoilValue(botDisplayNameState(projectId));
const settings = useRecoilValue(settingsState(projectId));
const { addSkill, setSettings } = useRecoilValue(dispatcherState);

Expand Down
Loading