Skip to content

Commit

Permalink
Fixed an issue that was causing adaptive card focus to be blurred whe…
Browse files Browse the repository at this point in the history
…n clicking an activity.
  • Loading branch information
tonyanziano committed Mar 5, 2020
1 parent e92279e commit e7d0089
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [build] Locked `eslint-plugin-import@2.20.0` to avoid unecessary import linting changes in PR [2081](https://github.com/microsoft/BotFramework-Emulator/pull/2081)
- [client] Thrown errors in client-side sagas will now be logged in their entirety to the dev tools console in PR [2087](https://github.com/microsoft/BotFramework-Emulator/pull/2087)
- [client] Upload and download attachments bubble texts and background in webchat were hidden. The adjustments have been made to override FileContent class in PR [2088](https://github.com/microsoft/BotFramework-Emulator/pull/2088)
- [client] Fixed an issue that was causing adaptive card focus to be blurred when clicking on an activity in PR [2090](https://github.com/microsoft/BotFramework-Emulator/pull/2090)


## Removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ import { ConnectionMessageContainer } from './connectionMessageContainer';
export interface ChatProps {
botId?: string;
conversationId?: string;
currentUserId?: string;
directLine?: DirectLine;
documentId?: string;
mode?: EmulatorMode;
currentUser?: User;
locale?: string;
webSpeechPonyfillFactory?: () => any;
showContextMenuForActivity?: (activity: Partial<Activity>) => void;
Expand All @@ -72,15 +72,16 @@ export class Chat extends PureComponent<ChatProps, ChatState> {
public render() {
const {
botId,
currentUser,
conversationId,
currentUserId = '',
directLine,
locale,
mode,
webchatStore,
webSpeechPonyfillFactory,
} = this.props;

const currentUser = { id: currentUserId, name: 'User' };
const isDisabled = mode === 'transcript' || mode === 'debug';

// Due to needing to make idiosyncratic style changes, Emulator is using `createStyleSet` instead of `createStyleOptions`. The object below: {...webChatStyleOptions, hideSendBox...} was formerly passed into the `styleOptions` parameter of React Web Chat. If further styling modifications are desired using styleOptions, simply pass it into the same object in createStyleSet below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ import { Chat, ChatProps } from './chat';

const mapStateToProps = (state: RootState, { documentId }): Partial<ChatProps> => {
const currentChat = state.chat.chats[documentId];
const currentUserId = currentChat.userId || '';

return {
botId: currentChat.botId,
conversationId: currentChat.conversationId,
directLine: currentChat.directLine,
mode: currentChat.mode,
currentUser: { id: currentUserId, name: 'User' } as User,
currentUserId: currentChat.userId || '',
locale: state.clientAwareSettings.locale || 'en-us',
webSpeechPonyfillFactory: state.chat.webSpeechFactories[documentId],
webchatStore: state.chat.webChatStores[documentId],
Expand Down

0 comments on commit e7d0089

Please sign in to comment.