feat(tools): better language challenge helpers (#60696)

This commit is contained in:
Tom
2025-06-12 07:54:43 -05:00
committed by GitHub
parent 98e689e2e0
commit 783421008d
11 changed files with 323 additions and 37 deletions

View File

@@ -0,0 +1,44 @@
const baseMeta = {
name: '',
isUpcomingChange: true,
dashedName: '',
superBlock: '',
order: 42,
helpCategory: '',
challengeOrder: [
{
id: '',
title: ''
}
]
};
const stepMeta = {
...baseMeta,
usesMultifileEditor: true,
hasEditableBoundaries: true
};
const quizMeta = {
...baseMeta,
blockType: 'quiz',
blockLayout: 'link'
};
const languageMeta = {
...baseMeta,
blockLayout: 'dialogue-grid'
};
export const getBaseMeta = (projectType: 'Step' | 'Quiz' | 'Language') => {
switch (projectType) {
case 'Step':
return stepMeta;
case 'Quiz':
return quizMeta;
case 'Language':
return languageMeta;
default:
return stepMeta;
}
};