From 9a1971175537ce3d34f4245f569744faeaf48917 Mon Sep 17 00:00:00 2001 From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:40:13 -0700 Subject: [PATCH] feat: revert group feedback expanded text field (#297) --- .../GroupFeedback/GroupFeedbackRow.jsx | 30 ++++++++---------- .../GroupFeedback/GroupFeedbackRow.test.jsx | 1 - .../GroupFeedbackRow.test.jsx.snap | 31 ++++++++----------- .../ProblemEditor/data/ReactStateOLXParser.js | 5 +-- .../data/mockData/editorTestData.js | 4 +-- .../data/mockData/olxTestData.js | 12 +++---- src/editors/data/services/cms/api.js | 1 - src/editors/data/services/cms/mockApi.js | 2 ++ 8 files changed, 37 insertions(+), 49 deletions(-) diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx index 617f2a7ee..b5b4bc3e3 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/GroupFeedback/GroupFeedbackRow.jsx @@ -1,12 +1,11 @@ import React from 'react'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { - ActionRow, Container, Form, Icon, IconButton, Row, + ActionRow, Form, Icon, IconButton, Row, } from '@edx/paragon'; import { DeleteOutline } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; import messages from '../../messages'; -import ExpandableTextArea from '../../../../../../../sharedComponents/ExpandableTextArea'; export const GroupFeedbackRow = ({ value, @@ -14,27 +13,25 @@ export const GroupFeedbackRow = ({ handleFeedbackChange, handleDelete, answers, - id, // injected intl, }) => (
If you add more than one hint, a different hint appears each time learners select the hint button.
', ], groupFeedback: { - 0: 'You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.
', - 1: 'You can specify optional feedback for one, several, or all answer combinations.
', + 0: 'You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.', + 1: 'You can specify optional feedback for one, several, or all answer combinations.', }, }; diff --git a/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js b/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js index 8a8603162..1d0980b75 100644 --- a/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js +++ b/src/editors/containers/ProblemEditor/data/mockData/olxTestData.js @@ -15,8 +15,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({You can specify optional feedback for selected answers, cleared answers, or both.
a correct answer
You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.
You can specify optional feedback for one, several, or all answer combinations.
You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.
', + feedback: 'You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.', }, { id: 1, @@ -97,7 +97,7 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({ 'C', 'D', ], - feedback: 'You can specify optional feedback for one, several, or all answer combinations.
', + feedback: 'You can specify optional feedback for one, several, or all answer combinations.', }, ], }, @@ -118,8 +118,8 @@ export const getCheckboxesOLXWithFeedbackAndHintsOLX = () => ({You can specify optional feedback for selected answers, cleared answers, or both.
a correct answer
You can specify optional feedback for a combination of answers which appears after the specified set of answers is submitted.
You can specify optional feedback for one, several, or all answer combinations.