Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repository support / contribution docs #1960

Merged
merged 7 commits into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
File renamed without changes.
59 changes: 59 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
```
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG.md
Original file line number Diff line number Diff line change
@@ -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
<!-- If applicable, add screenshots to help explain your problem. -->
corinagum marked this conversation as resolved.
Show resolved Hide resolved
<!-- Be sure to remove or obscure personally identifiable information from your code and screenshots -->

## Version
<!-- What version of Web Chat are you using? Are you using the CDN? NPM package? Or embedding Web Chat to your site via `<iframe>`? -->
corinagum marked this conversation as resolved.
Show resolved Hide resolved
<!-- The fastest way to find your Web Chat version is by checking the meta tag on your deployed site. -->

## Describe the bug
<!-- Give a clear and concise description of what the bug is. -->
<!-- Please be sure to add screenshots of the console errors in your browser, if there are any -->

## To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior
<!-- Give a clear and concise description of what you expect to happen when following the reproduction steps above. -->

## Additional context
<!-- Add any other context about the problem here.-->

[Bug]
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md
Original file line number Diff line number Diff line change
@@ -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.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the suggestion or request in detail**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you have considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->

[Enhancement]
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/QUESTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

corinagum marked this conversation as resolved.
Show resolved Hide resolved
🚨 The issue tracker is not for implementation questions 🚨

<!-- If you have other questions on implementation of Web Chat or about other features of Bot Framework, please see the support page on where to direct your question. -->


[Question]
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Fixes #<!-- If this addresses a specific issue, please provide the issue number here -->

## Changelog Entry
<!-- Please paste your new entry from CHANGELOG.MD here -->

## Description
<!-- Please discuss the changes you have worked on. What do the changes do; why is this PR needed? -->

## Specific Changes
corinagum marked this conversation as resolved.
Show resolved Hide resolved
<!-- Please list the changes in a concise manner. -->

-
-
-

- [ ] Testing Added
<!-- If you are adding a new feature to a library, you must include tests for your new code. -->
corinagum marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -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 |
90 changes: 2 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
<!DOCTYPE html>
<html>
<body>
<div id="webchat" role="main"></div>
<script src="https://cdn.botframework.com/botframework-webchat/latest/webchat-minimal.js"></script>
<script>
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({ token: 'YOUR_DIRECT_LINE_TOKEN' }),
userID: 'YOUR_USER_ID'
}, document.getElementById('webchat'));
</script>
</body>
</html>
```

## Integrate with React

For full customizability, you can use React to recompose components of Web Chat.
Expand Down Expand Up @@ -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

Expand Down