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

Reaction buttons example and activity id #3632

Closed
martinoss opened this issue Dec 10, 2020 · 4 comments · Fixed by #3820 or #3827
Closed

Reaction buttons example and activity id #3632

martinoss opened this issue Dec 10, 2020 · 4 comments · Fixed by #3820 or #3827
Assignees
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. front-burner p2 Nice to have Sample Implement PoC or sample code
Milestone

Comments

@martinoss
Copy link

martinoss commented Dec 10, 2020

Version

4.11

Describe the bug

First, I'm not sure if this is the best category for my input.

In the sample for reaction buttons the activityId is passed in the MessageReaction object which does not seem to be part of the specification bot builder implementation.

Also, MessageRection.cs has a type property for the reaction which is not used in the sample to populate the reaction.

Steps to reproduce

See implementation in the sample

const handleUpvoteButton = useCallback(() => {
    postActivity({
      type: 'messageReaction',
      reactionsAdded: [{ activityID, helpful: 1 }]
    });
}, [activityID, postActivity]);

Expected behavior

Shoudn't the activityid be transported via the replyToId activity property and the reaction in the type of "MessageReaction"?

Like this:

    const addMessageReaction = (helpful: boolean) => {
        props.postActivity({
            type: 'messageReaction',
            reactionsAdded: [{ type: (helpful ? "ThumbsUp" : "ThumbsDown") }],
            replyToId: props.activityId
        });
    }

This way, it would be easier to handle the reactions out of the box with c# bot builder sdk:

image

[Bug]

@martinoss martinoss added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Required for internal Azure reporting. Do not delete. labels Dec 10, 2020
@corinagum
Copy link
Contributor

corinagum commented Dec 10, 2020

Thanks for bringing this up. I recall the same thought occurring to me in the past but I failed to follow-up. Your suggestion makes sense to me, and of course we don't enforce any of the code suggestions we make in our samples, so you are free to follow your example code. 🙂

I will bring this up as team discussion to reach a consensus to decide if we want to update the sample. (Also needs prioritization.)

@corinagum corinagum added the Sample Implement PoC or sample code label Dec 10, 2020
@corinagum corinagum self-assigned this Dec 10, 2020
@corinagum corinagum added this to the R12 milestone Dec 10, 2020
@tonyanziano
Copy link
Contributor

We will look to prioritize this in the upcoming release.

@tonyanziano tonyanziano added the customer-replied-to Required for internal reporting. Do not delete. label Dec 10, 2020
@corinagum corinagum added p2 Nice to have backlog Out of scope for the current iteration but it will be evaluated in a future release. front-burner and removed needs-team-attention labels Jan 13, 2021
@corinagum corinagum removed this from the R12 milestone Jan 20, 2021
@compulim
Copy link
Contributor

compulim commented Feb 8, 2021

Assigning to Post R12.

I think the last time we discussed was to fix this shortly after we ship R12. Please correct me if I am wrong.

@corinagum
Copy link
Contributor

Originally filed by @5Heinzelmann:

https://microsoft.github.io/BotFramework-WebChat/05.custom-components/d.reaction-buttons/

Screenshots

Screenshot

Steps to reproduce

  1. Go to https://microsoft.github.io/BotFramework-WebChat/05.custom-components/d.reaction-buttons/
  2. Text Hi
  3. Text Help
  4. Wait a few seconds
  5. See error

Expected behavior

Bot answers with default help text and shows reaction buttons in front of each bot message.

Additional context

Same for Chrome and Firefox (I used chrome for Screenshot)

[Bug]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. front-burner p2 Nice to have Sample Implement PoC or sample code
Projects
None yet
5 participants