feat: release rdbms on staging (#44576)

fix: unhide cert from settings page

fix: add cert variables where missing

fix: show token on settings page

feat: add challenges to certified user data

fix: stylize settings page a little bit

fix: only show rdbms when upcomingChanges = true

fix: relational databases -> relational database
This commit is contained in:
Tom
2022-02-18 10:29:30 -06:00
committed by GitHub
parent 395d9de8af
commit fd14608492
59 changed files with 240 additions and 124 deletions

View File

@@ -27,7 +27,7 @@ import {
import { User } from '../redux/prop-types';
import { submitNewAbout, updateUserFlag, verifyCert } from '../redux/settings';
const { apiLocation, showUpcomingChanges } = envData;
const { apiLocation, deploymentEnv } = envData;
// TODO: update types for actions
interface ShowSettingsProps {
@@ -98,6 +98,7 @@ export function ShowSettings(props: ShowSettingsProps): JSX.Element {
isSciCompPyCertV7,
isDataAnalysisPyCertV7,
isMachineLearningPyCertV7,
isRelationalDatabaseCertV8,
isEmailVerified,
isHonest,
sendQuincyEmail,
@@ -195,13 +196,14 @@ export function ShowSettings(props: ShowSettingsProps): JSX.Element {
isJsAlgoDataStructCert={isJsAlgoDataStructCert}
isMachineLearningPyCertV7={isMachineLearningPyCertV7}
isQaCertV7={isQaCertV7}
isRelationalDatabaseCertV8={isRelationalDatabaseCertV8}
isRespWebDesignCert={isRespWebDesignCert}
isSciCompPyCertV7={isSciCompPyCertV7}
username={username}
verifyCert={verifyCert}
/>
{showUpcomingChanges && <Spacer />}
{showUpcomingChanges && <WebhookToken />}
{deploymentEnv == 'staging' && <Spacer />}
{deploymentEnv == 'staging' && <WebhookToken />}
<Spacer />
<DangerZone />
</main>

View File

@@ -70,7 +70,8 @@ const userProps = {
isRespWebDesignCert: true,
isSciCompPyCertV7: true,
isDataAnalysisPyCertV7: true,
isMachineLearningPyCertV7: true
isMachineLearningPyCertV7: true,
isRelationalDatabaseCertV8: true
},
// eslint-disable-next-line @typescript-eslint/no-empty-function
navigate: () => {}

View File

@@ -47,6 +47,7 @@ const propTypes = {
isJsAlgoDataStructCert: PropTypes.bool,
isMachineLearningPyCertV7: PropTypes.bool,
isQaCertV7: PropTypes.bool,
isRelationalDatabaseCertV8: PropTypes.bool,
isRespWebDesignCert: PropTypes.bool,
isSciCompPyCertV7: PropTypes.bool,
t: PropTypes.func.isRequired,
@@ -71,7 +72,8 @@ const isCertSelector = ({
isRespWebDesignCert,
isSciCompPyCertV7,
isDataAnalysisPyCertV7,
isMachineLearningPyCertV7
isMachineLearningPyCertV7,
isRelationalDatabaseCertV8
}) => ({
is2018DataVisCert,
isApisMicroservicesCert,
@@ -87,7 +89,8 @@ const isCertSelector = ({
isRespWebDesignCert,
isSciCompPyCertV7,
isDataAnalysisPyCertV7,
isMachineLearningPyCertV7
isMachineLearningPyCertV7,
isRelationalDatabaseCertV8
});
const isCertMapSelector = createSelector(
@@ -106,7 +109,8 @@ const isCertMapSelector = createSelector(
isBackEndCert,
isSciCompPyCertV7,
isDataAnalysisPyCertV7,
isMachineLearningPyCertV7
isMachineLearningPyCertV7,
isRelationalDatabaseCertV8
}) => ({
'Responsive Web Design': isRespWebDesignCert,
'JavaScript Algorithms and Data Structures': isJsAlgoDataStructCert,
@@ -118,6 +122,7 @@ const isCertMapSelector = createSelector(
'Scientific Computing with Python': isSciCompPyCertV7,
'Data Analysis with Python': isDataAnalysisPyCertV7,
'Machine Learning with Python': isMachineLearningPyCertV7,
'Relational Database': isRelationalDatabaseCertV8,
'Legacy Front End': isFrontEndCert,
'Legacy Data Visualization': isDataVisCert,
'Legacy Back End': isBackEndCert,
@@ -164,7 +169,9 @@ export class CertificationSettings extends Component {
if (!completedProject) {
return null;
}
const { solution, challengeFiles } = completedProject;
const onClickHandler = () =>
this.setState({
solutionViewer: {

View File

@@ -233,6 +233,7 @@ const defaultTestProps = {
isSciCompPyCertV7: false,
isDataAnalysisPyCertV7: false,
isMachineLearningPyCertV7: false,
isRelationalDatabaseCertV8: false,
username: 'developmentuser',
verifyCert: () => {},
errors: {},

View File

@@ -1,10 +1,10 @@
---
title: Relational Databases
superBlock: relational-databases
certification: relational-databases
title: Relational Database
superBlock: relational-database
certification: relational-database
---
## Introduction to Relational Databases
## Introduction to Relational Database
This introduction is a stub

View File

@@ -1,7 +1,7 @@
---
title: Introduction to Relational Databases
block: Learn Relational Databases
superBlock: Relational Databases
superBlock: Relational Database
---
## Placeholder

View File

@@ -281,7 +281,7 @@ export const certificatesByNameSelector = username => state => {
isSciCompPyCertV7,
isDataAnalysisPyCertV7,
isMachineLearningPyCertV7,
isRelationalDatabasesCertV8
isRelationalDatabaseCertV8
} = userByNameSelector(username)(state);
return {
hasModernCert:
@@ -296,7 +296,7 @@ export const certificatesByNameSelector = username => state => {
isSciCompPyCertV7 ||
isDataAnalysisPyCertV7 ||
isMachineLearningPyCertV7 ||
isRelationalDatabasesCertV8,
isRelationalDatabaseCertV8,
hasLegacyCert:
isFrontEndCert || isBackEndCert || isDataVisCert || isInfosecQaCert,
isFullStackCert,
@@ -352,9 +352,9 @@ export const certificatesByNameSelector = username => state => {
certSlug: 'machine-learning-with-python-v7'
},
{
show: isRelationalDatabasesCertV8,
title: 'Relational Databases Certification',
certSlug: 'relational-databases-v8'
show: isRelationalDatabaseCertV8,
title: 'Relational Database Certification',
certSlug: 'relational-database-v8'
}
],
legacyCerts: [

View File

@@ -31,6 +31,7 @@ export const UserPropType = PropTypes.shape({
isQaCertV7: PropTypes.bool,
isInfosecCertV7: PropTypes.bool,
isJsAlgoDataStructCert: PropTypes.bool,
isRelationalDatabaseCertV8: PropTypes.bool,
isRespWebDesignCert: PropTypes.bool,
isSciCompPyCertV7: PropTypes.bool,
isDataAnalysisPyCertV7: PropTypes.bool,
@@ -302,6 +303,7 @@ export type ClaimedCertifications = {
isQaCertV7: boolean;
isInfosecCertV7: boolean;
isJsAlgoDataStructCert: boolean;
isRelationalDatabaseCertV8: boolean;
isRespWebDesignCert: boolean;
isSciCompPyCertV7: boolean;
isDataAnalysisPyCertV7: boolean;

View File

@@ -1,7 +1,7 @@
import { SuperBlocks } from '../../../config/certification-settings';
import envData from '../../../config/env.json';
const { showNewCurriculum, showUpcomingChanges } = envData;
const { deploymentEnv, showNewCurriculum, showUpcomingChanges } = envData;
const responsiveWebBase =
'/learn/responsive-web-design/responsive-web-design-projects';
@@ -12,8 +12,7 @@ const jsAlgoBase =
const feLibsBase =
'/learn/front-end-development-libraries/front-end-development-libraries-projects';
const dataVisBase = '/learn/data-visualization/data-visualization-projects';
const relationalDatabasesBase =
'/learn/relational-databases/learn-relational-databases';
const relationalDatabaseBase = '/learn/relational-database';
const apiMicroBase =
'/learn/back-end-development-and-apis/back-end-development-and-apis-projects';
const qaBase = '/learn/quality-assurance/quality-assurance-projects';
@@ -458,39 +457,39 @@ const certMap = [
},
{
id: '606243f50267e718b1e755f4',
title: 'Relational Databases',
certSlug: SuperBlocks.RelationalDb,
flag: 'isRelationalDatabasesCert',
title: 'Relational Database',
certSlug: 'relational-database-v8',
flag: 'isRelationalDatabaseCertV8',
projects: [
{
id: '5f1a4ef5d5d6b5ab580fc6ae',
title: 'Celestial Bodies Database',
link: `${relationalDatabasesBase}/celestial-bodies-database`,
superBlock: SuperBlocks.RelationalDb
},
{
id: '5f87ac112ae598023a42df1a',
title: 'Salon Appointment Scheduler',
link: `${relationalDatabasesBase}/salon-appointment-scheduler`,
superBlock: SuperBlocks.RelationalDb
link: `${relationalDatabaseBase}/build-a-celestial-bodies-database-project/build-a-celestial-bodies-database`,
certSlug: 'relational-database-v8'
},
{
id: '5f9771307d4d22b9d2b75a94',
title: 'World Cup Database',
link: `${relationalDatabasesBase}/world-cup-database`,
superBlock: SuperBlocks.RelationalDb
link: `${relationalDatabaseBase}/build-a-world-cup-database-project/build-a-world-cup-database`,
certSlug: 'relational-database-v8'
},
{
id: '5f87ac112ae598023a42df1a',
title: 'Salon Appointment Scheduler',
link: `${relationalDatabaseBase}/build-a-salon-appointment-scheduler-project/build-a-salon-appointment-scheduler`,
certSlug: 'relational-database-v8'
},
{
id: '602d9ff222201c65d2a019f2',
title: 'Periodic Table Database',
link: `${relationalDatabasesBase}/periodic-table-database`,
superBlock: SuperBlocks.RelationalDb
link: `${relationalDatabaseBase}/build-a-periodic-table-database-project/build-a-periodic-table-database`,
certSlug: 'relational-database-v8'
},
{
id: '602da04c22201c65d2a019f4',
title: 'Number Guessing Game',
link: `${relationalDatabasesBase}/number-guessing-game`,
superBlock: SuperBlocks.RelationalDb
link: `${relationalDatabaseBase}/build-a-number-guessing-game-project/build-a-number-guessing-game`,
certSlug: 'relational-database-v8'
}
]
},
@@ -746,8 +745,11 @@ certMap.forEach(cert => {
if (cert.title !== 'Legacy Full Stack') {
if (cert.title.startsWith('Legacy')) {
legacyProjectMap[cert.title] = cert.projects;
// temporary hiding of RDBMS cert
// should do suggestion on line 33 and use front matter to hide it
} else if (
cert.title.startsWith('Relational') &&
deploymentEnv == 'staging'
) {
projectMap[cert.title] = cert.projects;
} else if (!cert.title.startsWith('Relational')) {
projectMap[cert.title] = cert.projects;
}

View File

@@ -115,16 +115,21 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps, ShowCodeAllyState> {
componentDidMount(): void {
const {
updateChallengeMeta,
challengeMounted,
data: {
challengeNode: {
challenge: { challengeType, title }
challenge: { challengeType, helpCategory, title }
}
},
pageContext: { challengeMeta }
pageContext: { challengeMeta },
updateChallengeMeta
} = this.props;
updateChallengeMeta({ ...challengeMeta, title, challengeType });
updateChallengeMeta({
...challengeMeta,
title,
challengeType,
helpCategory
});
challengeMounted(challengeMeta.id);
this._container?.focus();
}