diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000000..afd73e2cd6 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# Building the project + +> If you need to build this project for customization purposes, we strongly advise you to refer to our [samples](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples). If you cannot find any samples that fulfill your customization needs and you don't know how to do that, please [send your dream to us](https://github.com/Microsoft/BotFramework-WebChat/issues/). +> +> Forking Web Chat to make your own customizations means you will lose access to our latest updates. Maintaining forks also introduces chores that are substantially more complicated than a version bump. + +To build Web Chat, you will need to make sure both your Node.js and NPM is latest version (either LTS or current). + +```sh +npm install +npm run bootstrap +npm run build +``` + +## Build tasks + +There are 3 types of build tasks in the build process. + +- `npm run build`: Build for development (instrumented code for code coverage) + - Will bundle as `webchat-instrumented*.js` +- `npm run watch`: Build for development with watch mode loop +- `npm run prepublishOnly`: Build for production + - Will bundle as `webchat*.js` + +## Testing Web Chat for development purpose + +We built a playground app for testing Web Chat so we can test certain Web Chat specific features. + +```sh +cd packages/playground +npm start +``` + +Then browse to http://localhost:3000/, and click on one of the connection options on the upper right corner. + +- Official MockBot: we hosted a live demo bot for testing Web Chat features +- Emulator Core: it will connect to http://localhost:5000/v3/directline for [emulated Direct Line service](https://github.com/Microsoft/BotFramework-Emulator/tree/master/packages/emulator/cli/) + +You are also advised to test the CDN bundles by copying the test harness from our samples. + +## Building CDN bundle in development mode + +Currently, the standard build script does not build the CDN bundle (`webchat*.js`). + +```sh +cd packages/bundle +npm run webpack-dev +``` + +> By default, this script will run in watch mode. + +## Building CDN bundle in production mode + +If you want to build a production CDN bundle with minification, you can follow these steps. + +```sh +cd packages/bundle +npm run prepublishOnly +``` diff --git a/.github/ISSUE_TEMPLATE/BUG.md b/.github/ISSUE_TEMPLATE/BUG.md new file mode 100644 index 0000000000..a7674a13d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG.md @@ -0,0 +1,28 @@ +### [GitHub issues](https://github.com/Microsoft/botframework-webchat/issues) should be used for bugs and feature requests. See the Support section to get support related to Bot Framework and Web Chat. + +## Screenshots + + + +## Version + + + +## Describe the bug + + + +## To Reproduce +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +## Expected behavior + + +## Additional context + + +[Bug] diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md new file mode 100644 index 0000000000..9e9375771d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md @@ -0,0 +1,18 @@ +## Feature Request + +### Use the ['Enhancement' query](https://github.com/Microsoft/botframework-Webchat/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aenhancement) to search for the most popular feature requests. +### The [Sample tag](https://github.com/Microsoft/botframework-Webchat/issues?q=is%3Aissue+is%3Aopen+label%3ASample) also lists examples and implementations that have already been requested. + +**Is your feature request related to a problem? Please describe.** + + +**Describe the suggestion or request in detail** + + +**Describe alternatives you have considered** + + +**Additional context** + + +[Enhancement] diff --git a/.github/ISSUE_TEMPLATE/QUESTION.md b/.github/ISSUE_TEMPLATE/QUESTION.md new file mode 100644 index 0000000000..4b9c23928f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/QUESTION.md @@ -0,0 +1,7 @@ + +🚨 The issue tracker is not for implementation questions 🚨 + + + + +[Question] diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..8d274faa66 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +Fixes # + +## Changelog Entry + + +## Description + + +## Specific Changes + + + - + - + - + +- [ ] Testing Added + diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000000..17c61ffcd6 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,9 @@ +# BotFramework Web Chat Support + +This repo focuses on the development of Web Chat, a client/channel for Bot Framework. We welcome feature requests and bug reports related to Web Chat. If you have other questions on implementation or about other features of Bot Framework, please see the below list to direct your questions to the correct repo or site. + +| Topic | Description | Link | +|-----------------------------|--------------------------------------------------------------|---------------------------------------------------------| +| Web Chat 'How to' Questions | Ask implementation questions about Web Chat | https://stackoverflow.com/questions/tagged/web-chat | +| Bot Framework Questions | Ask implementation questions related to the BotFramework SDK | https://stackoverflow.com/questions/tagged/botframework | +| Bot Builder | A comprehensive list of Bot Framework SDKs and tools | https://github.com/Microsoft/BotBuilder | diff --git a/README.md b/README.md index f4e976e3e5..03b8a36fd9 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,6 @@ Here is how how you can add Web Chat control to your website: Web Chat is designed to integrate with your existing web site using JavaScript or React. Integrating with JavaScript will give you moderate styling and customizability. -### Full bundle - You can use the full, typical webchat package that contains the most typically used features. ```html @@ -93,33 +91,6 @@ You can use the full, typical webchat package that contains the most typically u See the working sample of the [full Web Chat bundle](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples/01.a.getting-started-full-bundle). -### Minimal bundle - -Instead of using the full, typical package of Web Chat, you can choose a lighter-weight sample with fewer features. This bundle does **not** contain: -- Adaptive Cards -- Cognitive Services -- Markdown-It - -Since Adaptive Cards is not included in this bundle, rich cards that depend on Adaptive Cards will not render, e.g. hero cards, receipt cards, etc. A list of attachments that are not supported without Adaptive Cards can be found on the [`createAdaptiveCardMiddleware.js` file](https://github.com/Microsoft/BotFramework-WebChat/tree/master/packages/component/src/Middleware/Attachment/createAdaptiveCardMiddleware.js). - -See a working sample of the [minimal Web Chat bundle](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples/02.a.getting-started-minimal-bundle). - -```html - - -
- - - - - -``` - ## Integrate with React For full customizability, you can use React to recompose components of Web Chat. @@ -169,65 +140,8 @@ Web Chat is designed to be customizable without forking the source code. The tab See more about [customizing Web Chat](https://github.com/Microsoft/BotFramework-WebChat/blob/master/SAMPLES.md) to learn more on customization. -# Building the project - -> If you need to build this project for customization purposes, we strongly advise you to refer to our [samples](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples). If you cannot find any samples that fulfill your customization needs and you don't know how to do that, please [send your dream to us](https://github.com/Microsoft/BotFramework-WebChat/issues/). -> -> Forking Web Chat to make your own customizations means you will lose access to our latest updates. Maintaining forks also introduces chores that are substantially more complicated than a version bump. - -To build Web Chat, you will need to make sure both your Node.js and NPM is latest version (either LTS or current). - -```sh -npm install -npm run bootstrap -npm run build -``` - -## Build tasks - -There are 3 types of build tasks in the build process. - -- `npm run build`: Build for development (instrumented code for code coverage) - - Will bundle as `webchat-instrumented*.js` -- `npm run watch`: Build for development with watch mode loop -- `npm run prepublishOnly`: Build for production - - Will bundle as `webchat*.js` - -## Testing Web Chat for development purpose - -We built a playground app for testing Web Chat so we can test certain Web Chat specific features. - -```sh -cd packages/playground -npm start -``` - -Then browse to http://localhost:3000/, and click on one of the connection options on the upper right corner. - -- Official MockBot: we hosted a live demo bot for testing Web Chat features -- Emulator Core: it will connect to http://localhost:5000/v3/directline for [emulated Direct Line service](https://github.com/Microsoft/BotFramework-Emulator/tree/master/packages/emulator/cli/) - -You are also advised to test the CDN bundles by copying the test harness from our samples. - -## Building CDN bundle in development mode - -Currently, the standard build script does not build the CDN bundle (`webchat*.js`). - -```sh -cd packages/bundle -npm run webpack-dev -``` - -> By default, this script will run in watch mode. - -## Building CDN bundle in production mode - -If you want to build a production CDN bundle with minification, you can follow these steps. - -```sh -cd packages/bundle -npm run prepublishOnly -``` +# Contributing +See our [Contributing page](https://github.com/Microsoft/BotFramework-WebChat/tree/master/.github/CONTRIBUTING.md) for details on how to build the project and our repository guidelines for Pull Requests. # Samples list