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

Sample fix and rename Textarea components to TextArea #1950

Merged
merged 7 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix [#1920](https://github.com/Microsoft/BotFramework-WebChat/issues/1920). Added disabled property to send button, by [@tdurnford](https://github.com/tdurnford) in PR [#1922](https://github.com/Microsoft/BotFramework-WebChat/pull/1922)
- Fix [#1525](https://github.com/Microsoft/BotFramework-WebChat/issues/1525). Add JavaScript error Offline UI, by [@corinagum](https://github.com/corinagum) in PR [#1927](https://github.com/Microsoft/BotFramework-WebChat/pull/1927)
- Fix [#1934](https://github.com/Microsoft/BotFramework-WebChat/issues/1934). Fix spacing of empty ConnectivityStatus component, by [@corinagum](https://github.com/corinagum) in PR [#1939](https://github.com/Microsoft/BotFramework-WebChat/pull/1939)
Fix [#1945](https://github.com/Microsoft/BotFramework-WebChat/issues/1945). QA fixes for 4.4, by [@corinagum](https://github.com/johndoe) in PR [#1950](https://github.com/Microsoft/BotFramework-WebChat/pull/1950)

### Changed
- Deployment: Bumps to [`blobxfer@1.7.1`](https://github.com/azure/blobxfer/), by [@compulim](https://github.com/compulim), in PR [#1897](https://github.com/Microsoft/BotFramework-WebChat/pull/1897)
Expand Down
4 changes: 2 additions & 2 deletions packages/component/src/SendBox/TextBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default connectSendTextBox(
<form
className={ classNames(
ROOT_CSS + '',
styleSet.sendBoxTextarea + '',
styleSet.sendBoxTextArea + '',
styleSet.sendBoxTextBox + '',
(className || '') + '',
) }
Expand All @@ -96,7 +96,7 @@ export default connectSendTextBox(
value={ value }
/>
: <div>
<textarea
<textarea
aria-label={ typeYourMessageString }
data-id="webchat-sendbox-input"
disabled={ disabled }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function createSendBoxTextareaStyle({
export default function createSendBoxTextAreaStyle({
paddingRegular,
primaryFont,
sendBoxMaxHeight,
Expand Down
4 changes: 2 additions & 2 deletions packages/component/src/Styles/createStyleSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import createRootStyle from './StyleSet/Root';
import createScrollToEndButtonStyle from './StyleSet/ScrollToEndButton';
import createSendBoxButtonStyle from './StyleSet/SendBoxButton';
import createSendBoxStyle from './StyleSet/SendBox';
import createSendBoxTextareaStyle from './StyleSet/SendBoxTextarea';
import createSendBoxTextAreaStyle from './StyleSet/SendBoxTextArea';
import createSendBoxTextBoxStyle from './StyleSet/SendBoxTextBox';
import createSendStatusStyle from './StyleSet/SendStatus';
import createSingleAttachmentActivityStyle from './StyleSet/SingleAttachmentActivity';
Expand Down Expand Up @@ -72,7 +72,7 @@ export default function createStyleSet(options) {
scrollToEndButton: createScrollToEndButtonStyle(options),
sendBox: createSendBoxStyle(options),
sendBoxButton: createSendBoxButtonStyle(options),
sendBoxTextarea: createSendBoxTextareaStyle(options),
sendBoxTextArea: createSendBoxTextAreaStyle(options),
sendBoxTextBox: createSendBoxTextBoxStyle(options),
sendStatus: createSendStatusStyle(options),
singleAttachmentActivity: createSingleAttachmentActivityStyle(options),
Expand Down
24 changes: 16 additions & 8 deletions samples/05.b.idiosyncratic-manual-styling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ First, we want to overwrite the current `styleSet` by using the `createStyleSet`
+ bubbleFromUserBackground: 'rgba(0, 255, 0, .1)'
+ });

+ styleSet.textContent = { ...styleSet.textContent,
+ fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
+ fontWeight: 'bold'
+ };
+ styleSet.textContent = Object.assign(
+ {},
+  styleSet.textContent,
+  {
+    fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
+    fontWeight: 'bold'
+  }
+ );
```

Expand Down Expand Up @@ -98,10 +102,14 @@ Here is the finished `index.html`:
+ bubbleFromUserBackground: 'rgba(0, 255, 0, .1)'
+ });

+ styleSet.textContent = { ...styleSet.textContent,
+ fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
+ fontWeight: 'bold'
+ };
+ styleSet.textContent = Object.assign(
+ {},
+  styleSet.textContent,
+  {
+    fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
+    fontWeight: 'bold'
+  }
+ );

window.WebChat.renderWebChat({
- directLine: window.WebChat.createDirectLine({ token })
Expand Down
14 changes: 9 additions & 5 deletions samples/05.b.idiosyncratic-manual-styling/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
When you are using Web Chat for production, you should use the latest stable release at "/latest/webchat.js",
or lock down on a specific version with the following format: "/4.1.0/webchat.js".
-->
<script src="https://cdn.botframework.com/botframework-webchat/master/webchat.js"></script>
<script src="/webchat.js"></script>
corinagum marked this conversation as resolved.
Show resolved Hide resolved
<style>
html, body { height: 100% }
body { margin: 0 }
Expand Down Expand Up @@ -38,10 +38,14 @@
});

// You can also modify the style set by the actual CSS
styleSet.textContent = { ...styleSet.textContent,
fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
fontWeight: 'bold'
};
styleSet.textContent = Object.assign(
{},
  styleSet.textContent,
  {
    fontFamily: '\'Comic Sans MS\', \'Arial\', sans-serif',
    fontWeight: 'bold'
  }
);

window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({ token }),
Expand Down