Skip to content

Commit 7a1bc39

Browse files
authored
fix: don't revert to advanced editor if block contains copied_from fields (#2661) (#2695)
(cherry picked from commit 2215fc5)
1 parent 9bea56b commit 7a1bc39

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/editors/containers/ProblemEditor/data/mockData/olxTestData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// lint is disabled for this file due to strict spacing
33

44
export const checkboxesOLXWithFeedbackAndHintsOLX = {
5-
rawOLX: `<problem url_name="this_should_be_ignored">
5+
rawOLX: `<problem url_name="this_should_be_ignored" copied_from_version="2" copied_from_block="some-block">
66
<choiceresponse>
77
<p>You can use this template as a guide to the simple editor markdown and OLX markup to use for checkboxes with hints and feedback problems. Edit this component to replace this template with your own assessment.</p>
88
<label>Add the question text, or prompt, here. This text is required.</label>

src/editors/data/constants/problem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ export const ignoredOlxAttributes = [
380380
'@_url_name',
381381
'@_x-is-pointer-node',
382382
'@_markdown_edited',
383+
'@_copied_from_block',
384+
'@_copied_from_version',
383385
] as const;
384386

385387
// Useful for the block creation workflow.

src/library-authoring/components/BaseCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const BaseCard = ({
6464
<Card.Header
6565
className={`library-item-header ${getComponentStyleColor(itemType)}`}
6666
title={
67-
<Icon src={itemIcon} className="library-item-header-icon" />
67+
<Icon src={itemIcon} className="library-item-header-icon my-2" />
6868
}
6969
actions={(
7070
<div

0 commit comments

Comments
 (0)