Skip to content

Commit 6b9266a

Browse files
committed
Update topics page to release new topics and remove older "New" badges
# There's now some checking to make sure that you cannot have a topic that # is both "New" and "Coming soon". Before it was the case that if a topic # wasn't marked as "Coming soon" then it was automatically marked as new.
1 parent 836e8f3 commit 6b9266a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/app/components/pages/AllTopics.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ export const AllTopics = () => {
2020
</TextTag>
2121
</Link>
2222
{" "}
23-
{topic.comingSoon ?
24-
<Badge color="light" className="border bg-white">Coming soon</Badge> :
25-
<Badge color="secondary">New</Badge>
26-
}
23+
{topic.comingSoon && !topic.new && <Badge color="light" className="border bg-white">Coming soon</Badge>}
24+
{topic.new && !topic.comingSoon && <Badge color="secondary">New</Badge>}
2725
</React.Fragment>;
2826
};
2927

src/app/services/tags.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {EXAM_BOARD, TAG_HIERARCHY, TAG_ID, TAG_LEVEL} from "./constants";
1+
import {TAG_HIERARCHY, TAG_ID, TAG_LEVEL} from "./constants";
22

33
// TODO this file would benefit from refactoring to being more OO. Many of its contents are lifted form Isaac Physics
44

@@ -7,6 +7,7 @@ interface BaseTag {
77
title: string;
88
parent?: TAG_ID;
99
comingSoon?: boolean;
10+
new?: boolean;
1011
}
1112
export interface Tag extends BaseTag {
1213
type: TAG_LEVEL;
@@ -34,9 +35,9 @@ const baseTags: BaseTag[] = [
3435
{id: TAG_ID.gcseProgrammingConcepts, title: "Programming concepts", parent: TAG_ID.gcseToALevel},
3536
{id: TAG_ID.gcseNetworking, title: "Networking", parent: TAG_ID.gcseToALevel, comingSoon: true},
3637
{id: TAG_ID.gcseDataRepresentation, title: "Data representation", parent: TAG_ID.gcseToALevel},
37-
{id: TAG_ID.gcseSystems, title: "Systems", parent: TAG_ID.gcseToALevel, comingSoon: true},
38+
{id: TAG_ID.gcseSystems, title: "Systems", parent: TAG_ID.gcseToALevel, new: true},
3839
// Data structures and algorithms topics
39-
{id: TAG_ID.searchingSortingPathfinding, title: "Searching, sorting & pathfinding", parent: TAG_ID.dataStructuresAndAlgorithms, comingSoon: true},
40+
{id: TAG_ID.searchingSortingPathfinding, title: "Searching, sorting & pathfinding", parent: TAG_ID.dataStructuresAndAlgorithms, new: true},
4041
{id: TAG_ID.complexity, title: "Complexity", parent: TAG_ID.dataStructuresAndAlgorithms, comingSoon: true},
4142
{id: TAG_ID.modelsOfComputation, title: "Models of computation", parent: TAG_ID.dataStructuresAndAlgorithms, comingSoon: true},
4243
{id: TAG_ID.planningAndDebugging, title: "Planning and debugging", parent: TAG_ID.dataStructuresAndAlgorithms, comingSoon: true},
@@ -51,7 +52,7 @@ const baseTags: BaseTag[] = [
5152
{id: TAG_ID.booleanLogic, title: "Boolean logic", parent: TAG_ID.computerSystems},
5253
{id: TAG_ID.architecture, title: "Architecture", parent: TAG_ID.computerSystems, comingSoon: true},
5354
{id: TAG_ID.hardware, title: "Hardware", parent: TAG_ID.computerSystems, comingSoon: true},
54-
{id: TAG_ID.operatingSystemsAndSoftware, title: "Operating systems and software", parent: TAG_ID.computerSystems, comingSoon: true},
55+
{id: TAG_ID.operatingSystemsAndSoftware, title: "Operating systems and software", parent: TAG_ID.computerSystems, new: true},
5556
{id: TAG_ID.translators, title: "Translators", parent: TAG_ID.computerSystems, comingSoon: true},
5657
{id: TAG_ID.programmingLanguages, title: "Programming languages", parent: TAG_ID.computerSystems, comingSoon: true},
5758
// Data and information topics
@@ -79,7 +80,7 @@ const baseTags: BaseTag[] = [
7980
{id: TAG_ID.structureAndRobustness, title: "Structure & robustness", parent: TAG_ID.proceduralProgramming, comingSoon: true},
8081
{id: TAG_ID.dataStructuresImplementation, title: "Data structures (implementation)", parent: TAG_ID.proceduralProgramming, comingSoon: true},
8182
{id: TAG_ID.recursion, title: "Recursion", parent: TAG_ID.proceduralProgramming, comingSoon: true},
82-
{id: TAG_ID.stringManipulation, title: "String manipulation", parent: TAG_ID.proceduralProgramming, comingSoon: true},
83+
{id: TAG_ID.stringManipulation, title: "String manipulation", parent: TAG_ID.proceduralProgramming, new: true},
8384
{id: TAG_ID.guis, title: "GUIs", parent: TAG_ID.proceduralProgramming, comingSoon: true},
8485
{id: TAG_ID.softwareEngineeringPrinciples, title: "Software engineering principles", parent: TAG_ID.proceduralProgramming, comingSoon: true},
8586
{id: TAG_ID.softwareProject, title: "Software project", parent: TAG_ID.proceduralProgramming, comingSoon: true},

0 commit comments

Comments
 (0)