Skip to content

Commit c4976b6

Browse files
committed
fix(passage): fix validation and update controller default values PD-4068 PD-4006
1 parent ce15142 commit c4976b6

6 files changed

Lines changed: 173 additions & 132 deletions

File tree

packages/passage/configure/src/__tests__/__snapshots__/main.test.js.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ exports[`Render Main Component Match Snapshot 1`] = `
174174
>
175175
<InputContainer
176176
className="mockInputContainer"
177-
label="Title"
177+
label="Teacher Instructions"
178178
>
179179
<EditableHtml
180180
activePlugins={
@@ -219,13 +219,15 @@ exports[`Render Main Component Match Snapshot 1`] = `
219219
"mmlOutput": false,
220220
}
221221
}
222+
maxImageHeight={300}
223+
maxImageWidth={300}
222224
nonEmpty={false}
223225
onChange={[Function]}
224226
onDone={[Function]}
225227
pluginProps={
226228
Object {
227229
"audio": Object {
228-
"disabled": true,
230+
"disabled": false,
229231
},
230232
"blockquote": Object {
231233
"disabled": true,
@@ -234,18 +236,18 @@ exports[`Render Main Component Match Snapshot 1`] = `
234236
"disabled": true,
235237
},
236238
"image": Object {
237-
"disabled": true,
239+
"disabled": false,
238240
},
239241
"video": Object {
240-
"disabled": true,
242+
"disabled": false,
241243
},
242244
}
243245
}
244246
/>
245247
</InputContainer>
246248
<InputContainer
247249
className="mockInputContainer"
248-
label="Subtitle"
250+
label="Title"
249251
>
250252
<EditableHtml
251253
activePlugins={
@@ -316,7 +318,7 @@ exports[`Render Main Component Match Snapshot 1`] = `
316318
</InputContainer>
317319
<InputContainer
318320
className="mockInputContainer"
319-
label="Author"
321+
label="Subtitle"
320322
>
321323
<EditableHtml
322324
activePlugins={
@@ -387,7 +389,7 @@ exports[`Render Main Component Match Snapshot 1`] = `
387389
</InputContainer>
388390
<InputContainer
389391
className="mockInputContainer"
390-
label="Teacher Instructions"
392+
label="Author"
391393
>
392394
<EditableHtml
393395
activePlugins={
@@ -432,15 +434,13 @@ exports[`Render Main Component Match Snapshot 1`] = `
432434
"mmlOutput": false,
433435
}
434436
}
435-
maxImageHeight={300}
436-
maxImageWidth={300}
437437
nonEmpty={false}
438438
onChange={[Function]}
439439
onDone={[Function]}
440440
pluginProps={
441441
Object {
442442
"audio": Object {
443-
"disabled": false,
443+
"disabled": true,
444444
},
445445
"blockquote": Object {
446446
"disabled": true,
@@ -449,10 +449,10 @@ exports[`Render Main Component Match Snapshot 1`] = `
449449
"disabled": true,
450450
},
451451
"image": Object {
452-
"disabled": false,
452+
"disabled": true,
453453
},
454454
"video": Object {
455-
"disabled": false,
455+
"disabled": true,
456456
},
457457
}
458458
}

packages/passage/configure/src/defaults.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ export default {
33
teacherInstructionsEnabled: true,
44
titleEnabled: true,
55
subtitleEnabled: true,
6-
textEnabled: true,
76
authorEnabled: true,
7+
textEnabled: true,
88
passages: [
99
{
1010
teacherInstructions: '',
1111
title: '',
1212
subtitle: '',
1313
author: '',
1414
text: '',
15-
}
15+
},
1616
],
1717
},
1818
configuration: {
@@ -42,7 +42,7 @@ export default {
4242
video: { disabled: true },
4343
image: { disabled: true },
4444
},
45-
required: false
45+
required: false,
4646
},
4747
author: {
4848
settings: true,
@@ -52,7 +52,7 @@ export default {
5252
video: { disabled: true },
5353
image: { disabled: true },
5454
},
55-
required: false
55+
required: false,
5656
},
5757
text: {
5858
settings: true,
@@ -64,7 +64,7 @@ export default {
6464
h3: { disabled: false },
6565
blockquote: { disabled: false },
6666
},
67-
required: true
67+
required: true,
6868
},
6969
teacherInstructions: {
7070
settings: true,
@@ -78,7 +78,7 @@ export default {
7878
},
7979
maxImageWidth: {
8080
teacherInstructions: 300,
81-
text:300,
81+
text: 300,
8282
},
8383
maxImageHeight: {
8484
teacherInstructions: 300,

0 commit comments

Comments
 (0)