@@ -37,9 +37,9 @@ function getNodeLabel(node: TreeNode, depth: string = ""): string {
37
37
if ( isHeader ) {
38
38
return `${ depth } ${ chalk . blue ( label ) } ` ;
39
39
} else if ( ! unlocked ) {
40
- return `${ depth } ${ label } 🔒 ` ;
40
+ return `${ depth } ${ chalk . dim ( label ) } ` ;
41
41
} else if ( isChallenge ) {
42
- return `${ depth } ${ label } ${ completed ? "🏆" : "🗝️ " } ` ;
42
+ return `${ depth } ${ label } ${ completed ? "🏆" : "" } ` ;
43
43
} else if ( isQuiz ) {
44
44
return `${ depth } ${ label } 📜` ;
45
45
} else if ( isCapstoneProject ) {
@@ -60,7 +60,7 @@ async function selectNode(node: TreeNode): Promise<void> {
60
60
// - Show instructions for completing the challenge including a simple command to test their code
61
61
// submit project, check if project passes tests then send proof of completion to the BG server, if it passes, mark the challenge as completed
62
62
if ( node . type !== "header" && ! node . unlocked ) {
63
- console . log ( "This challenge is locked because it doesn't exist yet... 😅 " ) ;
63
+ console . log ( "This challenge doesn't exist yet. 🤔 Consider contributing to the project here: https://github.com/BuidlGuidl/eth-tech-tree-challenges " ) ;
64
64
await pressEnterToContinue ( ) ;
65
65
console . clear ( ) ;
66
66
await startVisualization ( header ) ;
@@ -233,12 +233,14 @@ export function buildTree(): TreeNode {
233
233
return { label, name, level, type, actions, completed, childrenNames, parentName, unlocked, message : description } ;
234
234
} ) ;
235
235
const nestedChallenges = nestingMagic ( transformedChallenges ) ;
236
+
237
+ const sortedByUnlocked = nestedChallenges . sort ( ( a : TreeNode , b : TreeNode ) => { return a . unlocked ? - 1 : 1 } ) ;
236
238
237
239
tree . push ( {
238
240
type : "header" ,
239
241
label : `${ tag } ${ chalk . green ( `(${ completedCount } /${ filteredChallenges . length } )` ) } ` ,
240
242
name : `${ tag . toLowerCase ( ) } ` ,
241
- children : nestedChallenges ,
243
+ children : sortedByUnlocked ,
242
244
recursive : true
243
245
} ) ;
244
246
}
0 commit comments