Skip to content

Commit d07e2d7

Browse files
authored
Merge pull request #213 from topcoder-platform/PROD-2321_bug-hunt-intake-form
PROD-2321 Bug Hunt Intake -> Dev
2 parents 5f20052 + 7b847b7 commit d07e2d7

File tree

205 files changed

+6041
-1735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+6041
-1735
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,23 @@ example.scss
405405
}
406406
}
407407
```
408+
409+
Mobile UIs use xs, sm, and md breakpoints. Larger breakpoints are desktop UIs.
410+
411+
For specifying mobile CSS, you can use @include ltemd:
412+
```
413+
.exampleDesktopContent {
414+
display: flex;
415+
width: 100%;
416+
flex-direction: column;
417+
418+
@include ltemd {
419+
flex-direction: row;
420+
}
421+
}
422+
```
423+
424+
408425
>**WARNING:** Do not add any breakpoints!
409426
410427
## Icons

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@types/react-redux-toastr": "^7.6.2",
7878
"@types/react-router-dom": "^5.3.3",
7979
"@types/systemjs": "^6.1.0",
80+
"@types/uuid": "^8.3.4",
8081
"autoprefixer": "^9.8.6",
8182
"babel-eslint": "^11.0.0-beta.2",
8283
"babel-jest": "^24.9.0",

src-ts/config/environments/environment.default.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ export const EnvironmentConfigDefault: GlobalConfig = {
1818
SERVICE: 'platform-ui',
1919
},
2020
REAUTH_OFFSET: 55,
21+
// TODO: Move stripe creds to .env file
22+
STRIPE: {
23+
ADMIN_TOKEN:
24+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjI1NjMwNzY2ODksInVzZXJJZCI6IjQwMDUxMzMzIiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.wKWUe0-SaiFVN-VR_-GwgFlvWaDkSbc8H55ktb9LAVw',
25+
API_KEY: 'pk_test_rfcS49MHRVUKomQ9JgSH7Xqz',
26+
API_VERSION: '2020-08-27',
27+
CUSTOMER_TOKEN:
28+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg',
29+
},
2130
TAG_MANAGER_ID: undefined,
2231
TOPCODER_URLS: {
2332
CHALLENGES_PAGE: `${COMMUNITY_WEBSITE}/challenges`,

src-ts/config/environments/environment.dev.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,14 @@ export const EnvironmentConfigDev: GlobalConfig = {
88
DISABLED_TOOLS: [],
99
ENV: AppHostEnvironment.dev,
1010
LEARN_SRC: 'https://freecodecamp.topcoder-dev.com',
11+
// TODO: Move stripe creds to .env file
12+
STRIPE: {
13+
ADMIN_TOKEN:
14+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjI1NjMwNzY2ODksInVzZXJJZCI6IjQwMDUxMzMzIiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.wKWUe0-SaiFVN-VR_-GwgFlvWaDkSbc8H55ktb9LAVw',
15+
API_KEY: 'pk_test_rfcS49MHRVUKomQ9JgSH7Xqz',
16+
API_VERSION: '2020-08-27',
17+
CUSTOMER_TOKEN:
18+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg',
19+
},
1120
TAG_MANAGER_ID: 'GTM-W7B537Z',
1221
}

src-ts/config/environments/environment.prod.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ export const EnvironmentConfigProd: GlobalConfig = {
1616
DISABLED_TOOLS: [ ],
1717
ENV: AppHostEnvironment.prod,
1818
LEARN_SRC: 'https://fcc.topcoder.com:4431',
19+
// TODO: Move stripe creds to .env file
20+
STRIPE: {
21+
ADMIN_TOKEN:
22+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjI1NjMwNzY2ODksInVzZXJJZCI6IjQwMDUxMzMzIiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.wKWUe0-SaiFVN-VR_-GwgFlvWaDkSbc8H55ktb9LAVw',
23+
API_KEY: 'pk_live_m3bCBVSfkfMOEp3unZFRsHXi',
24+
API_VERSION: '2020-08-27',
25+
CUSTOMER_TOKEN:
26+
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg',
27+
},
1928
TAG_MANAGER_ID: 'GTM-MXXQHG8',
2029
TOPCODER_URLS: {
2130
CHALLENGES_PAGE: `${COMMUNITY_WEBSITE}/challenges`,

src-ts/declarations.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ declare module '*.html' {
33
export = htmlFile
44
}
55

6+
declare module '*.pdf'
7+
68
declare module '*.scss' {
79
const scssFile: { [style: string]: any }
810
export = scssFile

src-ts/lib/button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import '../styles/index.scss'
66
import { IconOutline } from '../svgs'
77

88
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
9-
export type ButtonStyle = 'icon' | 'link' | 'primary' | 'secondary' | 'tertiary' | 'text'
9+
export type ButtonStyle = 'icon' | 'icon-bordered' | 'link' | 'primary' | 'secondary' | 'tertiary' | 'text'
1010
export type ButtonType = 'button' | 'submit'
1111

1212
export interface ButtonProps {

src-ts/lib/contact-support-form/contact-support-form.config.ts

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,74 @@ export enum ContactSupportFormField {
88
}
99

1010
export const contactSupportFormDef: FormDefinition = {
11-
buttons: [
11+
buttons: {
12+
primaryGroup: [
13+
{
14+
buttonStyle: 'secondary',
15+
isSubmit: true,
16+
label: 'Submit',
17+
size: 'lg',
18+
type: 'submit',
19+
},
20+
],
21+
},
22+
groups: [
1223
{
13-
buttonStyle: 'secondary',
14-
isSave: true,
15-
label: 'Submit',
16-
size: 'lg',
17-
type: 'submit',
18-
},
19-
],
20-
inputs: [
21-
{
22-
label: 'First Name',
23-
name: ContactSupportFormField.first,
24-
type: 'text',
25-
validators: [
24+
inputs: [
2625
{
27-
validator: validatorRequired,
26+
label: 'First Name',
27+
name: ContactSupportFormField.first,
28+
type: 'text',
29+
validators: [
30+
{
31+
validator: validatorRequired,
32+
},
33+
],
2834
},
2935
],
3036
},
3137
{
32-
label: 'Last Name',
33-
name: ContactSupportFormField.last,
34-
type: 'text',
35-
validators: [
38+
inputs: [
3639
{
37-
validator: validatorRequired,
40+
label: 'Last Name',
41+
name: ContactSupportFormField.last,
42+
type: 'text',
43+
validators: [
44+
{
45+
validator: validatorRequired,
46+
},
47+
],
3848
},
3949
],
4050
},
4151
{
42-
label: 'Email',
43-
name: ContactSupportFormField.email,
44-
type: 'text',
45-
validators: [
46-
{
47-
validator: validatorEmail,
48-
},
52+
inputs: [
4953
{
50-
validator: validatorRequired,
54+
label: 'Email',
55+
name: ContactSupportFormField.email,
56+
type: 'text',
57+
validators: [
58+
{
59+
validator: validatorEmail,
60+
},
61+
{
62+
validator: validatorRequired,
63+
},
64+
],
5165
},
5266
],
5367
},
5468
{
55-
label: 'How can we help you?',
56-
name: ContactSupportFormField.question,
57-
type: 'textarea',
58-
validators: [
69+
inputs: [
5970
{
60-
validator: validatorRequired,
71+
label: 'How can we help you?',
72+
name: ContactSupportFormField.question,
73+
type: 'textarea',
74+
validators: [
75+
{
76+
validator: validatorRequired,
77+
},
78+
],
6179
},
6280
],
6381
},

src-ts/lib/form/Form.module.scss

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,38 @@
1919
display: flex;
2020
flex-direction: column;
2121
width: 100%;
22-
margin-top: auto;
23-
margin-bottom: -#{$pad-md};
24-
padding-top: $pad-xs;
25-
border-top: 1px solid $black-10;
26-
27-
@include gtemd {
28-
margin: $pad-xl 0 0;
29-
padding-top: $pad-xxxl;
30-
}
3122

3223
.button-container {
3324
display: flex;
3425
justify-content: flex-end;
26+
27+
.right-container {
28+
display: flex;
29+
flex: 1;
30+
justify-content: flex-end;
31+
32+
button {
33+
margin-right: 16px;
34+
35+
&:last-child {
36+
margin-right: 0;
37+
}
38+
}
39+
}
40+
41+
.left-container {
42+
display: flex;
43+
flex: 1;
44+
justify-content: flex-start;
45+
46+
button {
47+
margin-right: 16px;
48+
49+
&:last-child {
50+
margin-right: 0;
51+
}
52+
}
53+
}
3554
}
3655

3756
.form-error {
@@ -52,4 +71,4 @@
5271
margin-right: 0;
5372
}
5473
}
55-
}
74+
}

0 commit comments

Comments
 (0)