fix(curriculum,schema): allow A2 and B1 English to have block label (#65052)

This commit is contained in:
Huyen Nguyen
2026-01-09 20:50:58 +07:00
committed by GitHub
parent 78a1993095
commit 0a5551d302
8 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ type InteractiveEditorNodule = {
export type ChallengeNode = {
challenge: {
block: string;
blockLabel: BlockLabel;
blockLabel?: BlockLabel;
blockLayout: BlockLayouts;
certification: string;
challengeOrder: number;
@@ -49,7 +49,7 @@ interface ModuleProps {
interface Challenge {
id: string;
block: string;
blockLabel: BlockLabel;
blockLabel?: BlockLabel;
title: string;
fields: { slug: string };
dashedName: string;
@@ -236,7 +236,7 @@ const LinkModule = ({
<li className='link-block'>
<Block
block={challenges[0].block}
blockLabel={label}
blockLabel={label || null}
challenges={challenges}
superBlock={superBlock}
accordion={accordion}
@@ -32,7 +32,7 @@ import './super-block-accordion.css';
type Challenge = {
block: string;
blockLabel: BlockLabel;
blockLabel?: BlockLabel;
blockLayout: BlockLayouts;
challengeType: number;
dashedName: string;
@@ -156,7 +156,7 @@ type ChallengeNode = {
id: string;
fields: { slug: string; blockName: string };
block: string;
blockLabel: BlockLabel;
blockLabel?: BlockLabel;
challengeType: number;
title: string;
order: number;
@@ -58,7 +58,7 @@ type ChallengeNode = {
fields: { slug: string };
id: string;
block: string;
blockLabel: BlockLabel;
blockLabel?: BlockLabel;
challengeType: number;
title: string;
order: number;
+1 -1
View File
@@ -145,7 +145,7 @@ const schema = Joi.object().keys({
'learn',
'practice'
).required(),
otherwise: Joi.valid(null)
otherwise: Joi.optional()
}),
blockLayout: Joi.valid(
'challenge-list',
+2 -1
View File
@@ -6,6 +6,7 @@ import { fileURLToPath } from 'node:url';
import debug from 'debug';
import type { Chapter } from '../../shared-dist/config/chapters.js';
import type { BlockLabel } from '../../shared-dist/config/blocks.js';
import type {
SuperBlocks,
ChallengeLang
@@ -169,7 +170,7 @@ export interface BlockStructure {
disableLoopProtectTests?: boolean;
disableLoopProtectPreview?: boolean;
blockLayout: string;
blockLabel: string;
blockLabel?: BlockLabel;
challengeOrder: Challenge[];
dashedName: string;
isUpcomingChange?: boolean;
@@ -3,12 +3,13 @@ import {
getBlockStructure,
writeBlockStructure
} from '../../../curriculum/src/file-handler.js';
import type { BlockLabel } from '../../../shared-dist/config/blocks.js';
import { getProjectPath } from './get-project-info.js';
export type Meta = {
name: string;
blockLayout: string;
blockLabel: string;
blockLabel?: BlockLabel;
isUpcomingChange: boolean;
dashedName: string;
helpCategory: string;