diff --git a/CHANGELOG.md b/CHANGELOG.md index b73f3cd21c..82752b7bfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,7 +87,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), 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) +- 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), PR [5470](https://github.com/microsoft/BotFramework-WebChat/pull/5470) and PR [#5501](https://github.com/microsoft/BotFramework-WebChat/pull/5501) by [@lexi-taylor](https://github.com/lexi-taylor) and [@OEvgeny](https://github.com/OEvgeny) - ESCAPE key should reset the feedback form, in PR [#5480](https://github.com/microsoft/BotFramework-WebChat/pull/5480), by [@compulim](https://github.com/compulim), in PR [#5493](https://github.com/microsoft/BotFramework-WebChat/pull/5493) by [@lexi-taylor](https://github.com/lexi-taylor) - Added multi-dimensional grouping, `styleOptions.groupActivitiesBy`, and `useGroupActivitiesByName` hook, in PR [#5471](https://github.com/microsoft/BotFramework-WebChat/pull/5471), by [@compulim](https://github.com/compulim) - Existing behavior will be kept and activities will be grouped by `sender` followed by `status` diff --git a/__tests__/__image_snapshots__/html/auto-resize-js-fluent-theme-applied-textbox-auto-resize-3-snap.png b/__tests__/__image_snapshots__/html/auto-resize-js-fluent-theme-applied-textbox-auto-resize-3-snap.png index 2b6ae2bdb7..6d7b3c7da0 100644 Binary files a/__tests__/__image_snapshots__/html/auto-resize-js-fluent-theme-applied-textbox-auto-resize-3-snap.png and b/__tests__/__image_snapshots__/html/auto-resize-js-fluent-theme-applied-textbox-auto-resize-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/max-message-length-js-fluent-theme-applied-handles-max-message-length-exceeded-1-snap.png b/__tests__/__image_snapshots__/html/max-message-length-js-fluent-theme-applied-handles-max-message-length-exceeded-1-snap.png index 6e65a85919..ef7dcbdf7a 100644 Binary files a/__tests__/__image_snapshots__/html/max-message-length-js-fluent-theme-applied-handles-max-message-length-exceeded-1-snap.png and b/__tests__/__image_snapshots__/html/max-message-length-js-fluent-theme-applied-handles-max-message-length-exceeded-1-snap.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html new file mode 100644 index 0000000000..af1d640fc5 --- /dev/null +++ b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html @@ -0,0 +1,10 @@ + + + + Feedback Form (fluent): Scrollbar behavior when input is long + + + + diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-1.png b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-1.png new file mode 100644 index 0000000000..e200bbd151 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-2.png b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-2.png new file mode 100644 index 0000000000..493b529e3d Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-3.png b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-3.png new file mode 100644 index 0000000000..60a18240ad Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.fluent.html.snap-3.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.html b/__tests__/html2/feedbackForm/feedback.form.scroll.html new file mode 100644 index 0000000000..ddac7dfbb8 --- /dev/null +++ b/__tests__/html2/feedbackForm/feedback.form.scroll.html @@ -0,0 +1,121 @@ + + + + Feedback Form: Scrollbar behavior when input is long + + + + + + + + + + +
+ + + diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-1.png b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-1.png new file mode 100644 index 0000000000..449bca7024 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-2.png b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-2.png new file mode 100644 index 0000000000..d3cfd7dbd4 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-3.png b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-3.png new file mode 100644 index 0000000000..c83ddc5ea7 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.form.scroll.html.snap-3.png differ diff --git a/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png b/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png index 674d5a4490..66457e04b5 100644 Binary files a/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png and b/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png differ diff --git a/packages/component/src/ActivityFeedback/ActivityFeedback.tsx b/packages/component/src/ActivityFeedback/ActivityFeedback.tsx index 412f821fab..0f063cc4a2 100644 --- a/packages/component/src/ActivityFeedback/ActivityFeedback.tsx +++ b/packages/component/src/ActivityFeedback/ActivityFeedback.tsx @@ -1,21 +1,23 @@ -import classNames from 'classnames'; +import { useStyles } from 'botframework-webchat-styles/react'; import React, { memo, useCallback, useMemo, type FormEventHandler, type KeyboardEventHandler } from 'react'; import { Extract, wrapWith } from 'react-wrap-with'; import { useRefFrom } from 'use-ref-from'; -import useStyleSet from '../hooks/useStyleSet'; import FeedbackForm from './private/FeedbackForm'; import FeedbackVoteButtonBar from './private/FeedbackVoteButtonBar'; import isActionRequireReview from './private/isActionRequireReview'; import ActivityFeedbackComposer from './providers/ActivityFeedbackComposer'; import useActivityFeedbackHooks from './providers/useActivityFeedbackHooks'; +import styles from './private/FeedbackForm.module.css'; + function InternalActivityFeedback() { + const classNames = useStyles(styles); + const { useActions, useFeedbackText, useFocusFeedbackButton, useHasSubmitted, useSelectedAction, useSubmit } = useActivityFeedbackHooks(); const [_, setFeedbackText] = useFeedbackText(); - const [{ feedbackForm }] = useStyleSet(); const [actions] = useActions(); const [hasSubmitted] = useHasSubmitted(); const [selectedAction, setSelectedAction] = useSelectedAction(); @@ -62,7 +64,7 @@ function InternalActivityFeedback() { return ( !!actions.length && (
- {localize('FEEDBACK_FORM_TITLE')} - - {disclaimer && } -
-