Skip to content

TCA-379 Follow-up & Misc Release 2022-09-01 -> prod #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fb688e5
TCA-105 #comment change name of responsive web design cert #time 15m
brooketopcoder Aug 10, 2022
795a984
Merge pull request #42 from topcoder-platform/TCA-105_rename-cert
brooketopcoder Aug 10, 2022
bd4aaf5
migrate tests for 'build-a-25-5-clock' project to use FCC instead of …
billsedison Aug 11, 2022
b2192c8
TCA-299 - update editor UI to match the classic view according to figma
vas3a Aug 12, 2022
7235bfc
old style editor: do not show completion modal when using ctrl+enter …
vas3a Aug 12, 2022
ab3b7d0
TCA-299 - improve UI for old style editor
vas3a Aug 12, 2022
f68c31a
TCA-299 - handle lint fixes
vas3a Aug 15, 2022
8109717
Merge pull request #44 from topcoder-platform/TCA-299_ui-for-js-course
vas3a Aug 15, 2022
3b8df04
Merge pull request #43 from topcoder-platform/build-a-25-5-clock
billsedison Aug 17, 2022
4bda510
TCA-355 #comment This PR handles clicks w/in the FCC app so that they…
brooketopcoder Aug 23, 2022
162eb27
TCA-355 fix prettier crap
brooketopcoder Aug 24, 2022
2bb2f83
TCA-355 change comment
brooketopcoder Aug 24, 2022
c1587f8
Merge pull request #45 from topcoder-platform/TCA-355_external-links
brooketopcoder Aug 24, 2022
c871ab3
TCA-355 #comment This commit fixes an issue w/FCC internal URLS #time 5m
brooketopcoder Aug 24, 2022
87ab2c1
Merge pull request #46 from topcoder-platform/TCA-355_external-links
brooketopcoder Aug 24, 2022
8d7fc7e
TCA-325 #comment This commit removes the Reset button from tool panel…
brooketopcoder Aug 24, 2022
ea95a3e
TCA-327 #comment This commit adds the lesson title to the old editor …
brooketopcoder Aug 24, 2022
583442c
TCA-354 #comment This PR handles a 2nd flavor of learn URL for FCC ex…
brooketopcoder Aug 25, 2022
a10a940
Merge pull request #47 from topcoder-platform/TCA-325_reset-old-editor
brooketopcoder Aug 25, 2022
d152e17
Merge pull request #48 from topcoder-platform/TCA-327_lesson-title
brooketopcoder Aug 25, 2022
f082b9b
Merge pull request #49 from topcoder-platform/TCA-354_fcc-link
brooketopcoder Aug 25, 2022
27c59a8
TCA-326 #comment This commit suppresses the confirmation modal entire…
brooketopcoder Aug 25, 2022
81c9843
Merge pull request #50 from topcoder-platform/TCA-326_pop-up
brooketopcoder Aug 25, 2022
8b40670
TCA-314 #comment This PR adds Segment analytics with env-specific beh…
brooketopcoder Aug 25, 2022
624a624
TCA-314 #comment This commit adds GTM to FCC w/env-specific accounts …
brooketopcoder Aug 25, 2022
0df0272
Merge pull request #51 from topcoder-platform/TCA-314_heap
brooketopcoder Aug 25, 2022
de346d6
TCA-314 #comment This commit removes heap from non-prod environments …
brooketopcoder Aug 25, 2022
3acfee6
Merge pull request #52 from topcoder-platform/TCA-314_heap
brooketopcoder Aug 25, 2022
8847cd4
Merge branch 'dev' into TCA-373_handle-videos
brooketopcoder Aug 26, 2022
e5798c6
TCA-373 #comment This PR updates external link handling so that it su…
brooketopcoder Aug 26, 2022
a125218
TCA-352 - fix text formatting for code blocks
vas3a Aug 29, 2022
1f02742
lint
vas3a Aug 29, 2022
15bceff
Merge pull request #55 from topcoder-platform/TCA-352_text-not-visible
vas3a Aug 30, 2022
6e4c4d5
Trigger deployment
brooketopcoder Aug 30, 2022
e5e79d9
Merge pull request #54 from topcoder-platform/TCA-373_handle-videos
brooketopcoder Aug 31, 2022
ff1ff06
Merge remote-tracking branch 'origin/prod' into dev-merge
vas3a Aug 31, 2022
55e962d
Merge pull request #61 from topcoder-platform/dev-merge
brooketopcoder Aug 31, 2022
9e97bf3
TCA-43 #comment This commit reverts all the changes from this ticket …
brooketopcoder Aug 31, 2022
10b4d1a
Merge pull request #63 from topcoder-platform/build-a-25-5-clock
brooketopcoder Aug 31, 2022
98409f0
TCA-384 - update support mail for offline warning
vas3a Sep 1, 2022
fda41e2
Merge pull request #64 from topcoder-platform/TCA-384_update-support-…
vas3a Sep 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (!branchfilter.contains(env.BRANCH_NAME)) {
return
}

