Skip to content

Add React Hooks for customization (part 12)#2553

Merged
compulim merged 6 commits intomicrosoft:masterfrom
compulim:feat-redux-hooks-12
Nov 25, 2019
Merged

Add React Hooks for customization (part 12)#2553
compulim merged 6 commits intomicrosoft:masterfrom
compulim:feat-redux-hooks-12

Conversation

@compulim
Copy link
Copy Markdown
Contributor

@compulim compulim commented Nov 4, 2019

Related to #2539.

Please merge #2540, #2541, #2542, #2543, #2544, #2547, #2548, #2549, #2550, #2551, #2552 before reviewing this one.

Changelog Entry

  • Resolves #2539, added React hooks for customization, by @compulim, in the following PRs:
    • PR #2540: useActivities, useReferenceGrammarID, useSendBoxDictationStarted
    • PR #2541: useStyleOptions, useStyleSet
    • PR #2542: useLanguage, useLocalize, useLocalizeDate
    • PR #2543: useAdaptiveCardsHostConfig, useAdaptiveCardsPackage, useRenderMarkdownAsHTML
    • PR #2544: useAvatarForBot, useAvatarForUser
    • PR #2547: useEmitTypingIndicator, usePeformCardAction, usePostActivity, useSendEvent, useSendFiles, useSendMessage, useSendMessageBack, useSendPostBack
    • PR #2548: useDisabled
    • PR #2549: useSuggestedActions
    • PR #2550: useConnectivityStatus, useGroupTimestamp, useTimeoutForSend, useUserID, useUsername
    • PR #2551: useLastTypingAt, useSendTypingIndicator, useTypingIndicator
    • PR #2552: useFocusSendBox, useScrollToEnd, useSendBoxValue, useSubmitSendBox, useTextBoxSubmit, useTextBoxValue
    • PR #2553: useDictateInterims, useDictateState, useGrammars, useMarkActivityAsSpoken, useMicrophoneButton, useShouldSpeakIncomingActivity, useStartDictate, useStopDictate, useVoiceSelector, useWebSpeechPonyfill

Description

Add several post message related hooks:

  • useDictateInterims
  • useDictateState
  • useGrammars
  • useMarkActivityAsSpoken
  • useMicrophoneButton
  • useShouldSpeakIncomingActivity
  • useStartDictate
  • useStopDictate
  • useVoiceSelector
  • useWebSpeechPonyfill

Specific Changes

  • Added the following hooks:
    • useDictateInterims
    • useDictateState
    • useGrammars
    • useMarkActivityAsSpoken
    • useMicrophoneButton
    • useShouldSpeakIncomingActivity
    • useStartDictate
    • useStopDictate
    • useVoiceSelector
    • useWebSpeechPonyfill
  • Updated components to use aforementioned hooks

  • Testing Added

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 4, 2019

Coverage Status

Coverage decreased (-0.1%) to 64.173% when pulling 32b1b11 on compulim:feat-redux-hooks-12 into 35610b9 on microsoft:master.

@compulim compulim force-pushed the feat-redux-hooks-12 branch from f592ff8 to 63eef63 Compare November 12, 2019 08:50
@compulim compulim force-pushed the feat-redux-hooks-12 branch from 63eef63 to aac9c49 Compare November 24, 2019 03:25
setSendBox(transcript);
submitSendBox('speech');
setShouldSpeakIncomingActivity();
setShouldSpeakIncomingActivity(true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was called startSpeakActivity and stopSpeakActivity. And now shouldSpeakIncomingActivity. We should always call it with true/false.

And I found test failed when I forget to set it to true.

@compulim compulim merged commit 2d123c5 into microsoft:master Nov 25, 2019
@compulim compulim deleted the feat-redux-hooks-12 branch November 25, 2019 18:27
@corinagum corinagum added the R7 label Dec 3, 2019
@compulim compulim mentioned this pull request Dec 10, 2019
73 tasks
@corinagum corinagum mentioned this pull request Dec 13, 2019
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move to Redux Hooks

4 participants