-
Notifications
You must be signed in to change notification settings - Fork 1
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
now able to remove user feedback after given #183
base: main
Are you sure you want to change the base?
Conversation
suggestion: the backend doesn't support an |
const currentFeedback = positive ? UserFeedback.Positive : UserFeedback.Negative; | ||
|
||
// Determine if we're toggling the current selection off | ||
const newFeedback = wasHelpful === currentFeedback ? undefined : currentFeedback; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we prefer setting this to undefined
or null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whatever gets decided here can cascade into each of my comments
@@ -0,0 +1,4 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish: should remove this from the PR. Don't think we need a yarn.lock
in our scripts directory
const token = await AuthHelper.getSKaaSAccessToken(instance, inProgress); | ||
|
||
chatService | ||
.rateMessageAync(selectedId, messageId, positive, token) | ||
.rateMessageAync(selectedId, messageId, newFeedback === UserFeedback.Positive, token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: newFeedback === UserFeedback.Positive
evaluates to either true
or false
. We are going to need to pass undefined
here if we want to remove a rating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on testing I see that the frontend does update to allow you to remove a "like" or "dislike" but, the payload going to the backend is still either true
or false
const currentFeedback = positive ? UserFeedback.Positive : UserFeedback.Negative; | ||
|
||
// Determine if we're toggling the current selection off | ||
const newFeedback = wasHelpful === currentFeedback ? undefined : currentFeedback; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whatever gets decided here can cascade into each of my comments
Motivation and Context
previously users were unable to remove a like reaction or dislike reaction after providing feedback. now users can add or remove feedback freely.
Description
now able to like, dislike and deselect like or dislike.
Contribution Checklist
checklist complete.