// Define branch specific vars
// Define dev-specific vars
if (env.BRANCH_NAME == 'dev') {
DEPLOY_ENV = 'DEV'
LOGICAL_ENV = 'dev'
Expand All @@ -23,6 +23,7 @@ if (env.BRANCH_NAME == 'dev') {
ENABLE_CACHE = false
}

// Define prod-specific vars
if (env.BRANCH_NAME == 'prod') {
DEPLOY_ENV = 'PROD'
LOGICAL_ENV = 'prod'
Expand Down
2 changes: 1 addition & 1 deletion client/i18n/locales/english/intro.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
},
"2022/responsive-web-design": {
"title": "(New) Responsive Web Design",
"title": "Responsive Web Design",
"intro": [
"In this Responsive Web Design Certification, you'll learn the languages that developers use to build webpages: HTML (Hypertext Markup Language) for content, and CSS (Cascading Style Sheets) for design.",
"First, you'll build a cat photo app to learn the basics of HTML and CSS. Later, you'll learn modern techniques like CSS variables by building a penguin, and best practices for accessibility by building a quiz site.",
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"react": "16.14.0",
"react-dom": "16.14.0",
"react-final-form": "6.5.9",
"react-gtm-module": "^2.0.11",
"react-ga": "3.3.1",
"react-helmet": "6.1.0",
"react-hotkeys": "2.0.0",
Expand Down
29 changes: 29 additions & 0 deletions client/src/analytics/google-tag-manater/GoogleTagManager.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { FC } from 'react';
import TagManager from 'react-gtm-module';

import {
devTagManagerId,
prodTagManagerId
} from '../../../../config/analytics-settings';

import envData from '../../../../config/env.json';

/* eslint-disable @typescript-eslint/ban-types */
const GoogleTagManager: FC<{}> = () => {
// if we have an ID
// then tags are supported in this environment,
// so initialize them
const segmentId =
envData.deploymentEnv === 'staging' ? devTagManagerId : prodTagManagerId;
if (segmentId) {
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */
TagManager.initialize({
gtmId: segmentId
});
}

return null;
};

export default GoogleTagManager;
1 change: 1 addition & 0 deletions client/src/analytics/google-tag-manater/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as GoogleTagManager } from './GoogleTagManager';
31 changes: 31 additions & 0 deletions client/src/analytics/segment/Segment.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { FC } from 'react';

import {
devSegmentId,
prodSegmentId
} from '../../../../config/analytics-settings';
import envData from '../../../../config/env.json';
import segment from './segment-snippet';

interface SegmentModel {
load: (id: string) => void;
page: () => void;
}

const segmentModel: SegmentModel = segment as unknown as SegmentModel;

/* eslint-disable @typescript-eslint/ban-types */
const Segment: FC<{}> = () => {
// if we have a key for this environment, load it
const segmentId = (
envData.deploymentEnv === 'staging' ? devSegmentId : prodSegmentId
) as string;
if (segmentId) {
segmentModel.load(segmentId);
segmentModel.page();
}

return null;
};

export default Segment;
1 change: 1 addition & 0 deletions client/src/analytics/segment/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Segment } from './Segment';
65 changes: 65 additions & 0 deletions client/src/analytics/segment/segment-snippet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
function SegmentSnippet() {
var analytics = [];

if (analytics.initialize) {
return;
}
if (analytics.invoked) {
window.console &&
console.error &&
console.error('Segment snippet included twice.');
return;
}
analytics.invoked = !0;
analytics.methods = [
'trackSubmit',
'trackClick',
'trackLink',
'trackForm',
'pageview',
'identify',
'reset',
'group',
'track',
'ready',
'alias',
'debug',
'page',
'once',
'off',
'on',
'addSourceMiddleware',
'addIntegrationMiddleware',
'setAnonymousId',
'addDestinationMiddleware'
];
analytics.factory = function (t) {
return function () {
var e = Array.prototype.slice.call(arguments);
e.unshift(t);
analytics.push(e);
return analytics;
};
};
for (var t = 0; t < analytics.methods.length; t++) {
var e = analytics.methods[t];
analytics[e] = analytics.factory(e);
}
analytics.load = function (t, e) {
var n = document.createElement('script');
n.type = 'text/javascript';
n.async = !0;
n.src =
'https://cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js';
var a = document.getElementsByTagName('script')[0];
a.parentNode.insertBefore(n, a);
analytics._loadOptions = e;
};
analytics.SNIPPET_VERSION = '4.1.0';
// analytics.load("SEGMENT_ANALYTICS_KEY"); - don't load here and let the component decide to load or not
// analytics.page(); - don't call the page, each app should call it when it loads a page by itself

return { ...analytics };
}

export default SegmentSnippet();
2 changes: 1 addition & 1 deletion client/src/components/OfflineWarning/offline-warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function OfflineWarning({
t('misc.offline')
) : (
<Trans i18nKey='misc.server-offline'>
<a href={'mailto:support@freecodecamp.org'}>placeholder</a>
<a href={'mailto:support@topcoder.com'}>placeholder</a>
</Trans>
);
timeout();
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/formHelpers/block-save-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
function BlockSaveButton(props?: Record<string, unknown>): JSX.Element {
const { t } = useTranslation();
return (
<Button block={true} bsStyle='primary' {...props} type='submit'>
<Button bsStyle='primary' {...props} type='submit'>
{props?.children || t('buttons.save')}
</Button>
);
Expand Down
51 changes: 24 additions & 27 deletions client/src/components/formHelpers/form-fields.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Alert,
Col,
ControlLabel,
FormControl,
FormGroup,
Expand Down Expand Up @@ -72,7 +71,7 @@ function FormFields(props: FormFieldsProps): JSX.Element {
) : null;
};
return (
<div>
<>
{formFields
.filter(formField => !ignored.includes(formField.name))
.map(({ name, label }) => (
Expand All @@ -85,35 +84,33 @@ function FormFields(props: FormFieldsProps): JSX.Element {
name in placeholders ? placeholders[name] : '';
const isURL = types[name] === 'url';
return (
<Col key={key} xs={12}>
<FormGroup>
{type === 'hidden' ? null : (
<ControlLabel htmlFor={key}>{label}</ControlLabel>
)}
<FormControl
componentClass={type === 'textarea' ? type : 'input'}
id={key}
name={name}
onChange={onChange}
placeholder={placeholder}
required={required.includes(name)}
rows={4}
type={type}
value={value as string}
/>
{nullOrWarning(
value as string,
!pristine && error,
isURL,
name
)}
</FormGroup>
</Col>
<FormGroup key={key} className='embedded'>
{type === 'hidden' ? null : (
<ControlLabel htmlFor={key}>{label}</ControlLabel>
)}
<FormControl
componentClass={type === 'textarea' ? type : 'input'}
id={key}
name={name}
onChange={onChange}
placeholder={placeholder}
required={required.includes(name)}
rows={4}
type={type}
value={value as string}
/>
{nullOrWarning(
value as string,
!pristine && error,
isURL,
name
)}
</FormGroup>
);
}}
</Field>
))}
</div>
</>
);
}

