Skip to content

Revert "develop" #2357

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 1 commit into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ workflows:
filters:
branches:
only:
- hot-fixes
- legacy-tco
- legacy-tco
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"slick-carousel": "^1.8.1",
"supertest": "^3.1.0",
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
"topcoder-react-lib": "^0.7.14",
"topcoder-react-lib": "^0.7.11",
"topcoder-react-ui-kit": "^0.5.10",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
Expand Down
17 changes: 8 additions & 9 deletions src/shared/components/Contentful/Banner/themes/tco19.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,22 @@ $contentWrapperPadding: 0;
}

p {
font-size: 15px;
font-size: 20px;
margin-bottom: 1em;
line-height: 25px;

strong {
font-weight: bold;
}

em {
font-style: italic;
}
}

ul {
list-style: disc;
margin-bottom: 1em;
margin-left: 20px;

li {
p {
font-size: 16px;
line-height: 27px;
}
}
}

input {
Expand Down
15 changes: 3 additions & 12 deletions src/shared/components/Contentful/ContentBlock/themes/TCO19.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,13 @@
td {
@include roboto-regular;

font-size: 15px;
line-height: 25px;
font-size: 20px;
line-height: 70px;
text-align: left;
color: $tc-gray-80;
border-top: 1px solid #ededf2;
border-bottom: 1px solid #ededf2;
padding: 10px 0;
min-height: 51px;

&:first-child {
padding-left: 10px;
}

&:last-child {
padding-right: 10px;
}
padding: 0 10px;
}

ul,
Expand Down
10 changes: 5 additions & 5 deletions src/shared/components/Looker/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export default function Looker(props) {
cols.map((c) => {
const name = c.headerName;
const { styles } = c;
return name ? (
return (
<th key={name} style={styles}>{ name }</th>
) : null;
);
})

}
Expand All @@ -82,7 +82,7 @@ export default function Looker(props) {

const bodyRow = (record, cols, i) => (
<tr key={Object.values(record)}>
{ (countRows && (limit <= 0 || i < limit)) ? <td style={{ borderTop: '1px solid #D5D5D5' }}> {i + 1}. </td> : ' ' }
{ (countRows && (limit <= 0 || i < limit)) ? <td> {i + 1}. </td> : ' ' }
{
cols.map((c) => {
const prop = c.property;
Expand All @@ -96,11 +96,11 @@ export default function Looker(props) {
value = record[prop].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
}
return value ? (
return (
<td key={record[prop]} style={styles} title={value}>
{value}
</td>
) : null;
);
})
}
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/ProfilePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ProfilePage extends React.Component {
? _.get(info, 'competitionCountryCode') : _.get(info, 'homeCountryCode');

const result = _.find(lookupData.countries,
c => countryCode && c.countryCode === countryCode.toUpperCase());
c => c.countryCode === countryCode.toUpperCase());
country = _.isEmpty(result) ? '' : result.country;
}

Expand Down
16 changes: 11 additions & 5 deletions src/shared/components/Settings/Account/MyAccount/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/* eslint-disable no-undef */
import React from 'react';
import PT from 'prop-types';
import { omit, get } from 'lodash';
import { omit } from 'lodash';
import ConsentComponent from 'components/Settings/ConsentComponent';
import { Modal, PrimaryButton } from 'topcoder-react-ui-kit';
import Personalization from 'components/Settings/Preferences/Personalization';
Expand Down Expand Up @@ -57,6 +57,7 @@ export default class MyAccount extends ConsentComponent {
reNewPassword: '',
isMobileView: false,
screenSM: 767,
ssoUser: false,
isSent: false,
isOpen: false,
};
Expand Down Expand Up @@ -174,8 +175,12 @@ export default class MyAccount extends ConsentComponent {
}

onChangeEmail() {
const { profileState } = this.props;
if (get(profileState, 'credential.hasPassword')) {
const { profile } = this.props;
if (profile.withSSO !== null && profile.withSSO !== undefined && profile.withSSO) {
this.setState({
ssoUser: true,
});
} else {
const newState = { ...this.state };
newState.btnChangeEmailVisible = false;
newState.btnVerifiEmailVisible = true;
Expand Down Expand Up @@ -378,6 +383,7 @@ export default class MyAccount extends ConsentComponent {
showRePasswordTips,
rePasswordValid,
isValidEmail,
ssoUser,
isOpen,
} = this.state;

Expand Down Expand Up @@ -473,7 +479,7 @@ export default class MyAccount extends ConsentComponent {
</div>
</div>
{
get(profileState, 'credential.hasPassword', false) === false && (
ssoUser && (
<div styleName="error-message">
Since you joined Topcoder using your &lt;SSO Service&gt; account,
any email updates will need to be handled by logging in to
Expand Down Expand Up @@ -567,7 +573,7 @@ export default class MyAccount extends ConsentComponent {
</div>
</div>
{
get(profileState, 'credential.hasPassword', false) === false && (
ssoUser && (
<div styleName="error-message">
Since you joined Topcoder using your &lt;SSO Service&gt; account,
any email updates will need to be handled by logging in to
Expand Down
13 changes: 5 additions & 8 deletions src/shared/components/Settings/Preferences/Email/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ const newsletters = [
// desc: 'News summary from all tracks and programs',
// },
{
id: 'Design Newsletter',
id: 'TOPCODER_NL_DESIGN',
name: 'Design Newsletter',
desc: 'Website, mobile and product design; UI and UX',
},
{
id: 'Dev Newsletter',
id: 'TOPCODER_NL_DEV',
name: 'Development Newsletter',
desc: 'Software architecture, component assembly, application development, and bug hunting',
},
{
id: 'Data Science Newsletter',
id: 'TOPCODER_NL_DATA',
name: 'Data Science Newsletter',
desc: 'Algorithm and data structures, statistical analysis',
},
Expand Down Expand Up @@ -107,11 +107,8 @@ export default class EmailPreferences extends ConsentComponent {

onChange(id, checked) {
document.querySelectorAll(`#pre-onoffswitch-${id}`).forEach((el) => { el.checked = checked; }); // eslint-disable-line no-param-reassign
let { emailPreferences } = this.state;
emailPreferences = {
...emailPreferences,
[id]: checked,
};
const { emailPreferences } = this.state;
emailPreferences[id] = checked;
this.setState({
emailPreferences,
}, () => this.saveEmailPreferences());
Expand Down
16 changes: 0 additions & 16 deletions src/shared/components/Settings/Profile/BasicInfo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ export default class BasicInfo extends ConsentComponent {
let invalid = false;
let errorMessage = '';
let dateError = '';
let zipError = '';
let birthDateInvalid = false;
let zipInvalid = false;
const invalidFields = [];

if (!_.trim(newBasicInfo.firstName).length) {
Expand All @@ -125,13 +123,6 @@ export default class BasicInfo extends ConsentComponent {
errorMessage += ' cannot be empty';
}

_.forEach(newBasicInfo.addresses, (address) => {
if (!(/^[0-9-]*$/.test(address.zip))) {
zipError = 'You must enter a valid zip code';
zipInvalid = true;
}
});

if (_.trim(newBasicInfo.birthDate).length > 0) {
if (!moment().isAfter(newBasicInfo.birthDate)) {
dateError = 'You must enter a valid date for Birth Date';
Expand All @@ -146,13 +137,6 @@ export default class BasicInfo extends ConsentComponent {
invalid = birthDateInvalid;
}

if (errorMessage.length > 0) {
errorMessage = `${errorMessage}. ${zipError}`;
} else if (zipError.length > 0) {
errorMessage = zipError;
invalid = zipInvalid;
}

this.setState({ errorMessage, formInvalid: invalid });
return invalid;
}
Expand Down
2 changes: 0 additions & 2 deletions src/shared/components/Settings/Profile/Hobby/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ export default class Hobby extends ConsentComponent {
<div styleName="field row-1">
<label htmlFor="hobby">
Hobby
<span styleName="text-required">* Required</span>
<input type="hidden" />
</label>
<input disabled={!canModifyTrait} id="hobby" name="hobby" type="text" placeholder="Hobby" onChange={this.onUpdateInput} value={newHobby.hobby} maxLength="128" required />
Expand All @@ -352,7 +351,6 @@ export default class Hobby extends ConsentComponent {
<label styleName="description-label" htmlFor="description">
<span>
Description
<span styleName="text-required">* Required</span>
</span>
{' '}
<span styleName="description-counts">
Expand Down
6 changes: 0 additions & 6 deletions src/shared/components/Settings/Profile/Hobby/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,6 @@ textarea {
line-height: 15px;
font-weight: 500;
color: $tc-gray-80;

.text-required {
font-size: 10px;
color: $tc-red-110;
margin-left: 5px;
}
}

&.col-1 {
Expand Down
1 change: 0 additions & 1 deletion src/shared/components/Settings/Profile/Skills/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ export default class Skills extends ConsentComponent {
<div styleName="field">
<label htmlFor="skills">
Skill
<span styleName="text-required">* Required</span>
<input type="hidden" />
</label>
<Select
Expand Down
6 changes: 0 additions & 6 deletions src/shared/components/Settings/Profile/Skills/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,6 @@
line-height: 15px;
color: $tc-gray-80;
margin-bottom: 6px;

.text-required {
font-size: 10px;
color: $tc-red-110;
margin-left: 5px;
}
}

.col-1,
Expand Down
7 changes: 1 addition & 6 deletions src/shared/components/tc-communities/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,7 @@ Toggle navigation
<div className={isMobileOpen ? theme.menuWrapOpen : theme.menuWrap}>
{
menuItems[0] && menuItems[0].navigationMenu ? (
<Menu
id={menuItems[0].navigationMenu}
baseUrl={baseUrl}
spaceName={menuItems[0].spaceName}
environment={menuItems[0].environment}
/>
<Menu id={menuItems[0].navigationMenu} baseUrl={baseUrl} />
) : (
<ul className={theme.menu}>
{_.map(menuItems, menuIterator)}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/routes/Communities/TCO03/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function TCO03({ base }) {
<ContentfulRoute
baseUrl={base}
error404={<Error404 />}
id="2MKnrhssyBHnKH2wuV9Ate"
id="4mKZxfgAi6Us6dRS4Hy2Ab"
/>
<Route
component={Error404}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/routes/Communities/TCO07/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function TCO07({ base }) {
<ContentfulRoute
baseUrl={base}
error404={<Error404 />}
id="52NfYmZnxLnJXKpIQXwnzC"
id="2XWcxVALvInOlAOfROErKS"
/>
<Route
component={Error404}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/routes/Topcoder/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function Topcoder() {
<Route
component={Profile}
exact
path="/members/:handle([\w\-\[\].{} ]{2,15})"
path="/members/:handle([\w\-\[\].{}]{2,15})"
/>
<Route
component={() => <Settings base="/settings" />}
Expand All @@ -80,7 +80,7 @@ export default function Topcoder() {
<Route
component={ProfileStats}
exact
path="/members/:handle([\w\-\[\].{} ]{2,15})/details"
path="/members/:handle([\w\-\[\].{}]{2,15})/details"
/>
<Error404 />
</Switch>
Expand Down