refactor: display solutions (#45139)

* refactor: re-organise show-project-links

* refactor: update ChallengeFile's declared shape

* fix: handle missing challenge solution

* refactor: use display function for Certification

* refactor: use display function for TimeLine

* refactor: use common component for timeline + cert

* fix: handle legacy solutions

* refactor: use widget for certifications

* refactor: reorganise ShowDisplayWidget

* refactor: remove unused ids

* test: pass dataCy, not projectTitle, to widget

* chore: kebabify

* revert: add id back for dropdown

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* revert: add the ids back

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2022-02-16 22:48:22 +01:00
committed by GitHub
parent 92778f1b2f
commit b223cdd255
15 changed files with 285 additions and 210 deletions

View File

@ -1,5 +1,8 @@
exports.challengeFiles = [
import { ChallengeFile } from "../../client/src/redux/prop-types";
export const challengeFiles: ChallengeFile[] = [
{
id: '1',
contents: 'some css',
error: null,
ext: 'css',
@ -7,11 +10,13 @@ exports.challengeFiles = [
history: ['styles.css'],
fileKey: 'stylescss',
name: 'styles',
path: 'styles.css',
seed: 'some css',
tail: ''
tail: '',
editableRegionBoundaries: [],
usesMultifileEditor: true,
},
{
id: '2',
contents: 'some html',
error: null,
ext: 'html',
@ -19,11 +24,13 @@ exports.challengeFiles = [
history: ['index.html'],
fileKey: 'indexhtml',
name: 'index',
path: 'index.html',
seed: 'some html',
tail: ''
tail: '',
editableRegionBoundaries: [],
usesMultifileEditor: true,
},
{
id: '3',
contents: 'some js',
error: null,
ext: 'js',
@ -31,11 +38,13 @@ exports.challengeFiles = [
history: ['script.js'],
fileKey: 'scriptjs',
name: 'script',
path: 'script.js',
seed: 'some js',
tail: ''
tail: '',
editableRegionBoundaries: [],
usesMultifileEditor: true,
},
{
id: '4',
contents: 'some jsx',
error: null,
ext: 'jsx',
@ -43,8 +52,9 @@ exports.challengeFiles = [
history: ['index.jsx'],
fileKey: 'indexjsx',
name: 'index',
path: 'index.jsx',
seed: 'some jsx',
tail: ''
tail: '',
editableRegionBoundaries: [],
usesMultifileEditor: true,
}
];
]