From 4a24d25f223c4a360e0aebb4f2db58ca799d7b0c Mon Sep 17 00:00:00 2001
From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com>
Date: Wed, 1 Mar 2023 13:06:49 -0800
Subject: [PATCH] feat: update switch to Advanced Editor warning (#259)
---
.../SettingsWidget/messages.js | 13 ++++++++----
.../SwitchToAdvancedEditorCard.jsx | 3 ++-
.../SwitchToAdvancedEditorCard.test.jsx.snap | 20 ++++++++++++++-----
3 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js
index 1a5bafb9e..f1445d2bd 100644
--- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js
+++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/messages.js
@@ -179,10 +179,15 @@ export const messages = {
defaultMessage: 'Switch to advanced editor',
description: 'button to switch to the advanced mode of the editor.',
},
- ConfirmSwitchMessage: {
- id: 'authoring.problemeditor.settings.switchtoadvancededitor.message',
- defaultMessage: 'If you use the advanced editor, this problem will be converted to OLX and you will not be able to return to the simple editor.',
- description: 'message to confirm that a user wants to use the advanced editor',
+ ConfirmSwitchMessageOne: {
+ id: 'authoring.problemeditor.settings.switchtoadvancededitor.message.one',
+ defaultMessage: 'If you use the advanced editor, \r this problem will be converted to OLX and you will not be able to return to the simple editor.',
+ description: 'message to confirm that a user wants to use the advanced editor part 1',
+ },
+ ConfirmSwitchMessageTwo: {
+ id: 'authoring.problemeditor.settings.switchtoadvancededitor.message.two',
+ defaultMessage: 'Any changes made after the last Save action will be lost when converting to OLX.',
+ description: 'message to confirm that a user wants to use the advanced editor part 2',
},
ConfirmSwitchMessageTitle: {
id: 'authoring.problemeditor.settings.switchtoadvancededitor.message',
diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/SwitchToAdvancedEditorCard.jsx b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/SwitchToAdvancedEditorCard.jsx
index 3b00cdab7..32c291182 100644
--- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/SwitchToAdvancedEditorCard.jsx
+++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/SwitchToAdvancedEditorCard.jsx
@@ -34,7 +34,8 @@ export const SwitchToAdvancedEditorCard = ({
)}
size="md"
>
-
+
+