Expand Down
17 changes: 7 additions & 10 deletions client/src/components/formHelpers/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
ValidatedValues,
FormFields,
BlockSaveButton,
BlockSaveWrapper,
formatUrlValues
} from '../formHelpers/index';

Expand Down Expand Up @@ -54,15 +53,13 @@ function DynamicForm({
style={{ width: '100%' }}
>
<FormFields formFields={formFields} options={options} />
<BlockSaveWrapper>
{hideButton ? null : (
<BlockSaveButton
disabled={(pristine && !enableSubmit) || (error as boolean)}
>
{buttonText ? buttonText : null}
</BlockSaveButton>
)}
</BlockSaveWrapper>
{!hideButton && (
<BlockSaveButton
disabled={(pristine && !enableSubmit) || (error as boolean)}
>
{buttonText ? buttonText : null}
</BlockSaveButton>
)}
</form>
)}
</Form>
Expand Down
32 changes: 31 additions & 1 deletion client/src/components/layouts/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,43 @@ fieldset[disabled] .btn-primary.focus {
}
}

.button-group .btn:not(:last-child) {
.button-group {
margin-bottom: -10px;
}
.button-group .btn {
margin-bottom: 10px;
}
strong {
color: var(--secondary-color);
}

.form-group.embedded {
border: 1px solid var(--tc-black-40);
padding: 8px 10px 2px;
border-radius: 4px;
position: relative;
max-width: 320px;
}

.form-group.embedded .control-label {
display: block;
font-size: 11px;
font-family: 'Roboto';
line-height: 10px;
color: var(--tc-turq-160);
margin-bottom: 4px;
}

.form-group.embedded .form-control {
border: 0 none;
padding: 0;
height: 22px;
font-size: 14px;
line-height: 22px;
font-family: 'Roboto';
color: var(--tc-black-100);
}

.form-control {
color: var(--primary-color);
outline: none;
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/layouts/learn.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
#learn-app-wrapper .reflex-container.horizontal > .reflex-splitter {
height: 5px;
}

#learn-app-wrapper .reflex-container > .reflex-element:first-child:last-child {
flex: 1 1 auto !important;
}
8 changes: 7 additions & 1 deletion client/src/components/layouts/prism-night.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/

.dark-palette code[class*='language-'],
.dark-palette pre[class*='language-'] {
.dark-palette code[class*='language-'],
pre[class*='language-'].dark-palette {
color: var(--secondary-color);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
Expand All @@ -28,11 +29,13 @@
text-shadow: none;
}

pre[class*='language-'].dark-palette code[class*='language-'],
.dark-palette pre[class*='language-'] code[class*='language-'] {
color: var(--quaternary-color);
}

/* Code blocks */
pre[class*='language-'].dark-palette,
.dark-palette pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
Expand All @@ -47,12 +50,15 @@ padding in night mode */
}

.dark-palette :not(pre) > code[class*='language-'],
pre[class*='language-'].dark-palette,
.dark-palette pre[class*='language-'] {
background: var(--primary-background);
}

.dark-palette pre[class*='language-']::selection,
pre[class*='language-'].dark-palette::selection,
.dark-palette pre[class*='language-'] ::selection,
pre[class*='language-'].dark-palette ::selection,
.dark-palette code[class*='language-']::selection,
.dark-palette code[class*='language-'] ::selection {
background: var(--selection-color);
Expand Down
Loading