Update verbiage for Xpert Settings (#550)
* chore: Update verbiage for Xpert configuration screen * fix: Change "generate" to "display" in xpert modal text * fix: Updated learn more link * fix: Change link and add targets
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useCallback, useContext, useEffect } from 'react';
|
||||
import { history } from '@edx/frontend-platform';
|
||||
import { Hyperlink } from '@edx/paragon';
|
||||
import { useDispatch } from 'react-redux';
|
||||
|
||||
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
|
||||
@@ -26,7 +27,21 @@ const XpertUnitSummarySettings = ({ intl }) => {
|
||||
<SettingsModal
|
||||
appId="xpert-unit-summary"
|
||||
title={intl.formatMessage(messages.heading)}
|
||||
enableAppHelp={intl.formatMessage(messages.enableXpertUnitSummaryHelp)}
|
||||
enableAppHelp={
|
||||
(
|
||||
<>
|
||||
{intl.formatMessage(messages.enableXpertUnitSummaryHelp)}
|
||||
{' '}
|
||||
<Hyperlink
|
||||
destination="https://openai.com/api-data-privacy"
|
||||
target="_blank"
|
||||
showLaunchIcon={false}
|
||||
>
|
||||
{intl.formatMessage(messages.enableXpertUnitSummaryHelpPrivacyLink)}
|
||||
</Hyperlink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
enableAppLabel={intl.formatMessage(messages.enableXpertUnitSummaryLabel)}
|
||||
learnMoreText={intl.formatMessage(messages.enableXpertUnitSummaryLink)}
|
||||
onClose={handleClose}
|
||||
|
||||
@@ -2,12 +2,12 @@ export default {
|
||||
id: 'xpert-unit-summary',
|
||||
enabled: false,
|
||||
name: 'Xpert unit summaries',
|
||||
description: 'Harness ChatGPT for quick, focused summaries of text and video content.',
|
||||
description: 'Harness generative AI to generate concise summaries of your text and video transcript content to help reinforce learning.',
|
||||
allowedOperations: {
|
||||
enable: true,
|
||||
configure: true,
|
||||
},
|
||||
documentationLinks: {
|
||||
learnMoreConfiguration: '',
|
||||
learnMoreConfiguration: 'https://openai.com/',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -11,11 +11,15 @@ const messages = defineMessages({
|
||||
},
|
||||
enableXpertUnitSummaryHelp: {
|
||||
id: 'course-authoring.pages-resources.xpert-unit-summary.enable-xpert-unit-summary.help',
|
||||
defaultMessage: 'Enable concise summaries of text and video content.',
|
||||
defaultMessage: 'Reinforce learning concepts by sharing text-based course content with OpenAI (via API) to display unit summaries on-demand for learners. Learners can leave feedback about the quality of the AI-generated summaries for use by edX to improve the performance of the tool.',
|
||||
},
|
||||
enableXpertUnitSummaryHelpPrivacyLink: {
|
||||
id: 'course-authoring.pages-resources.xpert-unit-summary.enable-xpert-unit-summary.help.privacylink',
|
||||
defaultMessage: 'Learn more about OpenAI API data privacy.',
|
||||
},
|
||||
enableXpertUnitSummaryLink: {
|
||||
id: 'course-authoring.pages-resources.xpert-unit-summary.enable-xpert-unit-summary.link',
|
||||
defaultMessage: 'Learn more about the Xpert unit summaries',
|
||||
defaultMessage: 'Learn more about how OpenAI handles data',
|
||||
},
|
||||
allUnitsEnabledByDefault: {
|
||||
id: 'course-authoring.pages-resources.xpert-unit-summary.all-units-enabled-by-default',
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
ModalDialog,
|
||||
StatefulButton,
|
||||
TransitionReplace,
|
||||
Hyperlink,
|
||||
} from '@edx/paragon';
|
||||
import { Info } from '@edx/paragon/icons';
|
||||
|
||||
@@ -31,6 +32,7 @@ import { updateXpertSettings } from '../data/thunks';
|
||||
import AppConfigFormDivider from '../../discussions/app-config-form/apps/shared/AppConfigFormDivider';
|
||||
import { PagesAndResourcesContext } from '../../PagesAndResourcesProvider';
|
||||
import messages from './messages';
|
||||
import appInfo from '../appInfo';
|
||||
|
||||
const AppSettingsForm = ({
|
||||
formikProps, children, showForm,
|
||||
@@ -115,6 +117,7 @@ const SettingsModal = ({
|
||||
onSettingsSave,
|
||||
enableAppLabel,
|
||||
enableAppHelp,
|
||||
learnMoreText,
|
||||
enableReinitialize,
|
||||
}) => {
|
||||
const { courseId } = useContext(PagesAndResourcesContext);
|
||||
@@ -156,6 +159,17 @@ const SettingsModal = ({
|
||||
}
|
||||
};
|
||||
|
||||
const learnMoreLink = appInfo.documentationLinks?.learnMoreConfiguration && (
|
||||
<Hyperlink
|
||||
className="text-primary-500"
|
||||
destination={appInfo.documentationLinks.learnMoreConfiguration}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
{learnMoreText}
|
||||
</Hyperlink>
|
||||
);
|
||||
|
||||
if (loadingStatus === RequestStatus.SUCCESSFUL) {
|
||||
return (
|
||||
<Formik
|
||||
@@ -222,6 +236,7 @@ const SettingsModal = ({
|
||||
helpText={(
|
||||
<div>
|
||||
<p>{enableAppHelp}</p>
|
||||
<span className="py-3">{learnMoreLink}</span>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
@@ -265,6 +280,7 @@ SettingsModal.propTypes = {
|
||||
onClose: PropTypes.func.isRequired,
|
||||
enableAppLabel: PropTypes.string.isRequired,
|
||||
enableAppHelp: PropTypes.string.isRequired,
|
||||
learnMoreText: PropTypes.string.isRequired,
|
||||
configureBeforeEnable: PropTypes.bool,
|
||||
enableReinitialize: PropTypes.bool,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user