From 6182dba987807d366c93dc17cc1a2bee0288adec Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 21 Feb 2022 16:58:21 +0200 Subject: [PATCH 1/7] add params to navi #6028 --- config/production.js | 52 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/config/production.js b/config/production.js index 6557caf03e..6d3142daf7 100644 --- a/config/production.js +++ b/config/production.js @@ -68,13 +68,13 @@ module.exports = { ACCOUNT_MENU_SWITCH_TEXT: { title: 'Switch to BUSINESS', - href: 'https://connect.topcoder.com', + href: 'https://connect.topcoder.com?ref=nav', }, HEADER_MENU: [ { id: 'business', title: 'BUSINESS', - href: 'https://www.topcoder.com', + href: 'https://www.topcoder.com?ref=nav', }, { id: 'community', // required for 'Switch to BUSINESS' to work @@ -83,29 +83,29 @@ module.exports = { { id: 'home', title: 'Home', - href: '/home', + href: '/home?ref=nav', logged: true, }, { id: 'myprofile', title: 'My Profile', - href: '/members/willFilledByUserName', + href: '/members/willFilledByUserName?ref=nav', logged: true, }, { title: 'Payments', - href: 'https://community.topcoder.com/PactsMemberServlet?module=PaymentHistory&full_list=false', + href: 'https://community.topcoder.com/PactsMemberServlet?module=PaymentHistory&full_list=false&ref=nav', logged: true, openNewTab: true, }, { title: 'Overview', - href: '/community/learn', + href: '/community/learn?ref=nav', logged: false, }, { title: 'How It Works', - href: '/thrive/tracks?track=Topcoder', + href: '/thrive/tracks?track=Topcoder&ref=nav', logged: false, }, ], @@ -115,19 +115,19 @@ module.exports = { subMenu: [ { title: 'All Challenges', - href: '/challenges', + href: '/challenges?ref=nav', }, { title: 'Competitive Programming', - href: '/community/arena', + href: '/community/arena?ref=nav', }, { title: 'Gig Work', - href: '/gigs', + href: '/gigs?ref=nav', }, { title: 'Practice', - href: '/community/practice', + href: '/community/practice?ref=nav', }, ], }, @@ -136,23 +136,23 @@ module.exports = { subMenu: [ { title: 'Competitive Programming', - href: '/thrive/tracks?track=Competitive%20Programming', + href: '/thrive/tracks?track=Competitive%20Programming&ref=nav', }, { title: 'Data Science', - href: '/thrive/tracks?track=Data%20Science', + href: '/thrive/tracks?track=Data%20Science&ref=nav', }, { title: 'Design', - href: '/thrive/tracks?track=Design', + href: '/thrive/tracks?track=Design&ref=nav', }, { title: 'Development', - href: '/thrive/tracks?track=Development', + href: '/thrive/tracks?track=Development&ref=nav', }, { title: 'QA', - href: '/thrive/tracks?track=QA', + href: '/thrive/tracks?track=QA&ref=nav', }, ], }, @@ -161,34 +161,34 @@ module.exports = { subMenu: [ { title: 'TCO', - href: '/community/member-programs/topcoder-open', + href: '/community/member-programs/topcoder-open?ref=nav', }, { title: 'Programs', - href: '/community/member-programs', + href: '/community/member-programs?ref=nav', }, { title: 'Forums', - href: 'https://discussions.topcoder.com', + href: 'https://discussions.topcoder.com?ref=nav', }, { title: 'Statistics', - href: '/community/statistics', + href: '/community/statistics?ref=nav', }, { title: 'Blog', - href: 'https://www.topcoder.com/blog', + href: 'https://www.topcoder.com/blog?ref=nav', openNewTab: true, }, { title: 'Thrive', - href: '/thrive', + href: '/thrive?ref=nav', }, ], }, { title: 'Discord', - href: 'https://discord.gg/topcoder', + href: 'https://discord.gg/topcoder?ref=nav', openNewTab: true, }, ], @@ -202,17 +202,17 @@ module.exports = { ACCOUNT_MENU: [ { title: 'Settings', - href: '/settings/profile', + href: '/settings/profile?ref=nav', }, { separator: true }, { title: 'Help', - href: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles', + href: 'https://www.topcoder.com/thrive/tracks?track=Topcoder&tax=Help%20Articles&ref=nav', }, { separator: true }, { title: 'Log Out', - href: 'https://www.topcoder.com/logout', + href: 'https://www.topcoder.com/logout?ref=nav', }, ], // Config for TC EDU - THRIVE From 66657ad6a720961a4409fcf5a0cf106e28b4270d Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 21 Feb 2022 16:58:58 +0200 Subject: [PATCH 2/7] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bb0a50e15..28685790aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -364,7 +364,7 @@ workflows: filters: branches: only: - - jan-updates-2 + - navi-params # This is stage env for production QA releases - "build-prod-staging": context : org-global From 30fdaebf5988101ac46e39543839909e1a15e6c5 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 21 Feb 2022 17:40:16 +0200 Subject: [PATCH 3/7] footer nav --- .../__snapshots__/TopcoderFooter.jsx.snap | 84 +++++++++---------- .../components/TopcoderFooter/index.jsx | 84 +++++++++---------- 2 files changed, 84 insertions(+), 84 deletions(-) diff --git a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap index d7932d91ea..fb566df188 100644 --- a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap +++ b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap @@ -45,7 +45,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > All Challenges @@ -55,7 +55,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Competitive Programming @@ -65,7 +65,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Gig Work @@ -75,7 +75,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Practice @@ -101,7 +101,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Competitive Programming @@ -111,7 +111,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Data Science @@ -121,7 +121,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Design @@ -131,7 +131,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Development @@ -141,7 +141,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > QA @@ -177,7 +177,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Events Calendar @@ -187,7 +187,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Forums @@ -197,7 +197,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Programs @@ -207,7 +207,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Statistics @@ -217,7 +217,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > TCO @@ -227,7 +227,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Thrive @@ -237,7 +237,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Discord @@ -263,7 +263,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Getting Paid @@ -273,7 +273,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > FAQ @@ -283,7 +283,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > General Info @@ -319,7 +319,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Contact Us @@ -329,7 +329,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Join Community @@ -339,7 +339,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > About Community @@ -349,7 +349,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Changelog @@ -359,7 +359,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Talk to Sales @@ -382,7 +382,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__social-icons___3CNGG" > @@ -400,7 +400,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -418,7 +418,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -436,7 +436,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -454,7 +454,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -472,7 +472,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -512,12 +512,12 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__mobile-navi-col___3BcW4" > COMPETE TRACKS @@ -526,12 +526,12 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__mobile-navi-col___3BcW4" > COMMUNITY HELP CENTER @@ -540,7 +540,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__mobile-navi-col___3BcW4" > Contact Us @@ -550,7 +550,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__mobile-only___6RuB2 src-shared-components-TopcoderFooter-___style__social-icons___3CNGG" > @@ -568,7 +568,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -586,7 +586,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -604,7 +604,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -622,7 +622,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -640,7 +640,7 @@ exports[`Matches shallow shapshot 1`] = ` @@ -677,7 +677,7 @@ exports[`Matches shallow shapshot 1`] = ` © 2022 Topcoder Policies diff --git a/src/shared/components/TopcoderFooter/index.jsx b/src/shared/components/TopcoderFooter/index.jsx index d97986455d..4d25e409e7 100644 --- a/src/shared/components/TopcoderFooter/index.jsx +++ b/src/shared/components/TopcoderFooter/index.jsx @@ -54,21 +54,21 @@ export default function TopcoderFooter() {

