From fbf6a0d240214aeab363847356a3f811cec3c052 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Tue, 17 Dec 2024 02:36:47 +0100 Subject: [PATCH] feat: prep semantic html for release (#57539) --- client/i18n/locales/english/intro.json | 1 + .../Introduction/components/super-block-accordion.tsx | 5 ++++- curriculum/challenges/_meta/lab-event-hub/meta.json | 2 +- .../_meta/lecture-importance-of-semantic-html/meta.json | 4 ++-- curriculum/challenges/_meta/quiz-semantic-html/meta.json | 2 +- .../challenges/_meta/review-semantic-html/meta.json | 2 +- curriculum/challenges/_meta/workshop-blog-page/meta.json | 2 +- curriculum/superblock-structure/full-stack.json | 5 ++++- curriculum/test/test-challenges.js | 9 +++++++-- 9 files changed, 22 insertions(+), 10 deletions(-) diff --git a/client/i18n/locales/english/intro.json b/client/i18n/locales/english/intro.json index 12f17a1aa1a534..4a5bd4481830c7 100644 --- a/client/i18n/locales/english/intro.json +++ b/client/i18n/locales/english/intro.json @@ -1718,6 +1718,7 @@ "semantic-html": "Semantic HTML", "html-forms-and-tables": "Forms and Tables", "html-and-accessibility": "Accessibility", + "review-html": "HTML Review", "computer-basics": "Computer Basics", "basic-css": "Basic CSS", "design-for-developers": "Design", diff --git a/client/src/templates/Introduction/components/super-block-accordion.tsx b/client/src/templates/Introduction/components/super-block-accordion.tsx index 641591f935c284..4c7a25521434df 100644 --- a/client/src/templates/Introduction/components/super-block-accordion.tsx +++ b/client/src/templates/Introduction/components/super-block-accordion.tsx @@ -41,9 +41,12 @@ type Module = { blocks: { dashedName: string; }[]; + moduleType?: string; }; -const modules = superBlockStructure.chapters.flatMap(({ modules }) => modules); +const modules = superBlockStructure.chapters.flatMap( + ({ modules }) => modules +); const chapters = superBlockStructure.chapters; const isLinkModule = (name: string) => { diff --git a/curriculum/challenges/_meta/lab-event-hub/meta.json b/curriculum/challenges/_meta/lab-event-hub/meta.json index e3fc68f7c4bd77..c78f781ee1fc22 100644 --- a/curriculum/challenges/_meta/lab-event-hub/meta.json +++ b/curriculum/challenges/_meta/lab-event-hub/meta.json @@ -2,7 +2,7 @@ "name": "Build an Event Hub", "blockType": "lab", "blockLayout": "link", - "isUpcomingChange": true, + "isUpcomingChange": false, "usesMultifileEditor": true, "dashedName": "lab-event-hub", "superBlock": "full-stack-developer", diff --git a/curriculum/challenges/_meta/lecture-importance-of-semantic-html/meta.json b/curriculum/challenges/_meta/lecture-importance-of-semantic-html/meta.json index 29b3f63af10d97..f17979ee28cbe7 100644 --- a/curriculum/challenges/_meta/lecture-importance-of-semantic-html/meta.json +++ b/curriculum/challenges/_meta/lecture-importance-of-semantic-html/meta.json @@ -2,7 +2,7 @@ "name": "Importance of Semantic HTML", "blockType": "lecture", "blockLayout": "challenge-list", - "isUpcomingChange": true, + "isUpcomingChange": false, "dashedName": "lecture-importance-of-semantic-html", "superBlock": "full-stack-developer", "challengeOrder": [ @@ -60,4 +60,4 @@ } ], "helpCategory": "HTML-CSS" -} \ No newline at end of file +} diff --git a/curriculum/challenges/_meta/quiz-semantic-html/meta.json b/curriculum/challenges/_meta/quiz-semantic-html/meta.json index 937d9022d54d92..3a4021c2abc22a 100644 --- a/curriculum/challenges/_meta/quiz-semantic-html/meta.json +++ b/curriculum/challenges/_meta/quiz-semantic-html/meta.json @@ -2,7 +2,7 @@ "name": "Semantic HTML Quiz", "blockType": "quiz", "blockLayout": "link", - "isUpcomingChange": true, + "isUpcomingChange": false, "dashedName": "quiz-semantic-html", "superBlock": "full-stack-developer", "challengeOrder": [{ "id": "66ed903cf45ce3ece4053ebe", "title": "Semantic HTML Quiz" }], diff --git a/curriculum/challenges/_meta/review-semantic-html/meta.json b/curriculum/challenges/_meta/review-semantic-html/meta.json index b8b3aadcdfb035..fcd60f15836e2e 100644 --- a/curriculum/challenges/_meta/review-semantic-html/meta.json +++ b/curriculum/challenges/_meta/review-semantic-html/meta.json @@ -2,7 +2,7 @@ "name": "Semantic HTML Review", "blockType": "review", "blockLayout": "link", - "isUpcomingChange": true, + "isUpcomingChange": false, "dashedName": "review-semantic-html", "superBlock": "full-stack-developer", "challengeOrder": [ diff --git a/curriculum/challenges/_meta/workshop-blog-page/meta.json b/curriculum/challenges/_meta/workshop-blog-page/meta.json index 89664216230452..30cf443009bcf5 100644 --- a/curriculum/challenges/_meta/workshop-blog-page/meta.json +++ b/curriculum/challenges/_meta/workshop-blog-page/meta.json @@ -2,7 +2,7 @@ "name": "Build a Cat Blog Page", "blockType": "workshop", "blockLayout": "challenge-grid", - "isUpcomingChange": true, + "isUpcomingChange": false, "usesMultifileEditor": true, "hasEditableBoundaries": true, "dashedName": "workshop-blog-page", diff --git a/curriculum/superblock-structure/full-stack.json b/curriculum/superblock-structure/full-stack.json index d1dcaddbec63db..52bd1a2a6a430e 100644 --- a/curriculum/superblock-structure/full-stack.json +++ b/curriculum/superblock-structure/full-stack.json @@ -12,10 +12,10 @@ }, { "dashedName": "html", - "comingSoon": true, "modules": [ { "dashedName": "basic-html", + "comingSoon": true, "blocks": [ { "dashedName": "lecture-what-is-html" }, { "dashedName": "workshop-cat-photo-app" }, @@ -41,6 +41,7 @@ }, { "dashedName": "html-forms-and-tables", + "comingSoon": true, "blocks": [ { "dashedName": "lecture-working-with-forms" }, { "dashedName": "workshop-hotel-feedback-form" }, @@ -55,6 +56,7 @@ }, { "dashedName": "html-and-accessibility", + "comingSoon": true, "blocks": [ { "dashedName": "lecture-importance-of-accessibility-and-good-html-structure" @@ -66,6 +68,7 @@ }, { "moduleType": "review", + "comingSoon": true, "dashedName": "review-html", "blocks": [{ "dashedName": "review-html" }] } diff --git a/curriculum/test/test-challenges.js b/curriculum/test/test-challenges.js index ac6a9e5d00e923..f156495cddf556 100644 --- a/curriculum/test/test-challenges.js +++ b/curriculum/test/test-challenges.js @@ -51,6 +51,7 @@ const { createHeader, testId } = require('../../client/src/templates/Challenges/utils/frame'); +const { SuperBlocks } = require('../../shared/config/curriculum'); const ChallengeTitles = require('./utils/challenge-titles'); const MongoIds = require('./utils/mongo-ids'); const createPseudoWorker = require('./utils/pseudo-worker'); @@ -314,8 +315,12 @@ function populateTestsForLang({ lang, challenges, meta, superBlocks }) { ); }); filteredMeta.forEach((meta, index) => { - // ignore block order for upcoming blocks - if (!meta.isUpcomingChange) { + // Upcoming changes are in developmen so are not required to be in + // order. FullStackDeveloper does not use the meta for order. + if ( + !meta.isUpcomingChange && + meta.superBlock !== SuperBlocks.FullStackDeveloper + ) { it(`${meta.superBlock} ${meta.name} must be in order`, function () { assert.equal(meta.order, index); });