refactor(tools,client): remove head and tail logic (#66524)

This commit is contained in:
Sem Bauke
2026-03-17 17:59:16 +01:00
committed by GitHub
parent 1990ba6794
commit e66bf09dce
34 changed files with 24 additions and 998 deletions
@@ -97,8 +97,6 @@ function formatChallengeData({
name: 'script',
ext: 'js',
contents: javascript.challengeFiles[0].contents,
head: '',
tail: '',
path: '',
history: ['script.js'],
fileKey: 'scriptjs'
@@ -123,9 +121,7 @@ function formatChallengeData({
ext: 'py',
name: 'main',
contents: python.challengeFiles[0].contents,
head: '',
path: '',
tail: '',
editableRegionBoundaries: [],
history: ['main.py']
}
-4
View File
@@ -211,7 +211,6 @@ export type ChallengeNode = {
fields: Fields;
fillInTheBlank: FillInTheBlank;
forumTopicId: number;
head: string[];
hasEditableBoundaries: boolean;
helpCategory: string;
hooks?: Hooks;
@@ -245,7 +244,6 @@ export type ChallengeNode = {
sourceInstanceName: string;
superOrder: number;
superBlock: SuperBlocks;
tail: string[];
template: string;
tests: Test[];
title: string;
@@ -548,11 +546,9 @@ export type ExperienceData = {
export type FileKeyChallenge = {
contents: string;
ext: Ext;
head: string;
id: string;
key: string;
name: string;
tail: string;
};
export type ChallengeFiles = ChallengeFile[] | null;
@@ -10,8 +10,6 @@ const jsChallenge = {
fileKey: 'jsFileKey',
name: 'name',
ext: 'js' as const,
head: 'head',
tail: 'tail',
history: [],
seed: 'original js contents',
path: 'index.js'
@@ -22,8 +20,6 @@ const cssChallenge = {
fileKey: 'cssFileKey',
name: 'name',
ext: 'css' as const,
head: 'head',
tail: 'tail',
history: [],
seed: 'original css contents',
path: 'styles.css'
@@ -34,8 +30,6 @@ const htmlChallenge = {
fileKey: 'htmlFileKey',
name: 'name',
ext: 'html' as const,
head: 'head',
tail: 'tail',
history: [],
seed: 'original html contents',
path: 'index.html'
@@ -39,7 +39,6 @@ const defaultProps = {
fields: {} as Fields,
forumTopicId: 12345,
guideUrl: 'https://mockurl.com',
head: ['mockHead'],
hasEditableBoundaries: false,
helpCategory: 'mockHelpCategory',
id: 'mockId',
@@ -70,7 +69,6 @@ const defaultProps = {
sourceInstanceName: 'mockSourceInstanceName',
superOrder: 1,
superBlock: SuperBlocks.FullStackDeveloperV9,
tail: ['mockTail'],
template: 'mockTemplate',
tests: [] as Test[],
title: 'mockTitle',