feat: add framework for rwd cert projects (#44505)

* feat: add rwd cert projects

feat: save projects with flag

revert: not needed things

revert: empty line

revert: empty line

fix: it

fix: remove log

* fix: snapshot tests

* fix: show bread crumbs by default

* revert: snapshot fix

* Update curriculum/challenges/_meta/responsive-web-design-projects/meta.json

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: manuallyApproved -> isManuallyApproved

* fix: add review suggestions

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Tom
2022-01-06 07:26:54 -06:00
committed by GitHub
parent ff09b2ee43
commit b061a760c1
12 changed files with 96 additions and 33 deletions

View File

@ -2,7 +2,7 @@ const path = require('path');
const { createPoly } = require('../../../utils/polyvinyl');
const { dasherize } = require('../../../utils/slugs');
const { sortChallengeFiles } = require('../../../utils/sort-challengefiles');
const { viewTypes } = require('../challenge-types');
const { challengeTypes, viewTypes } = require('../challenge-types');
const backend = path.resolve(
__dirname,
@ -102,7 +102,8 @@ exports.createChallengePages = function (createPage) {
};
function getProjectPreviewConfig(challenge, allChallengeEdges) {
const { block, challengeOrder, usesMultifileEditor } = challenge;
const { block, challengeOrder, challengeType, usesMultifileEditor } =
challenge;
const challengesInBlock = allChallengeEdges
.filter(({ node: { challenge } }) => challenge.block === block)
@ -122,7 +123,10 @@ function getProjectPreviewConfig(challenge, allChallengeEdges) {
);
return {
showProjectPreview: challengeOrder === 0 && usesMultifileEditor,
showProjectPreview:
challengeOrder === 0 &&
usesMultifileEditor &&
challengeType !== challengeTypes.multiFileCertProject,
challengeData: {
challengeType: lastChallenge.challengeType,
challengeFiles: projectPreviewChallengeFiles,