Skip to content

Commit 811e389

Browse files
authored
1088 (#3629)
* removing Scheme * removing Scheme * prettier * removing js-slang resolution * removing js-slang resolution
1 parent 63fdc6d commit 811e389

File tree

25 files changed

+64
-451
lines changed

25 files changed

+64
-451
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"immer": "^9.0.21",
6767
"java-slang": "^1.0.13",
6868
"js-cookie": "^3.0.5",
69-
"js-slang": "^1.0.86",
69+
"js-slang": "^1.0.88",
7070
"js-yaml": "^4.1.0",
7171
"konva": "^10.0.0",
7272
"lodash": "^4.17.21",
@@ -199,6 +199,7 @@
199199
]
200200
},
201201
"resolutions": {
202-
"cssstyle": "^4.6.0"
202+
"cssstyle": "^4.6.0",
203+
"@types/estree": "1.0.8"
203204
}
204205
}

src/commons/application/ApplicationTypes.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,13 @@ export enum StoriesRole {
131131

132132
export enum SupportedLanguage {
133133
JAVASCRIPT = 'JavaScript',
134-
SCHEME = 'Scheme',
135134
PYTHON = 'Python',
136135
JAVA = 'Java',
137136
C = 'C'
138137
}
139138

140139
export const SUPPORTED_LANGUAGES = [
141140
SupportedLanguage.JAVASCRIPT,
142-
SupportedLanguage.SCHEME,
143141
SupportedLanguage.PYTHON,
144142
SupportedLanguage.JAVA,
145143
SupportedLanguage.C
@@ -196,32 +194,6 @@ export const htmlLanguage: SALanguage = {
196194
supports: {}
197195
};
198196

199-
const schemeSubLanguages: Array<Pick<SALanguage, 'chapter' | 'variant' | 'displayName'>> = [
200-
{ chapter: Chapter.SCHEME_1, variant: Variant.EXPLICIT_CONTROL, displayName: 'Scheme \xa71' },
201-
{ chapter: Chapter.SCHEME_2, variant: Variant.EXPLICIT_CONTROL, displayName: 'Scheme \xa72' },
202-
{ chapter: Chapter.SCHEME_3, variant: Variant.EXPLICIT_CONTROL, displayName: 'Scheme \xa73' },
203-
{ chapter: Chapter.SCHEME_4, variant: Variant.EXPLICIT_CONTROL, displayName: 'Scheme \xa74' },
204-
{ chapter: Chapter.FULL_SCHEME, variant: Variant.EXPLICIT_CONTROL, displayName: 'Full Scheme' }
205-
];
206-
207-
export const schemeLanguages: SALanguage[] = schemeSubLanguages.map(sublang => {
208-
return {
209-
...sublang,
210-
mainLanguage: SupportedLanguage.SCHEME,
211-
supports: { repl: true, cseMachine: true }
212-
};
213-
});
214-
215-
export function isSchemeLanguage(chapter: Chapter): boolean {
216-
return [
217-
Chapter.SCHEME_1,
218-
Chapter.SCHEME_2,
219-
Chapter.SCHEME_3,
220-
Chapter.SCHEME_4,
221-
Chapter.FULL_SCHEME
222-
].includes(chapter);
223-
}
224-
225197
export function isCseVariant(variant: Variant): boolean {
226198
return variant == Variant.EXPLICIT_CONTROL;
227199
}
@@ -318,7 +290,6 @@ export const ALL_LANGUAGES: readonly SALanguage[] = [
318290
fullJSLanguage,
319291
fullTSLanguage,
320292
htmlLanguage,
321-
...schemeLanguages,
322293
...pyLanguages,
323294
...javaLanguages,
324295
...cLanguages

src/commons/application/__tests__/ApplicationTypes.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
ALL_LANGUAGES,
55
getLanguageConfig,
66
pyLanguages,
7-
schemeLanguages,
87
sourceLanguages
98
} from '../ApplicationTypes';
109

@@ -96,9 +95,3 @@ describe('available Python language configurations', () => {
9695
expect(pyLanguages).toMatchSnapshot();
9796
});
9897
});
99-
100-
describe('available Scheme language configurations', () => {
101-
test('matches snapshot', () => {
102-
expect(schemeLanguages).toMatchSnapshot();
103-
});
104-
});

src/commons/application/__tests__/__snapshots__/ApplicationTypes.test.ts.snap

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,61 +14,6 @@ exports[`available Python language configurations > matches snapshot 1`] = `
1414
]
1515
`;
1616

