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 chat send history sample #1678

Merged
merged 4 commits into from
Feb 4, 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `core`: Added `sendEvent`, in PR [#1286](https://github.com/Microsoft/BotFramework-WebChat/pull/1286)
- `core`: Added `CONNECT_FULFILLING` action to workaround `redux-saga` [design decision](https://github.com/redux-saga/redux-saga/issues/1651), in PR [#1286](https://github.com/Microsoft/BotFramework-WebChat/pull/1286)
- `component`: Added missing Spanish (es-ES) locale by [@schgressive](https://github.com/schgressive) in PR [#1615](https://github.com/Microsoft/BotFramework-WebChat/pull/1615)
- `samples`: Added selectable chat activity sample, by [@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n), in PR [#1624](https://github.com/Microsoft/BotFramework-WebChat/pull/1624)
- Added missing Spanish (es-ES) locale by [@schgressive](https://github.com/schgressive) in PR [#1615](https://github.com/Microsoft/BotFramework-WebChat/pull/1615)
- Fix [#1602](https://github.com/Microsoft/BotFramework-WebChat/issues/1602). Fix suggested actions regression of buttons, by [@corinagum](https://github.com/corinagum) in PR [#1616](https://github.com/Microsoft/BotFramework-WebChat/pull/1616)
- `core`: Send `conversationUpdate` activity on connect, by [@compulim](https://github.com/compulim), in PR [#1608](https://github.com/Microsoft/BotFramework-WebChat/pull/1608)
Expand Down Expand Up @@ -80,6 +79,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `*`: Updated [minimizable Web Chat](https://microsoft.github.io/BotFramework-WebChat/12.customization-minimizable-web-chat/) sample to use `WEB_CHAT/SEND_EVENT` action, in [#1631](https://github.com/Microsoft/BotFramework-WebChat/pull/1631)
- `component`: [Hybrid speech engine](https://microsoft.github.io/BotFramework-WebChat/06.f.hybrid-speech/), in [#1617](https://github.com/Microsoft/BotFramework-WebChat/pull/1617)
- `component`: Use Speech Services token for [speech UI sample](https://microsoft.github.io/BotFramework-WebChat/13.customization-speech-ui/), in [#1634](https://github.com/Microsoft/BotFramework-WebChat/pull/1634)
- `component`: [Selectable Activity](https://microsoft.github.io/BotFramework-WebChat/16.customization-selectable-activity/), in [#1624](https://github.com/Microsoft/BotFramework-WebChat/pull/1624)
- `component`: [Chat Send History](https://microsoft.github.io/BotFramework-WebChat/17.chat-send-history/), in [#1678](https://github.com/Microsoft/BotFramework-WebChat/pull/1678)

## [4.2.0] - 2018-12-11
### Added
Expand Down
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"samples/12.customization-minimizable-web-chat",
"samples/13.customization-speech-ui",
"samples/14.customization-piping-to-redux",
"samples/16.customization-selectable-activity"
"samples/16.customization-selectable-activity",
"samples/17.chat-send-history"
],
"version": "0.0.0"
}
1 change: 1 addition & 0 deletions packages/component/src/SendBox/TextBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default connectSendTextBox(
{ ({ sendFocusRef }) =>
<input
aria-label={ typeYourMessageString }
data-id="webchat-sendbox-input"
disabled={ disabled }
onChange={ onChange }
placeholder={ typeYourMessageString }
Expand Down
21 changes: 21 additions & 0 deletions samples/17.chat-send-history/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
26 changes: 26 additions & 0 deletions samples/17.chat-send-history/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Chat Send History

This sample shows how to implement a chat history that can be accessed by using the arrow keys when the
sendbox input has focus. It aims to give an experience similar to a terminal history.

> _Note: This is just a proof of concept thus should not be used in production
> and lacks performance and security considerations._

# Test out the hosted sample

- [Try out with MockBot](https://microsoft.github.io/BotFramework-WebChat/17.chat-send-history)

# Things to try out

- Send some messages to the bot.
- Use the up and down arrow keys to cycle through the send history.
- Modify an entry in the history, this creates a new entry.

# Other ideas

- Autocomplete using history
- Search through history

## Full list of Web Chat hosted samples

View the list of available samples by clicking [here](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples)
Loading