diff --git a/.circleci/config.yml b/.circleci/config.yml index 62f1ece1cb..cf44caf822 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -175,10 +175,6 @@ workflows: branches: only: - develop - - hot-fix - - survey_tc - - fix-groups-updates - - sort_registrations_submissions # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -186,6 +182,7 @@ workflows: branches: only: - develop + - feature-contentful # This is beta env for production soft releases - "build-prod-beta": context : org-global diff --git a/docs/deployment-env.md b/docs/deployment-env.md index 8a77160914..f6b5999d8a 100644 --- a/docs/deployment-env.md +++ b/docs/deployment-env.md @@ -2,9 +2,49 @@ There are total 4 deployment environments -| S | Environment | Backend API | Purpose | URL | -| - | ------------ | ----------- | --------------------- | -------------------------------------------- | -| 1 | Development | Development | feature/fixes testing | `https://community-app.topcoder-dev.com` | -| 2 | Test | Development | feature/fixes testing | `https://test-community-app.topcoder-dev.com`| -| 3 | Beta | Production | Smoke testing only | `https://beta-community-app.topcoder.com` | -| 4 | Production | Production | Main production | `https://www.topcoder.com` | +| S | Environment | Backend API | Purpose | URL | +| - | ------------ | ----------- | ------------------------ | -------------------------------------------- | +| 1 | Development | Development | feature/fixes testing | `https://community-app.topcoder-dev.com` | +| 2 | Test | Development | feature/fixes testing | `https://test-community-app.topcoder-dev.com`| +| 3 | QA | Development | Smoke/regression testing | `https://qa-community-app.topcoder-dev.com` | +| 4 | Beta | Production | Smoke testing only | `https://beta-community-app.topcoder.com` | +| 5 | Production | Production | Main production | `https://www.topcoder.com` | + + +## Deploy your branch on test environments + +Deploy your branch on test and development environements by making following changes. + +1. Please do communicate on slack (#community-app channel) before you do that as other might be using the environemnt of testing. +2. Checkout the intended branch +3. Got to `.circleci/config.yml` and add [your-branch] under desired environement, please dont change anything under production workflow. Add branch to only one workflow. + +``` +workflows: + version: 2 + build: + jobs: + # Development builds are executed on "new-develop" branch only. + - "build-dev": + context : org-global + filters: + branches: + only: + - develop + - [your-branch] + # This is alternate dev env for parallel testing + - "build-test": + context : org-global + filters: + branches: + only: + - develop + # This is beta env for production soft releases + - "build-prod-beta": + context : org-global + filters: + branches: + only: + - develop +``` +4. Commit the changes diff --git a/src/assets/images/img-Topcoder.png b/src/assets/images/img-Topcoder.png index 09b438d235..78aab1045a 100644 Binary files a/src/assets/images/img-Topcoder.png and b/src/assets/images/img-Topcoder.png differ diff --git a/src/assets/images/new-arrow-left.svg b/src/assets/images/new-arrow-left.svg index 496baa07b8..e50a004f0d 100644 --- a/src/assets/images/new-arrow-left.svg +++ b/src/assets/images/new-arrow-left.svg @@ -1,15 +1,12 @@ - - - icon / arrow-right copy + + + arrow-left Created with Sketch. - - - - - - - + + + + diff --git a/src/assets/images/new-arrow-right.svg b/src/assets/images/new-arrow-right.svg index 850a405e3b..bebe3a0296 100644 --- a/src/assets/images/new-arrow-right.svg +++ b/src/assets/images/new-arrow-right.svg @@ -1,15 +1,12 @@ - - - icon / arrow-right + + + arrow-right Created with Sketch. - - - - - - - + + + + diff --git a/src/server/tc-communities/zurich/metadata.json b/src/server/tc-communities/zurich/metadata.json index dbfb6c50cf..f47cedfe69 100644 --- a/src/server/tc-communities/zurich/metadata.json +++ b/src/server/tc-communities/zurich/metadata.json @@ -22,24 +22,10 @@ "url": "https://www.topcoder.com" }], "footerText": "© Copyright Topcoder, 2019", - "menuItems": [ - { - "title": "Home", - "url": "/" - }, { - "title": "How it works", - "url": "/learn" - }, { - "title": "Catalog", - "url": "/catalog" - }, { - "title": "FAQ", - "url": "/faq" - }, { - "title": "Challenges", - "url": "/challenges?communityId=zurich" - } - ], + "menuItems": [{ + "navigationMenu": "2rUBPkaTK3UInCz4h7GOZG", + "spaceName": "zurich" + }], "hideSearch": true, "newsFeed": "http://www.topcoder.com/feed", "subdomains": ["zurich", "community-zurich"], diff --git a/src/shared/components/Contentful/ContentSlider/ContentSlider.jsx b/src/shared/components/Contentful/ContentSlider/ContentSlider.jsx index a8de7c0a08..092b645e91 100644 --- a/src/shared/components/Contentful/ContentSlider/ContentSlider.jsx +++ b/src/shared/components/Contentful/ContentSlider/ContentSlider.jsx @@ -63,7 +63,7 @@ class ContentSlider extends Component { onKeyPress={previousSlide} role="button" tabIndex={0} - className={theme.control} + className={theme.controlLeft} > @@ -74,7 +74,7 @@ class ContentSlider extends Component { onKeyPress={nextSlide} role="button" tabIndex={0} - className={theme.control} + className={theme.controlRight} > @@ -109,7 +109,8 @@ ContentSlider.propTypes = { theme: PT.shape({ container: PT.string, content: PT.string, - control: PT.string, + controlLeft: PT.string, + controlRight: PT.string, multiContent: PT.any, singleContent: PT.any, }), diff --git a/src/shared/components/Contentful/ContentSlider/themes/default.scss b/src/shared/components/Contentful/ContentSlider/themes/default.scss index e5804e20a3..c932d4e80d 100644 --- a/src/shared/components/Contentful/ContentSlider/themes/default.scss +++ b/src/shared/components/Contentful/ContentSlider/themes/default.scss @@ -18,9 +18,18 @@ width: 100%; } -.control { +.controlLeft, +.controlRight { border: 0; color: white; cursor: pointer; display: flex; } + +.controlLeft { + margin-left: 25px; +} + +.controlRight { + margin-right: 25px; +} diff --git a/src/shared/containers/Contentful/MenuLoader/index.jsx b/src/shared/containers/Contentful/MenuLoader/index.jsx index 4cbd6b4cd6..ae7cf42fd7 100644 --- a/src/shared/containers/Contentful/MenuLoader/index.jsx +++ b/src/shared/containers/Contentful/MenuLoader/index.jsx @@ -78,56 +78,42 @@ class MenuLoaderContainer extends React.Component { // eslint-disable-next-line global-require const { TopNav, LoginNav } = require('navigation-component'); const logoToUse = !_.isEmpty(menuLogo) ? menu logo : ; + const comboMenu = _.clone(config.HEADER_MENU); + comboMenu[1].subMenu = _.clone(menu[0].subMenu); + let normalizedProfile = auth.profile && _.clone(auth.profile); + if (auth.profile) { + normalizedProfile.photoURL = (_.has(auth.profile, 'photoURL') && auth.profile.photoURL !== null) + ? `${config.CDN.PUBLIC}/avatar/${encodeURIComponent(auth.profile.photoURL)}?size=32` : ''; + } else { + normalizedProfile = null; + } return (
)} + logo={logoToUse} + theme={config.HEADER_MENU_THEME} + currentLevel1Id={activeLevel1Id} + onChangeLevel1Id={this.handleChangeLevel1Id} + path={path} + openMore={openMore} + setOpenMore={this.handleChangeOpenMore} + loggedIn={!_.isEmpty(auth.profile)} + profileHandle={auth.profile ? auth.profile.handle : ''} />
); diff --git a/src/shared/routes/Communities/Zurich/Routes.jsx b/src/shared/routes/Communities/Zurich/Routes.jsx index c063041232..6f60d9abd8 100644 --- a/src/shared/routes/Communities/Zurich/Routes.jsx +++ b/src/shared/routes/Communities/Zurich/Routes.jsx @@ -13,7 +13,6 @@ import { connect } from 'react-redux'; import Error404 from 'components/Error404'; import FAQ from 'components/tc-communities/communities/zurich/FAQ'; import Footer from 'components/tc-communities/communities/zurich/Footer'; -import Header from 'containers/tc-communities/Header'; import Home from 'containers/tc-communities/zurich/Home'; import Learn from 'components/tc-communities/communities/zurich/Learn'; import ContentfulRoute from 'components/Contentful/Route'; @@ -22,8 +21,8 @@ import React from 'react'; import theme from 'components/tc-communities/communities/zurich/theme'; import { ThemeProvider } from 'react-css-super-themr'; import { Route, Switch, Redirect } from 'react-router-dom'; -import { config } from 'topcoder-react-utils'; import Viewport from 'components/Contentful/Viewport'; +import ContentfulMenu from 'components/Contentful/Menu'; function Zurich({ base, meta, userGroups }) { // Only members of `Requestor`|`Approver` gropus @@ -65,15 +64,19 @@ function Zurich({ base, meta, userGroups }) { path={`${base}/forbidden`} /> ( + component={() => (
-
+ { + meta.menuItems ? ( + + ) : null + } ChallengeListing({