Skip to content

Commit

Permalink
Sample fix and rename Textarea components to TextArea (#1950)
Browse files Browse the repository at this point in the history
* Rename Textarea to TextArea

* Fix 1945 - sample 05b not loading in Edge

* Update CHANGELOG.md

* Rename SendBoxTextarea.js to SendBoxTextArea.js

* Revert to proper url in 05b
  • Loading branch information
Corina authored and compulim committed May 2, 2019
1 parent 5905f88 commit 98c662f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ 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 [#1943](https://github.com/Microsoft/BotFramework-WebChat/issues/1943). Fix extra vertical padding in IE11 and Firefox, by [@compulim](https://github.com/compulim) in PR [#XXX](https://github.com/Microsoft/BotFramework-WebChat/pull/XXX)
- Fix [#1943](https://github.com/Microsoft/BotFramework-WebChat/issues/1943). Fix extra vertical padding in IE11 and Firefox, by [@compulim](https://github.com/compulim) in PR [#1949](https://github.com/Microsoft/BotFramework-WebChat/pull/1949)
- 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
12 changes: 8 additions & 4 deletions samples/05.b.idiosyncratic-manual-styling/index.html
Original file line number Diff line number Diff line change
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

0 comments on commit 98c662f

Please sign in to comment.