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
33 commits
Select commit Hold shift + click to select a range
f0447be
working draft of file picker in new bot flow
benbrown Sep 3, 2019
4a8b51b
draft open bot from any location
benbrown Sep 3, 2019
f1e16db
add bot and folder icons
benbrown Sep 4, 2019
3fc7065
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 4, 2019
b16a9b2
yarn lock file
benbrown Sep 4, 2019
7e5477c
remove unnecessary ui components
benbrown Sep 4, 2019
f214551
fix column widths
benbrown Sep 4, 2019
0b49d32
refactor
benbrown Sep 5, 2019
48b8cce
set and display the default path
benbrown Sep 5, 2019
9372cdf
hide location/browse button when creating a dialog inside a bot
benbrown Sep 5, 2019
2034ab0
clean up code
benbrown Sep 5, 2019
2bfe0d1
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 5, 2019
9c8144c
fix integration tests
benbrown Sep 5, 2019
e0090c5
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 6, 2019
28a25cb
bring back breadcrumbs
benbrown Sep 6, 2019
43ca7a0
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 9, 2019
e383b7f
Merge branch 'master' into benbrown/newbot
benbrown Sep 9, 2019
f320cb6
implement updated design
benbrown Sep 13, 2019
b0d6b66
Merge branch 'benbrown/newbot' of github.com:microsoft/BotFramework-C…
benbrown Sep 13, 2019
b350d8f
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 13, 2019
9f03f94
Merge branch 'master' of github.com:microsoft/BotFramework-Composer i…
benbrown Sep 25, 2019
872b7ac
Merge branch 'master' into benbrown/newbot
benbrown Sep 25, 2019
4af5907
update posix/unix path stuff
benbrown Sep 26, 2019
1438a48
Merge branch 'benbrown/newbot' of github.com:microsoft/BotFramework-C…
benbrown Sep 26, 2019
62f5445
update file path handling
benbrown Sep 26, 2019
52fc8d1
update file path handling
benbrown Sep 26, 2019
4b42f2e
ensure new dialog modal is not horizontal
benbrown Sep 26, 2019
86bbdf3
Merge branch 'master' into benbrown/newbot
cwhitten Sep 27, 2019
207163c
Add dotnet commends in to start command
cwhitten Sep 27, 2019
a5b5690
Update documentation
cwhitten Sep 27, 2019
969052b
Extract to startall command
cwhitten Sep 27, 2019
d67330e
Fix lint
cwhitten Sep 27, 2019
b8d2033
Change .NET prereq to 2.2.109
cwhitten Sep 27, 2019
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
1 change: 0 additions & 1 deletion Composer/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Cypress.Commands.add('openBot', botName => {
cy.get(`[aria-label="${botName}"]`).click({ force: true });
cy.wait(500);
});
cy.getByTestId('SelectLocationOpen').click({ force: true });
cy.wait(500);
});

Expand Down
2 changes: 2 additions & 0 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
"build:server": "cd packages/server && yarn build",
"build:client": "cd packages/client && yarn build",
"start": "concurrently --kill-others-on-fail \"npm:start:*\"",
"startall": "concurrently --kill-others-on-fail \"npm:start:*\" \"npm:runtime\"",
"start:client": "cd packages/client && yarn start",
"start:server": "cd packages/server && yarn start",
"start:obieditor": "cd packages/extensions/obiformeditor && yarn start -- --no-clear",
"runtime": "cd ../BotProject/CSharp/ && dotnet build && dotnet run",
"test": "yarn typecheck && jest",
"test:coverage": "yarn test --coverage --no-cache --reporters=default --reporters=jest-junit",
"test:integration": "start-server-and-test test:integration:start http://localhost:5000 test:integration:run",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import React, { useState } from 'react';
import React, { useState, useContext, useEffect, useRef, Fragment } from 'react';
import formatMessage from 'format-message';
import { DialogFooter, PrimaryButton, DefaultButton, Stack, TextField } from 'office-ui-fabric-react';
import { DialogFooter, PrimaryButton, DefaultButton, Stack, StackItem, TextField } from 'office-ui-fabric-react';

import { LocationSelectContent } from '../LocationBrowser/LocationSelectContent';
import { styles as wizardStyles } from '../StepWizard/styles';

import { StoreContext } from './../../store';
import { name, description } from './styles';

const nameRegex = /^[a-zA-Z0-9-_.]+$/;
Expand All @@ -20,10 +24,20 @@ const validateForm = data => {
};

export function DefineConversation(props) {
const { onSubmit, onGetErrorMessage, onDismiss } = props;
const { onSubmit, onGetErrorMessage, onDismiss, enableLocationBrowse } = props;
const { state } = useContext(StoreContext);
const { storages } = state;
const currentStorageIndex = useRef(0);

const [formData, setFormData] = useState({ errors: {} });
const [disable, setDisable] = useState(false);

// set the default path
useEffect(() => {
const index = currentStorageIndex.current;
updateForm('location')(null, storages[index].path);
}, [storages]);

const updateForm = field => (e, newValue) => {
setFormData({
...formData,
Expand Down Expand Up @@ -67,29 +81,45 @@ export function DefineConversation(props) {
}
};

// // update the path in the form and toggle the location picker.
const updateLocation = path => {
updateForm('location')(null, path);
};

return (
<form onSubmit={handleSubmit}>
<Stack>
<TextField
label={formatMessage('Name')}
styles={name}
onChange={updateForm('name')}
errorMessage={formData.errors.name}
onGetErrorMessage={getErrorMessage}
data-testid="NewDialogName"
/>
<TextField
styles={description}
label={formatMessage('Description')}
multiline
resizable={false}
onChange={updateForm('description')}
/>
</Stack>
<DialogFooter>
<DefaultButton onClick={onDismiss} text={formatMessage('Cancel')} />
<PrimaryButton onClick={handleSubmit} text={formatMessage('Next')} disabled={disable} />
</DialogFooter>
</form>
<Fragment>
<form onSubmit={handleSubmit}>
<input type="submit" style={{ display: 'none' }} />
<Stack horizontal={enableLocationBrowse} gap="2rem" styles={wizardStyles.stackinput}>
<StackItem grow={0} styles={wizardStyles.halfstack}>
<TextField
label={formatMessage('Name')}
value={formData.name}
styles={name}
onChange={updateForm('name')}
errorMessage={formData.errors.name}
onGetErrorMessage={getErrorMessage}
data-testid="NewDialogName"
/>
</StackItem>
<StackItem grow={0} styles={wizardStyles.halfstack}>
<TextField
styles={description}
value={formData.description}
label={formatMessage('Description')}
multiline
resizable={false}
onChange={updateForm('description')}
/>
</StackItem>
</Stack>
{enableLocationBrowse && <LocationSelectContent onChange={updateLocation} />}

<DialogFooter>
<DefaultButton onClick={onDismiss} text={formatMessage('Cancel')} />
<PrimaryButton onClick={handleSubmit} text={formatMessage('Next')} disabled={disable} />
</DialogFooter>
</form>
</Fragment>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ export const textFieldlabel = {
};

export const name = {
fieldGroup: {
width: 200,
},
subComponentStyles: textFieldlabel,
};

export const description = {
subComponentStyles: textFieldlabel,
};

export const locationBrowse = {
root: {
height: '90px',
marginTop: '20px',
},
subComponentStyles: textFieldlabel,
};

export const description = {
export const locationOnly = {
subComponentStyles: textFieldlabel,
};
Loading