Repository: freeCodeCamp/freeCodeCamp
File: shared/config/challenge-types.ts (TypeScript)

Code before:
// determine the component view for each challenge
export const viewTypes = {
  [html]: 'classic',
  [js]: 'classic',
  [jsProject]: 'classic',
  [frontEndProject]: 'frontend',
  [backEndProject]: 'backend',
  [pythonProject]: 'frontend',
  [modern]: 'modern',
  [step]: 'step',
  [quiz]: 'quiz',
  [backend]: 'backend',
  [video]: 'generic',
  [codeAllyPractice]: 'codeAlly',
  [codeAllyCert]: 'codeAlly',
  [multifileCertProject]: 'classic',
  [theOdinProject]: 'generic',
  [colab]: 'frontend',
  [exam]: 'exam',
  [msTrophy]: 'msTrophy',
  [multipleChoice]: 'generic',
  [python]: 'modern',
  [dialogue]: 'generic',
  [fillInTheBlank]: 'fillInTheBlank',
  [multifilePythonCertProject]: 'classic',
  [review]: 'generic',
  [lab]: 'classic',
  [jsLab]: 'classic',
  [pyLab]: 'classic',
  [dailyChallengeJs]: 'classic',
  [dailyChallengePy]: 'classic',
  [examDownload]: 'examDownload'
};

// determine the type of submit function to use for the challenge on completion
export const submitTypes = {
  [html]: 'tests',
  [js]: 'tests',
  [jsProject]: 'tests',
  // requires just a single url
  // like codepen.com/my-project
  [frontEndProject]: 'project.frontEnd',
  // requires two urls
  // a hosted URL where the app is running live
  // project code url like GitHub
  [backEndProject]: 'project.backEnd',
  [pythonProject]: 'project.backEnd',
  [step]: 'step',
  [quiz]: 'tests',
  [backend]: 'backend',
  [modern]: 'tests',

Review comment (suggestion):
The `'generic'` value here refers to the name of the UI:

https://github.com/freeCodeCamp/freeCodeCamp/blob/aa72a676d93b515c558c4d68f3878b6f958f1dba/client/utils/gatsby/challenge-page-creator.js#L48-L51

But heads-up: I may need to change this and create a new view for the review pages in a future PR to accommodate the side panel in the layout.


Code after:
  return noSolutions.includes(challengeType);
};

// determine the component view for each challenge
export const viewTypes = {
  [html]: 'classic',
  [js]: 'classic',
  [jsProject]: 'classic',
  [frontEndProject]: 'frontend',
  [backEndProject]: 'backend',
  [pythonProject]: 'frontend',
  [modern]: 'modern',
  [step]: 'step',
  [quiz]: 'quiz',
  [backend]: 'backend',
  [video]: 'generic',
  [codeAllyPractice]: 'codeAlly',
  [codeAllyCert]: 'codeAlly',
  [multifileCertProject]: 'classic',
  [theOdinProject]: 'generic',
  [colab]: 'frontend',
  [exam]: 'exam',
  [msTrophy]: 'msTrophy',
  [multipleChoice]: 'generic',
  [python]: 'modern',
  [dialogue]: 'generic',
  [fillInTheBlank]: 'fillInTheBlank',
  [multifilePythonCertProject]: 'classic',
  [generic]: 'generic',
  [lab]: 'classic',
  [jsLab]: 'classic',
  [pyLab]: 'classic',
  [dailyChallengeJs]: 'classic',
  [dailyChallengePy]: 'classic',
  [examDownload]: 'examDownload',
  [review]: 'generic'
};

// determine the type of submit function to use for the challenge on completion
export const submitTypes = {
  [html]: 'tests',
  [js]: 'tests',
  [jsProject]: 'tests',
  // requires just a single url
  // like codepen.com/my-project
  [frontEndProject]: 'project.frontEnd',
  // requires two urls
  // a hosted URL where the app is running live
  // project code url like GitHub
  [backEndProject]: 'project.backEnd',
  [pythonProject]: 'project.backEnd',