17-
exports[`available Scheme language configurations > matches snapshot 1`] = `
18-
[
19-
{
20-
"chapter": -9,
21-
"displayName": "Scheme §1",
22-
"mainLanguage": "Scheme",
23-
"supports": {
24-
"cseMachine": true,
25-
"repl": true,
26-
},
27-
"variant": "explicit-control",
28-
},
29-
{
30-
"chapter": -10,
31-
"displayName": "Scheme §2",
32-
"mainLanguage": "Scheme",
33-
"supports": {
34-
"cseMachine": true,
35-
"repl": true,
36-
},
37-
"variant": "explicit-control",
38-
},
39-
{
40-
"chapter": -11,
41-
"displayName": "Scheme §3",
42-
"mainLanguage": "Scheme",
43-
"supports": {
44-
"cseMachine": true,
45-
"repl": true,
46-
},
47-
"variant": "explicit-control",
48-
},
49-
{
50-
"chapter": -12,
51-
"displayName": "Scheme §4",
52-
"mainLanguage": "Scheme",
53-
"supports": {
54-
"cseMachine": true,
55-
"repl": true,
56-
},
57-
"variant": "explicit-control",
58-
},
59-
{
60-
"chapter": -13,
61-
"displayName": "Full Scheme",
62-
"mainLanguage": "Scheme",
63-
"supports": {
64-
"cseMachine": true,
65-
"repl": true,
66-
},
67-
"variant": "explicit-control",
68-
},
69-
]
70-
`;
71-
7217
exports[`available Source language configurations > matches snapshot 1`] = `
7318
[
7419
{

src/commons/assessmentWorkspace/__tests__/__snapshots__/AssessmentWorkspace.test.tsx.snap

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with ContestVoting quest
235235
aria-haspopup="false"
236236
aria-label="Cursor at row 1"
237237
autocapitalize="off"
238-
autocomplete="off"
239238
autocorrect="off"
240239
class="ace_text-input"
241240
role="textbox"
@@ -321,11 +320,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with ContestVoting quest
321320
</div>
322321
</div>
323322
<div
324-
class="ace_tooltip ace_gutter-tooltip"
323+
class="ace_tooltip"
325324
id="gt6"
326325
role="tooltip"
327-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
328-
tabindex="-1"
326+
style="display: none; pointer-events: auto;"
329327
/>
330328
</div>
331329
<div
@@ -779,7 +777,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with ContestVoting quest
779777
aria-haspopup="false"
780778
aria-label="Cursor at row 1"
781779
autocapitalize="off"
782-
autocomplete="off"
783780
autocorrect="off"
784781
class="ace_text-input"
785782
role="textbox"
@@ -866,11 +863,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with ContestVoting quest
866863
</div>
867864
</div>
868865
<div
869-
class="ace_tooltip ace_gutter-tooltip"
866+
class="ace_tooltip"
870867
id="gt7"
871868
role="tooltip"
872-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
873-
tabindex="-1"
869+
style="display: none; pointer-events: auto;"
874870
/>
875871
</div>
876872
<div
@@ -1566,7 +1562,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with MCQ question render
15661562
aria-haspopup="false"
15671563
aria-label="Cursor at row 1"
15681564
autocapitalize="off"
1569-
autocomplete="off"
15701565
autocorrect="off"
15711566
class="ace_text-input"
15721567
role="textbox"
@@ -1653,11 +1648,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with MCQ question render
16531648
</div>
16541649
</div>
16551650
<div
1656-
class="ace_tooltip ace_gutter-tooltip"
1651+
class="ace_tooltip"
16571652
id="gt5"
16581653
role="tooltip"
1659-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
1660-
tabindex="-1"
1654+
style="display: none; pointer-events: auto;"
16611655
/>
16621656
</div>
16631657
<div
@@ -1913,7 +1907,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with overdue assessment
19131907
aria-haspopup="false"
19141908
aria-label="Cursor at row 1"
19151909
autocapitalize="off"
1916-
autocomplete="off"
19171910
autocorrect="off"
19181911
class="ace_text-input"
19191912
role="textbox"
@@ -1999,11 +1992,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with overdue assessment
19991992
</div>
20001993
</div>
20011994
<div
2002-
class="ace_tooltip ace_gutter-tooltip"
1995+
class="ace_tooltip"
20031996
id="gt3"
20041997
role="tooltip"
2005-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
2006-
tabindex="-1"
1998+
style="display: none; pointer-events: auto;"
20071999
/>
20082000
</div>
20092001
<div
@@ -2400,7 +2392,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with overdue assessment
24002392
aria-haspopup="false"
24012393
aria-label="Cursor at row 1"
24022394
autocapitalize="off"
2403-
autocomplete="off"
24042395
autocorrect="off"
24052396
class="ace_text-input"
24062397
role="textbox"
@@ -2487,11 +2478,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with overdue assessment
24872478
</div>
24882479
</div>
24892480
<div
2490-
class="ace_tooltip ace_gutter-tooltip"
2481+
class="ace_tooltip"
24912482
id="gt4"
24922483
role="tooltip"
2493-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
2494-
tabindex="-1"
2484+
style="display: none; pointer-events: auto;"
24952485
/>
24962486
</div>
24972487
<div
@@ -2777,7 +2767,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with programming questio
27772767
aria-haspopup="false"
27782768
aria-label="Cursor at row 1"
27792769
autocapitalize="off"
2780-
autocomplete="off"
27812770
autocorrect="off"
27822771
class="ace_text-input"
27832772
role="textbox"
@@ -2863,11 +2852,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with programming questio
28632852
</div>
28642853
</div>
28652854
<div
2866-
class="ace_tooltip ace_gutter-tooltip"
2855+
class="ace_tooltip"
28672856
id="gt1"
28682857
role="tooltip"
2869-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
2870-
tabindex="-1"
2858+
style="display: none; pointer-events: auto;"
28712859
/>
28722860
</div>
28732861
<div
@@ -3264,7 +3252,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with programming questio
32643252
aria-haspopup="false"
32653253
aria-label="Cursor at row 1"
32663254
autocapitalize="off"
3267-
autocomplete="off"
32683255
autocorrect="off"
32693256
class="ace_text-input"
32703257
role="textbox"
@@ -3351,11 +3338,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace page with programming questio
33513338
</div>
33523339
</div>
33533340
<div
3354-
class="ace_tooltip ace_gutter-tooltip"
3341+
class="ace_tooltip"
33553342
id="gt2"
33563343
role="tooltip"
3357-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
3358-
tabindex="-1"
3344+
style="display: none; pointer-events: auto;"
33593345
/>
33603346
</div>
33613347
<div
@@ -3641,7 +3627,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace renders Grading tab correctly
36413627
aria-haspopup="false"
36423628
aria-label="Cursor at row 1"
36433629
autocapitalize="off"
3644-
autocomplete="off"
36453630
autocorrect="off"
36463631
class="ace_text-input"
36473632
role="textbox"
@@ -3727,11 +3712,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace renders Grading tab correctly
37273712
</div>
37283713
</div>
37293714
<div
3730-
class="ace_tooltip ace_gutter-tooltip"
3715+
class="ace_tooltip"
37313716
id="gt8"
37323717
role="tooltip"
3733-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
3734-
tabindex="-1"
3718+
style="display: none; pointer-events: auto;"
37353719
/>
37363720
</div>
37373721
<div
@@ -4345,7 +4329,6 @@ exports[`AssessmentWorkspace > AssessmentWorkspace renders Grading tab correctly
43454329
aria-haspopup="false"
43464330
aria-label="Cursor at row 1"
43474331
autocapitalize="off"
4348-
autocomplete="off"
43494332
autocorrect="off"
43504333
class="ace_text-input"
43514334
role="textbox"
@@ -4432,11 +4415,10 @@ exports[`AssessmentWorkspace > AssessmentWorkspace renders Grading tab correctly
44324415
</div>
44334416
</div>
44344417
<div
4435-
class="ace_tooltip ace_gutter-tooltip"
4418+
class="ace_tooltip"
44364419
id="gt9"
44374420
role="tooltip"
4438-
style="display: none; white-space: pre-wrap; pointer-events: auto;"
4439-
tabindex="-1"
4421+
style="display: none; pointer-events: auto;"
44404422
/>
44414423
</div>
44424424
<div

src/commons/controlBar/LegacyControlBarChapterSelect.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
javaLanguages,
1212
pyLanguages,
1313
SALanguage,
14-
schemeLanguages,
1514
sourceLanguages,
1615
styliseSublanguage
1716
} from '../application/ApplicationTypes';
@@ -86,7 +85,6 @@ export const LegacyControlBarChapterSelect: React.FC<ControlBarChapterSelectProp
8685
// for public deployments. HTML, while sandboxed, is treated the same way to be safe.
8786
// See https://github.com/source-academy/frontend/pull/2460#issuecomment-1528759912
8887
...(Constants.playgroundOnly ? [fullJSLanguage, fullTSLanguage, htmlLanguage] : []),
89-
...schemeLanguages,
9088
...pyLanguages,
9189
...javaLanguages
9290
];

src/commons/navigationBar/subcomponents/LegacyNavigationBarLangSelectButton.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
javaLanguages,
88
pyLanguages,
99
SALanguage,
10-
schemeLanguages,
1110
sourceLanguages,
1211
SUPPORTED_LANGUAGES,
1312
SupportedLanguage
@@ -26,7 +25,6 @@ const LegacyNavigationBarLangSelectButton = () => {
2625
const defaultSublanguages: { [lang in SupportedLanguage]: SALanguage } = {
2726
[SupportedLanguage.JAVASCRIPT]: sourceLanguages[0],
2827
[SupportedLanguage.PYTHON]: pyLanguages[0],
29-
[SupportedLanguage.SCHEME]: schemeLanguages[0],
3028
[SupportedLanguage.JAVA]: javaLanguages[0],
3129
[SupportedLanguage.C]: cLanguages[0]
3230
};

0 commit comments

Comments
 (0)