Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d0661ef
initial commit
lexi-taylor Apr 29, 2025
e06cf05
revert changes and new snapshots
lexi-taylor Apr 29, 2025
b4cfe73
add feedback markdown rendering
lexi-taylor Apr 29, 2025
3c8272c
update changelog
lexi-taylor Apr 29, 2025
89a8721
updating snapshot
lexi-taylor Apr 29, 2025
769f304
fix test
lexi-taylor Apr 29, 2025
d954dd3
Update packages/component/src/Activity/private/FeedbackForm.tsx
lexi-taylor Apr 29, 2025
c73a833
Update packages/component/src/Activity/private/FeedbackForm.tsx
lexi-taylor Apr 29, 2025
4c581d1
temp changes
lexi-taylor Apr 30, 2025
cfde709
fixes
lexi-taylor Apr 30, 2025
9515dee
fix tests
lexi-taylor Apr 30, 2025
d02f396
update accidental test changes
lexi-taylor Apr 30, 2025
554c99d
update based on discussion
lexi-taylor Apr 30, 2025
46687f2
update display none
lexi-taylor Apr 30, 2025
9c957f5
update nits
lexi-taylor Apr 30, 2025
8a83108
move tooltip to variable
lexi-taylor May 1, 2025
d29c1bd
Update packages/component/src/Styles/StyleSet/ThumbButton.ts
lexi-taylor May 1, 2025
3518c24
Merge branch 'main' into users/lexi-taylor/feedbackform/bugs
lexi-taylor May 1, 2025
c39f110
add option to hide feedbackform
lexi-taylor May 1, 2025
4a91579
Merge branch 'users/lexi-taylor/feedbackform/bugs' of https://github.…
lexi-taylor May 1, 2025
c731e43
Revert "add option to hide feedbackform"
lexi-taylor May 1, 2025
fda2568
use suggestions
lexi-taylor May 1, 2025
99f72f5
A few tweaks
OEvgeny May 1, 2025
28b488b
Unskip the actions update on changing selected
OEvgeny May 2, 2025
dc190b8
Preserve initial action
OEvgeny May 2, 2025
1e855c4
Resolve selectedAction type before passing to useMemo
OEvgeny May 2, 2025
e02202f
Unwind the reset/submit logic
OEvgeny May 2, 2025
90b5129
change source of truth to feedbackactions
lexi-taylor May 2, 2025
11b415e
suggestions
lexi-taylor May 2, 2025
90e58a6
remove unnedded newline
lexi-taylor May 2, 2025
f017f16
refactor feedback loop logic into it's own component
lexi-taylor May 2, 2025
7b9dea0
fix failing test
lexi-taylor May 2, 2025
fc80bc9
Add readonly
compulim May 2, 2025
18caeee
Prettier
compulim May 2, 2025
f6b950f
remove ...entities
lexi-taylor May 2, 2025
50420ad
Single source of truth
compulim May 3, 2025
157151d
Fix test
compulim May 3, 2025
65dd1fc
Improve styles
OEvgeny May 3, 2025
05f8bc4
Snaps
OEvgeny May 3, 2025
e589d02
Fix resubmission logic
compulim May 3, 2025
95bef75
Restrict tooltip changes to large button
OEvgeny May 3, 2025
a97f0d6
More snaps
OEvgeny May 3, 2025
3739a35
More snaps
OEvgeny May 3, 2025
3fe42d8
More snaps
OEvgeny May 3, 2025
b769920
More snaps
OEvgeny May 3, 2025
e93501e
More snaps
OEvgeny May 3, 2025
d92cf04
Fix test
compulim May 3, 2025
ce21886
Fix tests
compulim May 3, 2025
befd73c
Fix test
compulim May 3, 2025
8137c19
Fix tests
compulim May 3, 2025
372621d
Wait until scroll completed
compulim May 3, 2025
f0210f8
More snaps
OEvgeny May 3, 2025
148cade
Revert "More snaps"
OEvgeny May 3, 2025
79085cf
Update like/dislike to have accent color
compulim May 3, 2025
e4a3ac9
fix width of feedback form
lexi-taylor May 5, 2025
e71d567
Update packages/component/src/Styles/StyleSet/FeedbackForm.ts
lexi-taylor May 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
- Added support of [contentless activity in livestream](https://github.com/microsoft/BotFramework-WebChat/blob/main/docs/LIVESTREAMING.md#scenario-3-interim-activities-with-no-content), in PR [#5430](https://github.com/microsoft/BotFramework-WebChat/pull/5430), by [@compulim](https://github.com/compulim)
- Added sliding dots typing indicator in Fluent theme, in PR [#5447](https://github.com/microsoft/BotFramework-WebChat/pull/5447) and PR [#5448](https://github.com/microsoft/BotFramework-WebChat/pull/5448), by [@compulim](https://github.com/compulim)
- (Experimental) Add an ability to pass `completion` prop into Fluent send box and expose the component, in PR [#5466](https://github.com/microsoft/BotFramework-WebChat/pull/5466), by [@OEvgeny](https://github.com/OEvgeny)
- Added feedback form for like/dislike button when `feedbackActionsPlacement` is `"activity-actions"`, in PR [#5460](https://github.com/microsoft/BotFramework-WebChat/pull/5460) and in PR [#5469](https://github.com/microsoft/BotFramework-WebChat/pull/5469), by [@lexi-taylor](https://github.com/lexi-taylor) and [@OEvgeny](https://github.com/OEvgeny)
- Added feedback form for like/dislike button when `feedbackActionsPlacement` is `"activity-actions"`, in PR [#5460](https://github.com/microsoft/BotFramework-WebChat/pull/5460), PR [#5469](https://github.com/microsoft/BotFramework-WebChat/pull/5469), and PR [5470](https://github.com/microsoft/BotFramework-WebChat/pull/5470) by [@lexi-taylor](https://github.com/lexi-taylor) and [@OEvgeny](https://github.com/OEvgeny)

### Changed

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions __tests__/html/feedbackActivityStatus.basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,26 @@
await host.sendShiftTab(3);
await host.sendKeys('ENTER');
await expect(document.activeElement).toBe(buttons[0]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();

await host.sendTab();
await expect(document.activeElement).toBe(buttons[1]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();

await host.sendTab();
await expect(document.activeElement).toBe(buttons[0]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();
});
</script>
Expand Down
14 changes: 13 additions & 1 deletion __tests__/html/feedbackActivityStatus.click.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
Expand Down Expand Up @@ -52,6 +52,10 @@

const upvoteResult = await directLine.actPostActivity(async () => {
await host.click(buttons[0]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();

clock.tick(500);
Expand All @@ -75,6 +79,10 @@

const downvoteResult = await directLine.actPostActivity(async () => {
await host.click(buttons[1]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();

clock.tick(500);
Expand All @@ -99,6 +107,10 @@
const switchingResult = await directLine.actPostActivity(async () => {
await host.click(buttons[0]);
await host.click(buttons[1]);

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot();

clock.tick(500);
Expand Down
6 changes: 5 additions & 1 deletion __tests__/html2/activity/feedback.activity.dismiss.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
await host.sendShiftTab(3);

await host.sendKeys('ENTER');

// Wait for 400 ms for the tooltip to show up before taking screenshot.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot('local');
await host.sendKeys('ENTER');
await host.snapshot('local');
Expand Down Expand Up @@ -146,4 +150,4 @@
</script>
</body>

</html>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 40 additions & 36 deletions __tests__/html2/activity/feedback.activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
{
directLine: await testHelpers.createDirectLineWithTranscript([
{
from:{
role: "bot"
from: {
role: 'bot'
},
id: "a-00000",
id: 'a-00000',
timestamp: 0,
type: "message",
text: "This is compleded feedback action example.",
type: 'message',
text: 'This is compleded feedback action example.',
entities: [
{
'@context': 'https://schema.org',
Expand All @@ -40,41 +40,41 @@
keywords: ['AIGeneratedContent', 'AllowCopy'],
potentialAction: [
{
"@type": "LikeAction",
actionStatus: "CompletedActionStatus",
target: {
"@type": "EntryPoint",
urlTemplate: "ms-directline://postback?interaction=like"
'@type': 'LikeAction',
actionStatus: 'CompletedActionStatus',
target: {
'@type': 'EntryPoint',
urlTemplate: 'ms-directline://postback?interaction=like'
}
},
{
"@type": "DislikeAction",
actionStatus: "PotentialActionStatus",
'@type': 'DislikeAction',
actionStatus: 'PotentialActionStatus',
result: {
"@type": "Review",
'@type': 'Review',
reviewBody: "I don't like it.",
"reviewBody-input": {
"@type": "PropertyValueSpecification",
'reviewBody-input': {
'@type': 'PropertyValueSpecification',
valueMinLength: 3,
valueName: "reason"
valueName: 'reason'
}
},
target: {
"@type": "EntryPoint",
urlTemplate: "ms-directline://postback?interaction=dislike{&reason}"
'@type': 'EntryPoint',
urlTemplate: 'ms-directline://postback?interaction=dislike{&reason}'
}
}
]
}
]
},
{
from:{
role: "bot"
from: {
role: 'bot'
},
id: "a-00002",
id: 'a-00002',
timestamp: 0,
type: "message",
type: 'message',
text: "Hi! I'm *Cody*, the devbot. How can I help?",
entities: [
{
Expand All @@ -85,28 +85,28 @@
keywords: [],
potentialAction: [
{
"@type": "LikeAction",
actionStatus: "PotentialActionStatus",
target: {
"@type": "EntryPoint",
urlTemplate: "ms-directline://postback?interaction=like"
'@type': 'LikeAction',
actionStatus: 'PotentialActionStatus',
target: {
'@type': 'EntryPoint',
urlTemplate: 'ms-directline://postback?interaction=like'
}
},
{
"@type": "DislikeAction",
actionStatus: "PotentialActionStatus",
'@type': 'DislikeAction',
actionStatus: 'PotentialActionStatus',
result: {
"@type": "Review",
'@type': 'Review',
reviewBody: "I don't like it.",
"reviewBody-input": {
"@type": "PropertyValueSpecification",
'reviewBody-input': {
'@type': 'PropertyValueSpecification',
valueMinLength: 3,
valueName: "reason"
valueName: 'reason'
}
},
target: {
"@type": "EntryPoint",
urlTemplate: "ms-directline://postback?interaction=dislike{&reason}"
'@type': 'EntryPoint',
urlTemplate: 'ms-directline://postback?interaction=dislike{&reason}'
}
}
]
Expand All @@ -117,7 +117,7 @@
styleOptions: {
feedbackActionsPlacement: 'activity-actions'
},
store: testHelpers.createStore(),
store: testHelpers.createStore()
},
document.getElementById('webchat')
);
Expand All @@ -130,6 +130,10 @@
await host.sendShiftTab(3);

await host.sendKeys('ENTER');

// Wait for 400 ms for the tooltip to show up.
await new Promise(resolve => setTimeout(resolve, 400));

await host.snapshot('local');
await host.sendKeys('ENTER');
await host.snapshot('local');
Expand Down
Binary file modified __tests__/html2/activity/feedback.activity.html.snap-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/html2/activity/feedback.activity.html.snap-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/html2/activity/feedback.activity.html.snap-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/html2/activity/feedback.activity.html.snap-4.png
Binary file modified __tests__/html2/activity/feedback.activity.html.snap-5.png
Diff not rendered.
2 changes: 0 additions & 2 deletions __tests__/html2/activity/feedback.form.activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
await host.sendShiftTab(2);
await host.sendKeys('ENTER');

await host.snapshot('local');

// Click like button
await host.sendKeys('ENTER');

Expand Down
Binary file modified __tests__/html2/activity/feedback.form.activity.html.snap-1.png
Binary file modified __tests__/html2/activity/feedback.form.activity.html.snap-2.png
Diff not rendered.
Loading
Loading