Feat: hide blocks not challenges (#39504)

* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2020-09-04 00:07:40 +02:00
committed by GitHub
parent 6b081c7e7b
commit bd68b70f3d
1740 changed files with 151 additions and 1746 deletions

View File

@ -70,7 +70,6 @@ exports.createPages = function createPages({ graphql, actions, reporter }) {
{
allChallengeNode(
sort: { fields: [superOrder, order, challengeOrder] }
filter: { isHidden: { eq: false } }
) {
edges {
node {

View File

@ -60,8 +60,6 @@ export class SuperBlock extends Component {
const blocksForSuperBlock = nodes.filter(
node => node.superBlock === superBlock
);
// since the nodes have been filtered based on isHidden, any blocks whose
// nodes have been entirely removed will not appear in this array.
const blockDashedNames = uniq(
blocksForSuperBlock.map(({ block }) => block)
);

View File

@ -111,7 +111,7 @@ export class Map extends Component {
render() {
const { nodes } = this.props;
// if a given superBlock's nodes have been filtered (via isHidden, say) that
// if a given superBlock's nodes have been filtered that
// superBlock will not appear in superBlocks and will not be rendered.
const superBlocks = uniq(nodes.map(({ superBlock }) => superBlock));
return (

View File

@ -19,7 +19,6 @@ export const Landing = ({ page = 'landing' }) => {
const data = useStaticQuery(graphql`
query certifications {
challenges: allChallengeNode(
filter: { isHidden: { eq: false } }
sort: { fields: [superOrder, order, challengeOrder] }
) {
nodes {

View File

@ -94,7 +94,7 @@ export const LearnPage = ({
isSignedIn={isSignedIn}
nodes={edges
.map(({ node }) => node)
.filter(({ isPrivate, isHidden }) => !isPrivate && !isHidden)}
.filter(({ isPrivate }) => !isPrivate)}
/>
</Grid>
</LearnLayout>
@ -126,7 +126,6 @@ export const query = graphql`
isRequired
superBlock
dashedName
isHidden
}
}
}

View File

@ -36,7 +36,6 @@ export const ChallengeNode = PropTypes.shape({
guideUrl: PropTypes.string,
head: PropTypes.arrayOf(PropTypes.string),
instructions: PropTypes.string,
isHidden: PropTypes.bool,
isComingSoon: PropTypes.bool,
isLocked: PropTypes.bool,
isPrivate: PropTypes.bool,

View File

@ -1,5 +1,6 @@
{
"name": "Advanced Node and Express",
"isUpcomingChange": false,
"dashedName": "advanced-node-and-express",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Algorithms",
"isUpcomingChange": false,
"dashedName": "algorithms",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "APIs and Microservices Certificate",
"isUpcomingChange": false,
"dashedName": "apis-and-microservices-certificate",
"order": 5,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "APIs and Microservices Projects",
"isUpcomingChange": false,
"dashedName": "apis-and-microservices-projects",
"order": 4,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Applied Accessibility",
"isUpcomingChange": false,
"dashedName": "applied-accessibility",
"order": 3,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Applied Visual Design",
"isUpcomingChange": false,
"dashedName": "applied-visual-design",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Basic Algorithm Scripting",
"isUpcomingChange": false,
"dashedName": "basic-algorithm-scripting",
"order": 6,
"time": "50 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Basic CSS",
"isUpcomingChange": false,
"dashedName": "basic-css",
"order": 1,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Basic Data Structures",
"isUpcomingChange": false,
"dashedName": "basic-data-structures",
"order": 5,
"time": "1 hour",

View File

@ -1,5 +1,6 @@
{
"name": "Basic HTML and HTML5",
"isUpcomingChange": false,
"dashedName": "basic-html-and-html5",
"order": 0,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Basic JavaScript",
"isUpcomingChange": false,
"dashedName": "basic-javascript",
"order": 1,
"time": "10 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Basic Node and Express",
"isUpcomingChange": false,
"dashedName": "basic-node-and-express",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Bootstrap",
"isUpcomingChange": false,
"dashedName": "bootstrap",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "CSS Flexbox",
"isUpcomingChange": false,
"dashedName": "css-flexbox",
"order": 5,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "CSS Grid",
"isUpcomingChange": false,
"dashedName": "css-grid",
"order": 6,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Data Analysis with Python Certificate",
"isUpcomingChange": false,
"dashedName": "data-analysis-with-python-v7-certificate",
"order": 8,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Data Analysis with Python Course",
"isUpcomingChange": false,
"dashedName": "data-analysis-with-python-course",
"order": 1,
"time": "15 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Data Analysis with Python Projects",
"isUpcomingChange": false,
"dashedName": "data-analysis-with-python-projects",
"order": 3,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Data Structures",
"isUpcomingChange": false,
"dashedName": "data-structures",
"order": 2,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Data Visualization Certificate",
"isUpcomingChange": false,
"dashedName": "data-visualization-certificate",
"order": 4,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Data Visualization Projects",
"isUpcomingChange": false,
"dashedName": "data-visualization-projects",
"order": 3,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Data Visualization with D3",
"isUpcomingChange": false,
"dashedName": "data-visualization-with-d3",
"order": 1,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Debugging",
"isUpcomingChange": false,
"dashedName": "debugging",
"order": 4,
"time": "1 hour",

View File

@ -1,5 +1,6 @@
{
"name": "ES6",
"isUpcomingChange": false,
"dashedName": "es6",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Front End Libraries Certificate",
"isUpcomingChange": false,
"dashedName": "front-end-libraries-certificate",
"order": 3,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Front End Libraries Projects",
"isUpcomingChange": false,
"dashedName": "front-end-libraries-projects",
"order": 8,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Functional Programming",
"isUpcomingChange": false,
"dashedName": "functional-programming",
"order": 8,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "How Neural Networks Work",
"isUpcomingChange": false,
"dashedName": "how-neural-networks-work",
"order": 2,
"time": "10 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Information Security Certificate",
"isUpcomingChange": false,
"dashedName": "information-security-v7-certificate",
"order": 9,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Information Security Projects",
"isUpcomingChange": false,
"dashedName": "information-security-projects",
"order": 3,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Information Security with HelmetJS",
"isUpcomingChange": false,
"dashedName": "information-security-with-helmetjs",
"order": 1,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Intermediate Algorithm Scripting",
"isUpcomingChange": false,
"dashedName": "intermediate-algorithm-scripting",
"order": 9,
"time": "50 hours",

View File

@ -1,5 +1,6 @@
{
"name": "JavaScript Algorithms and Data Structures Certificate",
"isUpcomingChange": false,
"dashedName": "javascript-algorithms-and-data-structures-certificate",
"order": 2,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "JavaScript Algorithms and Data Structures Projects",
"isUpcomingChange": false,
"dashedName": "javascript-algorithms-and-data-structures-projects",
"order": 10,
"time": "50 hours",

View File

@ -1,5 +1,6 @@
{
"name": "jQuery",
"isUpcomingChange": false,
"dashedName": "jquery",
"order": 3,
"time": "3 hours",

View File

@ -1,5 +1,6 @@
{
"name": "JSON APIs and AJAX",
"isUpcomingChange": false,
"dashedName": "json-apis-and-ajax",
"order": 2,
"time": "2 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Legacy Back End Certificate",
"isUpcomingChange": false,
"dashedName": "legacy-back-end-certificate",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Legacy Data Visualization Certificate",
"isUpcomingChange": false,
"dashedName": "legacy-data-visualization-certificate",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Legacy Front End Certificate",
"isUpcomingChange": false,
"dashedName": "legacy-front-end-certificate",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Legacy Full Stack Certificate",
"isUpcomingChange": false,
"dashedName": "full-stack-certificate",
"order": 5,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Legacy Information Security and Quality Assurance Certificate",
"isUpcomingChange": false,
"dashedName": "information-security-and-quality-assurance-certificate",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Machine Learning with Python Certificate",
"isUpcomingChange": false,
"dashedName": "machine-learning-with-python-v7-certificate",
"order": 10,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Machine Learning with Python Projects",
"isUpcomingChange": false,
"dashedName": "machine-learning-with-python-projects",
"order": 3,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Managing Packages with npm",
"isUpcomingChange": false,
"dashedName": "managing-packages-with-npm",
"order": 1,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "MongoDB and Mongoose",
"isUpcomingChange": false,
"dashedName": "mongodb-and-mongoose",
"order": 3,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Numpy",
"isUpcomingChange": false,
"dashedName": "numpy",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Object Oriented Programming",
"isUpcomingChange": false,
"dashedName": "object-oriented-programming",
"order": 7,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Project Euler",
"isUpcomingChange": false,
"dashedName": "project-euler",
"order": 6,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Python for Everybody",
"isUpcomingChange": false,
"dashedName": "python-for-everybody",
"order": 1,
"time": "15 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Python for Penetration Testing",
"isUpcomingChange": false,
"dashedName": "python-for-penetration-testing",
"order": 2,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Quality Assurance and Testing with Chai",
"isUpcomingChange": false,
"dashedName": "quality-assurance-and-testing-with-chai",
"order": 1,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Quality Assurance Certificate",
"isUpcomingChange": false,
"dashedName": "quality-assurance-v7-certificate",
"order": 6,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Quality Assurance Projects",
"isUpcomingChange": false,
"dashedName": "quality-assurance-projects",
"order": 3,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "React and Redux",
"isUpcomingChange": false,
"dashedName": "react-and-redux",
"order": 7,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "React",
"isUpcomingChange": false,
"dashedName": "react",
"order": 5,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Redux",
"isUpcomingChange": false,
"dashedName": "redux",
"order": 6,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Regular Expressions",
"isUpcomingChange": false,
"dashedName": "regular-expressions",
"order": 3,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Responsive Web Design Certificate",
"isUpcomingChange": false,
"dashedName": "responsive-web-design-certificate",
"order": 1,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Responsive Web Design Principles",
"isUpcomingChange": false,
"dashedName": "responsive-web-design-principles",
"order": 4,
"time": "1 hour",

View File

@ -1,5 +1,6 @@
{
"name": "Responsive Web Design Projects",
"isUpcomingChange": false,
"dashedName": "responsive-web-design-projects",
"order": 7,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Rosetta Code",
"isUpcomingChange": false,
"dashedName": "rosetta-code",
"order": 5,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Sass",
"isUpcomingChange": false,
"dashedName": "sass",
"order": 4,
"time": "5 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Scientific Computing with Python Certificate",
"isUpcomingChange": false,
"dashedName": "scientific-computing-with-python-v7-certificate",
"order": 7,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "Scientific Computing with Python Projects",
"isUpcomingChange": false,
"dashedName": "scientific-computing-with-python-projects",
"order": 2,
"time": "150 hours",

View File

@ -1,5 +1,6 @@
{
"name": "Take Home Projects",
"isUpcomingChange": false,
"dashedName": "take-home-projects",
"order": 4,
"time": "",

View File

@ -1,5 +1,6 @@
{
"name": "TensorFlow",
"isUpcomingChange": false,
"dashedName": "tensorflow",
"order": 1,
"time": "15 hours",

View File

@ -2,7 +2,6 @@
id: 587d774c367417b2b2512a9c
title: Add a Text Alternative to Images for Visually Impaired Accessibility
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cPp7VfD'
forumTopicId: 16628
---

View File

@ -2,7 +2,6 @@
id: 587d778b367417b2b2512aa8
title: Add an Accessible Date Picker
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cR3bRbCV'
forumTopicId: 301008
---

View File

@ -2,7 +2,6 @@
id: 587d778f367417b2b2512aad
title: Avoid Colorblindness Issues by Carefully Choosing Colors that Convey Information
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/c437as3'
forumTopicId: 301011
---

View File

@ -2,7 +2,6 @@
id: 587d778f367417b2b2512aac
title: Avoid Colorblindness Issues by Using Sufficient Contrast
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cmzMEUw'
forumTopicId: 301012
---

View File

@ -2,7 +2,6 @@
id: 587d778f367417b2b2512aae
title: Give Links Meaning by Using Descriptive Link Text
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/c437DcV'
forumTopicId: 301013
---

View File

@ -2,7 +2,6 @@
id: 587d7789367417b2b2512aa4
title: Improve Accessibility of Audio Content with the audio Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cVJVkcZ'
forumTopicId: 301014
---

View File

@ -2,7 +2,6 @@
id: 587d778a367417b2b2512aa5
title: Improve Chart Accessibility with the figure Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cGJMqtE'
forumTopicId: 301015
---

View File

@ -2,7 +2,6 @@
id: 587d778a367417b2b2512aa6
title: Improve Form Field Accessibility with the label Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cGJMMAN'
forumTopicId: 301016
---

View File

@ -2,7 +2,6 @@
id: 587d778e367417b2b2512aab
title: Improve Readability with High Contrast Text
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cKb3nCq'
forumTopicId: 301017
---

View File

@ -2,7 +2,6 @@
id: 587d774e367417b2b2512a9f
title: Jump Straight to the Content Using the main Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cPp7zuE'
forumTopicId: 301018
---

View File

@ -2,7 +2,6 @@
id: 587d774c367417b2b2512a9d
title: Know When Alt Text Should be Left Blank
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cM9P4t2'
forumTopicId: 301019
---

View File

@ -2,7 +2,6 @@
id: 587d778d367417b2b2512aaa
title: Make Elements Only Visible to a Screen Reader by Using Custom CSS
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cJ8QGkhJ'
forumTopicId: 301020
---

View File

@ -2,7 +2,6 @@
id: 587d7790367417b2b2512aaf
title: Make Links Navigable with HTML Access Keys
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cQvmaTp'
forumTopicId: 301021
---

View File

@ -2,7 +2,6 @@
id: 587d7788367417b2b2512aa3
title: Make Screen Reader Navigation Easier with the footer Landmark
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/crVrDh8'
forumTopicId: 301022
---

View File

@ -2,7 +2,6 @@
id: 587d7787367417b2b2512aa1
title: Make Screen Reader Navigation Easier with the header Landmark
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cB76vtv'
forumTopicId: 301023
---

View File

@ -2,7 +2,6 @@
id: 587d7788367417b2b2512aa2
title: Make Screen Reader Navigation Easier with the nav Landmark
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/czVwWSv'
forumTopicId: 301024
---

View File

@ -2,7 +2,6 @@
id: 587d778c367417b2b2512aa9
title: Standardize Times with the HTML5 datetime Attribute
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cmzMgtz'
forumTopicId: 301025
---

View File

@ -2,7 +2,6 @@
id: 587d774d367417b2b2512a9e
title: Use Headings to Show Hierarchical Relationships of Content
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cqVEktm'
forumTopicId: 301026
---

View File

@ -2,7 +2,6 @@
id: 587d7790367417b2b2512ab0
title: Use tabindex to Add Keyboard Focus to an Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cmzMDHW'
forumTopicId: 301027
---

View File

@ -2,7 +2,6 @@
id: 587d7790367417b2b2512ab1
title: Use tabindex to Specify the Order of Keyboard Focus for Several Elements
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cmzRRcb'
forumTopicId: 301028
---

View File

@ -2,7 +2,6 @@
id: 587d774e367417b2b2512aa0
title: Wrap Content in the article Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cPp79S3'
forumTopicId: 301029
---

View File

@ -2,7 +2,6 @@
id: 587d778b367417b2b2512aa7
title: Wrap Radio Buttons in a fieldset Element for Better Accessibility
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cVJVefw'
forumTopicId: 301030
---

View File

@ -2,7 +2,6 @@
id: 587d781b367417b2b2512abe
title: Add a box-shadow to a Card-like Element
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cvVZdUd'
forumTopicId: 301031
---

View File

@ -2,7 +2,6 @@
id: 587d781b367417b2b2512abc
title: Adjust the background-color Property of Text
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cEDqwA6'
forumTopicId: 301032
---

View File

@ -2,7 +2,6 @@
id: 587d78a4367417b2b2512ad3
title: Adjust the Color of Various Elements to Complementary Colors
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cWmPpud'
forumTopicId: 301033
---

View File

@ -2,7 +2,6 @@
id: 587d7791367417b2b2512ab5
title: Adjust the Height of an Element Using the height Property
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cEDaDTN'
forumTopicId: 301034
---

View File

@ -2,7 +2,6 @@
id: 587d781d367417b2b2512ac8
title: Adjust the Hover State of an Anchor Tag
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cakRGcm'
forumTopicId: 301035
---

View File

@ -2,7 +2,6 @@
id: 587d78a4367417b2b2512ad4
title: Adjust the Hue of a Color
challengeType: 0
isHidden: false
videoUrl: 'https://scrimba.com/c/cPp38TZ'
forumTopicId: 301036
---

Some files were not shown because too many files have changed in this diff Show More