COMPETE

    - All Challenges - Competitive Programming - Gig Work - Practice + All Challenges + Competitive Programming + Gig Work + Practice

TRACKS

    - Competitive Programming - Data Science - Design - Development - QA + Competitive Programming + Data Science + Design + Development + QA
@@ -76,22 +76,22 @@ export default function TopcoderFooter() {
    Blog - Events Calendar - Forums - Programs - Statistics - TCO - Thrive - Discord + Events Calendar + Forums + Programs + Statistics + TCO + Thrive + Discord

HELP CENTER

    - Getting Paid - FAQ - General Info + Getting Paid + FAQ + General Info Website Help
@@ -99,54 +99,54 @@ export default function TopcoderFooter() {

ABOUT

    - Contact Us + Contact Us {!loggedIn - && Join Community + && Join Community } - About Community - Changelog - Talk to Sales + About Community + Changelog + Talk to Sales

FOLLOW US

- - - - - - + + + + + +
- - - - - - + + + + + +
{`© ${currentYear} Topcoder`} - Policies + Policies
From 590d2afcdfc0d5e05470b8f5b6f5a7144767c0b5 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 22 Feb 2022 09:42:46 +0200 Subject: [PATCH 4/7] added ref to blog link in footer --- .../shared/components/__snapshots__/TopcoderFooter.jsx.snap | 2 +- src/shared/components/TopcoderFooter/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap index fb566df188..7b96004187 100644 --- a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap +++ b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap @@ -167,7 +167,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__link___3-nzm" > Blog diff --git a/src/shared/components/TopcoderFooter/index.jsx b/src/shared/components/TopcoderFooter/index.jsx index 4d25e409e7..c3bdedef35 100644 --- a/src/shared/components/TopcoderFooter/index.jsx +++ b/src/shared/components/TopcoderFooter/index.jsx @@ -75,7 +75,7 @@ export default function TopcoderFooter() {

COMMUNITY

From 043eed0e7234984ec6e259ab84fd89f7785d73f5 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 7 Mar 2022 21:17:43 +0200 Subject: [PATCH 6/7] 404 page --- __tests__/shared/components/Error404.jsx | 27 -------------- .../__snapshots__/Error404.jsx.snap | 35 ------------------- src/shared/components/Error404/index.jsx | 10 +++--- src/shared/components/Error404/style.scss | 1 - 4 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 __tests__/shared/components/Error404.jsx delete mode 100644 __tests__/shared/components/__snapshots__/Error404.jsx.snap diff --git a/__tests__/shared/components/Error404.jsx b/__tests__/shared/components/Error404.jsx deleted file mode 100644 index c62b9aa560..0000000000 --- a/__tests__/shared/components/Error404.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import Error404 from 'components/Error404'; -import React from 'react'; -import { BrowserRouter, StaticRouter } from 'react-router-dom'; -import renderer from 'react-test-renderer'; - -function render(context) { - return renderer.create(( - - - - )).toJSON(); -} - -test('renders correctly with context', () => expect(render({})).toMatchSnapshot()); - -test('renders correctly without context', () => expect(renderer.create(( - - - -)).toJSON()).toMatchSnapshot()); - -test('writes error to the context, if provided', () => { - const context = {}; - render(context); - const { status } = context; - expect(status).toBe(404); -}); diff --git a/__tests__/shared/components/__snapshots__/Error404.jsx.snap b/__tests__/shared/components/__snapshots__/Error404.jsx.snap deleted file mode 100644 index 7e7e7b30d5..0000000000 --- a/__tests__/shared/components/__snapshots__/Error404.jsx.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`renders correctly with context 1`] = ` -
-

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

-
-`; - -exports[`renders correctly without context 1`] = ` -
-

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

-
-`; diff --git a/src/shared/components/Error404/index.jsx b/src/shared/components/Error404/index.jsx index 986ce462d7..8503c54b6a 100644 --- a/src/shared/components/Error404/index.jsx +++ b/src/shared/components/Error404/index.jsx @@ -5,6 +5,7 @@ import _ from 'lodash'; import React from 'react'; import { Route } from 'react-router-dom'; +import Viewport from 'components/Contentful/Viewport'; import './style.scss'; export default function Page404() { @@ -16,12 +17,9 @@ export default function Page404() { return null; }} /> -

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

+
); } diff --git a/src/shared/components/Error404/style.scss b/src/shared/components/Error404/style.scss index 3df5f3ee44..68b1a7ba92 100644 --- a/src/shared/components/Error404/style.scss +++ b/src/shared/components/Error404/style.scss @@ -7,7 +7,6 @@ flex-direction: column; min-height: 400px; text-align: center; - padding: 150px 0; } .details { From 3401fab5b078709bf9f00293241f1856c841a59b Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 7 Mar 2022 21:18:58 +0200 Subject: [PATCH 7/7] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bb0a50e15..addf6b4a22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -364,7 +364,7 @@ workflows: filters: branches: only: - - jan-updates-2 + - 404-page # This is stage env for production QA releases - "build-prod-staging": context : org-global