From 5e16bd1e8f721e3378cd2dd5fe3099f12bebca87 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 12 Oct 2020 10:16:38 +0300 Subject: [PATCH 01/41] #5032 removed dropdown --- .../components/tc-communities/Header/index.jsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/shared/components/tc-communities/Header/index.jsx b/src/shared/components/tc-communities/Header/index.jsx index c610f947e6..14ef6b98da 100644 --- a/src/shared/components/tc-communities/Header/index.jsx +++ b/src/shared/components/tc-communities/Header/index.jsx @@ -232,14 +232,16 @@ function Header(props) {
{renderedLogos}
- -
- -
- + { + !_.startsWith(communityId, 'tco') ? ( +
+ +
+ ) : null + }
{profile && ( From b8c4a594cd986c7f0303d0f25c303a3bac4960d0 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 12 Oct 2020 12:47:18 +0300 Subject: [PATCH 02/41] Add logo and profile --- src/assets/themes/tco/TCO20.svg | 36 ++++++++++ src/shared/app.jsx | 2 +- .../tc-communities/tco20/Header.jsx | 68 +++++++++++++++++++ .../tc-communities/tco20/header.scss | 33 +++++++++ .../routes/Communities/TCO20/Routes.jsx | 13 +--- 5 files changed, 140 insertions(+), 12 deletions(-) create mode 100644 src/assets/themes/tco/TCO20.svg create mode 100644 src/shared/containers/tc-communities/tco20/Header.jsx create mode 100644 src/shared/containers/tc-communities/tco20/header.scss diff --git a/src/assets/themes/tco/TCO20.svg b/src/assets/themes/tco/TCO20.svg new file mode 100644 index 0000000000..75ad154442 --- /dev/null +++ b/src/assets/themes/tco/TCO20.svg @@ -0,0 +1,36 @@ + + + TCO20 Logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/shared/app.jsx b/src/shared/app.jsx index fa3d6bd2b6..7d80ade47d 100644 --- a/src/shared/app.jsx +++ b/src/shared/app.jsx @@ -49,7 +49,7 @@ export default function App() { transitionOut="fadeOut" progressBar={false} /> - { isomorphy.isDevBuild() ? : undefined } + {/* { isomorphy.isDevBuild() ? : undefined } */}
); } diff --git a/src/shared/containers/tc-communities/tco20/Header.jsx b/src/shared/containers/tc-communities/tco20/Header.jsx new file mode 100644 index 0000000000..a6f8d32e5f --- /dev/null +++ b/src/shared/containers/tc-communities/tco20/Header.jsx @@ -0,0 +1,68 @@ +/** TCO20 special header */ + +import PT from 'prop-types'; +import React from 'react'; +import ContentfulMenu from 'components/Contentful/Menu'; +import { Link } from 'topcoder-react-utils'; +import { connect } from 'react-redux'; +import { Avatar } from 'topcoder-react-ui-kit'; +import TCO20Logo from 'assets/themes/tco/TCO20.svg'; +import defaultStyle from './header.scss'; + +function TCO20Header(props) { + const { base, meta, auth } = props; + console.log('TCO20Header', props) + return ( +
+ + + + { + meta.menuItems ? ( + + ) : null + } +
+ { + auth && auth.profile ? ( + + + {auth.profile.handle} + + + + ) : ( + + LOGIN + SIGN UP + + ) + } +
+
+ ); +} + +TCO20Header.defaultProps = { + base: '', + auth: null, +}; + +TCO20Header.propTypes = { + base: PT.string, + meta: PT.shape().isRequired, + auth: PT.shape(), +}; + +function mapStateToProps(state) { + return { + auth: state.auth, + }; +} + +export default connect(mapStateToProps)(TCO20Header); diff --git a/src/shared/containers/tc-communities/tco20/header.scss b/src/shared/containers/tc-communities/tco20/header.scss new file mode 100644 index 0000000000..03fefdd913 --- /dev/null +++ b/src/shared/containers/tc-communities/tco20/header.scss @@ -0,0 +1,33 @@ +@import '~styles/mixins'; + +.topHeader { + display: flex; + align-items: center; + background-color: $tc-black; + + @include xs-to-sm { + flex-direction: column; + padding-top: 15px; + } + + .headerLogo { + svg { + max-height: 28px; + } + } + + .profile { + margin-right: 26px; + display: flex; + + .userMenuHandle { + color: #fff; + font-size: 14px; + font-weight: 700; + line-height: 30px; + white-space: nowrap; + font-family: Roboto, sans-serif; + margin-right: 12px; + } + } +} diff --git a/src/shared/routes/Communities/TCO20/Routes.jsx b/src/shared/routes/Communities/TCO20/Routes.jsx index 3f4ab6b468..bfb0a513bb 100644 --- a/src/shared/routes/Communities/TCO20/Routes.jsx +++ b/src/shared/routes/Communities/TCO20/Routes.jsx @@ -7,24 +7,15 @@ import PT from 'prop-types'; import React from 'react'; import { Route, Switch } from 'react-router-dom'; import ContentfulRoute from 'components/Contentful/Route'; -import ContentfulMenu from 'components/Contentful/Menu'; import Viewport from 'components/Contentful/Viewport'; import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; +import TCO20Header from 'containers/tc-communities/tco20/Header'; export default function TCO20({ base, meta }) { return (
- { - meta.menuItems ? ( - - ) : null - } + } From 14aac6ef11c5d283dd8c2a5b3ce6a72c51769b80 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 13 Oct 2020 21:52:54 -0300 Subject: [PATCH 03/41] SSR: Revert changes make in PR #4285 --- src/shared/routes/ChallengeDetails.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/shared/routes/ChallengeDetails.jsx b/src/shared/routes/ChallengeDetails.jsx index 0775d1f88a..3c685f522a 100644 --- a/src/shared/routes/ChallengeDetails.jsx +++ b/src/shared/routes/ChallengeDetails.jsx @@ -7,9 +7,10 @@ import _ from 'lodash'; import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; +import path from 'path'; import React from 'react'; import qs from 'qs'; -import { AppChunk } from 'topcoder-react-utils'; +import { AppChunk, webpack } from 'topcoder-react-utils'; export default function ChallengeDetailsRoute(props) { return ( @@ -30,6 +31,11 @@ export default function ChallengeDetailsRoute(props) { }) } renderPlaceholder={() => } + renderServer={() => { + const p = webpack.resolveWeak('containers/challenge-detail'); + const ChallengeDetails = webpack.requireWeak(path.resolve(__dirname, p)); + return ; + }} /> ); } From b9e2811b9e144a9fc6fde13783ce98c6bf337ba2 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Tue, 13 Oct 2020 21:55:21 -0300 Subject: [PATCH 04/41] ci: deploy seo-fix to Stag env Issue #5022 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e58d6ae06..d016778e15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -260,7 +260,7 @@ workflows: branches: only: - develop - - listing-develop-sync + - seo-fix # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 1d2a7f1da2c21dae76ae7ea9fccb5d7be735c7b5 Mon Sep 17 00:00:00 2001 From: Dedy Wahyudi Date: Wed, 14 Oct 2020 12:06:27 +0700 Subject: [PATCH 05/41] Fixes for 4029, 4994, 5102 --- .../Specification/SideBar/index.jsx | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 42912944d5..281e23b9a9 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -197,9 +197,40 @@ export default function SideBar({ ) } + { + !isDesign && ( + + + Usable Code in Dev Challenges + + + ) + }
) } + { isMM && ( +
+

+ CHALLENGE LINKS: +

+

+ + How To Compete in a Marathon Match + +

+
+ )} { isDesign && ( @@ -331,6 +362,23 @@ export default function SideBar({ ) } + { !isDesign && ( +
+

+ TOOLBOX: +

+

+ + Topcoder Extension for VSCode + +

+
+ )} { shareable && (

From 5f31b7891fe2951bb99a89224bfef101666f5150 Mon Sep 17 00:00:00 2001 From: Dedy Wahyudi Date: Wed, 14 Oct 2020 22:56:27 +0700 Subject: [PATCH 06/41] fixes based on feedback --- .../Specification/SideBar/index.jsx | 70 +++++++++++++------ .../Specification/SideBar/styles.scss | 4 ++ 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 281e23b9a9..5a0d32a16f 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -88,6 +88,28 @@ export default function SideBar({

); + const usableCodeArticle = ( +
+

+ Useable Code Rules +

+

+ A set of guidelines to help determine if code is acceptable or not. +

+
+ ); + + const vscodeTip = ( +
+

+ Topcoder Extension for VSCode +

+

+ Shortcuts to perform actions related to Topcoder platform without having to open a browser +

+
+ ); + return (
@@ -199,15 +221,20 @@ export default function SideBar({ } { !isDesign && ( - + - Usable Code in Dev Challenges + Useable Code Rules + +
+ ? +
+
) } @@ -362,23 +389,26 @@ export default function SideBar({
) } - { !isDesign && ( -
-

- TOOLBOX: -

-

- - Topcoder Extension for VSCode - -

-
- )} +
+

+ TOOLBOX: +

+ + + Topcoder Extension
for VSCode +
+ +
+ ? +
+
+
+
{ shareable && (

diff --git a/src/shared/components/challenge-detail/Specification/SideBar/styles.scss b/src/shared/components/challenge-detail/Specification/SideBar/styles.scss index f306f370e9..131f15fb3e 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/styles.scss +++ b/src/shared/components/challenge-detail/Specification/SideBar/styles.scss @@ -1,5 +1,9 @@ @import "mixins"; +.no-margin-top { + margin-top: -10px !important; +} + .challenge-spec-sidebar { background: $tc-dark-blue-10; width: 245px; From d58f28881c1a383001d79d87c13028173bd8b499 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Wed, 14 Oct 2020 23:22:30 -0300 Subject: [PATCH 07/41] ci: deploy dedywahyudi/4029-4994-5102 to Stag env Issues: #4029 #4994 #5102 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e58d6ae06..9bb3b79969 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -260,7 +260,7 @@ workflows: branches: only: - develop - - listing-develop-sync + - dedywahyudi/4029-4994-5102 # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From b13b2de5cc8b731abb316a95eb968d1e31200e0d Mon Sep 17 00:00:00 2001 From: Dedy Wahyudi Date: Thu, 15 Oct 2020 11:25:42 +0700 Subject: [PATCH 08/41] move url to configs --- config/default.js | 3 +++ .../challenge-detail/Specification/SideBar/index.jsx | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/default.js b/config/default.js index ccf981f212..fafbb59363 100644 --- a/config/default.js +++ b/config/default.js @@ -143,6 +143,9 @@ module.exports = { STUDIO_FONTS_POLICY: 'http://help.topcoder.com/hc/en-us/articles/217959447-Font-Policy-for-Design-Challenges', TOPCODER_TERMS: 'https://www.topcoder.com/community/how-it-works/terms/', + HOWTOCOMPETEINMARATHON: 'https://www.topcoder.com/thrive/articles/How%20To%20Compete%20in%20a%20Marathon%20Match', + USABLECODEDEV: 'https://www.topcoder.com/thrive/articles/Usable%20Code%20in%20Dev%20Challenges', + EXTENSIONVSCODE: 'https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview', }, IOS: 'https://ios.topcoder-dev.com', diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 5a0d32a16f..0822d1cafc 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -223,7 +223,7 @@ export default function SideBar({ !isDesign && (

Date: Thu, 15 Oct 2020 13:52:36 +0700 Subject: [PATCH 09/41] fix different spacing --- .../components/challenge-detail/Specification/SideBar/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx index 0822d1cafc..5b4fe7aa2c 100644 --- a/src/shared/components/challenge-detail/Specification/SideBar/index.jsx +++ b/src/shared/components/challenge-detail/Specification/SideBar/index.jsx @@ -221,7 +221,7 @@ export default function SideBar({ } { !isDesign && ( - + Date: Thu, 15 Oct 2020 11:19:27 +0300 Subject: [PATCH 10/41] Fixes for #5032 --- src/shared/app.jsx | 2 +- src/shared/components/buttons/themed/tc.scss | 3 + .../tc-communities/tco20/Header.jsx | 55 ++++++++++++------- .../tc-communities/tco20/header.scss | 39 ++++++++++++- src/shared/utils/url.js | 9 +++ 5 files changed, 84 insertions(+), 24 deletions(-) diff --git a/src/shared/app.jsx b/src/shared/app.jsx index 7d80ade47d..fa3d6bd2b6 100644 --- a/src/shared/app.jsx +++ b/src/shared/app.jsx @@ -49,7 +49,7 @@ export default function App() { transitionOut="fadeOut" progressBar={false} /> - {/* { isomorphy.isDevBuild() ? : undefined } */} + { isomorphy.isDevBuild() ? : undefined }

); } diff --git a/src/shared/components/buttons/themed/tc.scss b/src/shared/components/buttons/themed/tc.scss index 952fd18d83..1c0e006caf 100644 --- a/src/shared/components/buttons/themed/tc.scss +++ b/src/shared/components/buttons/themed/tc.scss @@ -7,6 +7,7 @@ text-decoration: none !important; text-transform: uppercase !important; margin: 0 !important; + white-space: nowrap !important; } @mixin primary-green { @@ -107,6 +108,7 @@ text-decoration: none !important; text-transform: uppercase !important; margin: 0 !important; + white-space: nowrap !important; } @mixin secondary-gray { @@ -133,6 +135,7 @@ font-weight: 700 !important; text-transform: uppercase !important; margin: 0 !important; + white-space: nowrap !important; } @mixin warn-red { diff --git a/src/shared/containers/tc-communities/tco20/Header.jsx b/src/shared/containers/tc-communities/tco20/Header.jsx index a6f8d32e5f..f38752317a 100644 --- a/src/shared/containers/tc-communities/tco20/Header.jsx +++ b/src/shared/containers/tc-communities/tco20/Header.jsx @@ -3,20 +3,47 @@ import PT from 'prop-types'; import React from 'react'; import ContentfulMenu from 'components/Contentful/Menu'; -import { Link } from 'topcoder-react-utils'; +import { Link, config } from 'topcoder-react-utils'; import { connect } from 'react-redux'; import { Avatar } from 'topcoder-react-ui-kit'; +import MediaQuery from 'react-responsive'; +import { getCurrentUrl } from 'utils/url'; import TCO20Logo from 'assets/themes/tco/TCO20.svg'; import defaultStyle from './header.scss'; function TCO20Header(props) { const { base, meta, auth } = props; - console.log('TCO20Header', props) + const profileHTML = () => ( +
+ { + auth && auth.profile ? ( + + + {auth.profile.handle} + + + + ) : ( + + LOGIN + SIGN UP + + ) + } +
+ ); return (
- - - +
+ + + + + { + profileHTML() + } + +
{ meta.menuItems ? ( ) : null } -
+ { - auth && auth.profile ? ( - - - {auth.profile.handle} - - - - ) : ( - - LOGIN - SIGN UP - - ) + profileHTML() } -
+
); } diff --git a/src/shared/containers/tc-communities/tco20/header.scss b/src/shared/containers/tc-communities/tco20/header.scss index 03fefdd913..ebe422a655 100644 --- a/src/shared/containers/tc-communities/tco20/header.scss +++ b/src/shared/containers/tc-communities/tco20/header.scss @@ -1,4 +1,5 @@ @import '~styles/mixins'; +@import 'components/buttons/themed/tc.scss'; .topHeader { display: flex; @@ -10,9 +11,22 @@ padding-top: 15px; } - .headerLogo { - svg { - max-height: 28px; + .logoWrapp { + display: flex; + justify-content: space-between; + + @include xs-to-sm { + width: 100%; + } + + .headerLogo { + svg { + max-height: 28px; + + @include xs-to-sm { + margin-left: -35px; + } + } } } @@ -29,5 +43,24 @@ font-family: Roboto, sans-serif; margin-right: 12px; } + + .loginLink { + text-decoration: none; + color: #888894; + font-family: Roboto, sans-serif; + font-size: 13px; + font-weight: bold; + line-height: 30px; + margin-right: 30px; + } + + .signUpLink { + @include primary-borderless; + @include sm; + + &:hover { + @include primary-borderless; + } + } } } diff --git a/src/shared/utils/url.js b/src/shared/utils/url.js index f7c76b3da9..52ad5430a8 100644 --- a/src/shared/utils/url.js +++ b/src/shared/utils/url.js @@ -8,6 +8,15 @@ import _ from 'lodash'; import qs from 'qs'; import { isomorphy } from 'topcoder-react-utils'; import { BUCKETS } from 'utils/challenge-listing/buckets'; + +/** + * Get current URL + */ +export function getCurrentUrl() { + if (isomorphy.isServerSide()) return null; + return window.location.href; +} + /** * Get current URL hash parameters as object */ From 1aa1e015863cbe727ecfd4225d87955a22db87a1 Mon Sep 17 00:00:00 2001 From: PrakashDurlabhji Date: Thu, 15 Oct 2020 22:20:22 +0530 Subject: [PATCH 11/41] Update index.jsx --- src/shared/components/challenge-listing/Sidebar/index.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/components/challenge-listing/Sidebar/index.jsx b/src/shared/components/challenge-listing/Sidebar/index.jsx index 903d90cde0..13a150688f 100644 --- a/src/shared/components/challenge-listing/Sidebar/index.jsx +++ b/src/shared/components/challenge-listing/Sidebar/index.jsx @@ -39,7 +39,7 @@ export default function SideBarFilters({ // editSavedFiltersMode, // extraBucket, // filterState, - hideTcLinksInFooter, + // hideTcLinksInFooter, isAuth, // resetFilterName, // savedFilters, @@ -84,7 +84,7 @@ export default function SideBarFilters({ /> {/* )} */}
-