diff --git a/.circleci/config.yml b/.circleci/config.yml index f38371e990..73b3763833 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -174,7 +174,7 @@ workflows: filters: branches: only: - - develop-from-master-23may + - develop - hot-fixes-4 # This is alternate dev env for parallel testing - "build-test": diff --git a/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap b/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap index d41aecf000..b5a3e434fe 100644 --- a/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap +++ b/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap @@ -22,7 +22,6 @@ exports[`Matches shallow shapshot 1`] = ` wrapper={[Function]} /> - + {blogPost.title} ) : null } diff --git a/src/shared/components/Contentful/BlogPost/ListView/index.jsx b/src/shared/components/Contentful/BlogPost/ListView/index.jsx index 77e41b427f..05e0919d55 100644 --- a/src/shared/components/Contentful/BlogPost/ListView/index.jsx +++ b/src/shared/components/Contentful/BlogPost/ListView/index.jsx @@ -25,7 +25,7 @@ function BlogListView({ heroImage ? (
- + {blogPost.title}
) : null diff --git a/src/shared/components/Contentful/ContentBlock/ContentBlock.jsx b/src/shared/components/Contentful/ContentBlock/ContentBlock.jsx index d2ca579a5e..432199d6ba 100644 --- a/src/shared/components/Contentful/ContentBlock/ContentBlock.jsx +++ b/src/shared/components/Contentful/ContentBlock/ContentBlock.jsx @@ -38,7 +38,7 @@ function ContentBlock({ { background ? (
- + {contentBlock.alt
) : null } diff --git a/src/shared/components/Contentful/ContentBlock/themes/general.scss b/src/shared/components/Contentful/ContentBlock/themes/general.scss index 12907c7abe..2f37717928 100644 --- a/src/shared/components/Contentful/ContentBlock/themes/general.scss +++ b/src/shared/components/Contentful/ContentBlock/themes/general.scss @@ -86,11 +86,16 @@ } a { - color: #0d61bf !important; + color: #0d61bf; text-decoration: underline; &:visited { - color: #8231a9 !important; + color: #8231a9; + } + + &:hover { + text-decoration: none; + color: #0d61bf; } } diff --git a/src/shared/components/Contentful/ContentSlider/themes/default.scss b/src/shared/components/Contentful/ContentSlider/themes/default.scss index ad96c5e512..79500ac7b1 100644 --- a/src/shared/components/Contentful/ContentSlider/themes/default.scss +++ b/src/shared/components/Contentful/ContentSlider/themes/default.scss @@ -2,6 +2,12 @@ .container { width: 100%; + + :global { + .slider-control-bottomcenter { + z-index: 999999; + } + } } .singleContent { diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index 437f172120..33546ed20c 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -81,7 +81,7 @@ export class ImageInner extends React.Component { )} diff --git a/src/shared/components/Contentful/MemberCard/MemberCard.jsx b/src/shared/components/Contentful/MemberCard/MemberCard.jsx index 7d34d363b5..72d2273aa9 100644 --- a/src/shared/components/Contentful/MemberCard/MemberCard.jsx +++ b/src/shared/components/Contentful/MemberCard/MemberCard.jsx @@ -35,7 +35,7 @@ export function MemberCardInner({ > { imageUrl && (
- profile + {`${memberName}'s
)}
diff --git a/src/shared/components/Contentful/Menu/index.jsx b/src/shared/components/Contentful/Menu/index.jsx index 2d69f4988a..3c0efd732a 100644 --- a/src/shared/components/Contentful/Menu/index.jsx +++ b/src/shared/components/Contentful/Menu/index.jsx @@ -10,6 +10,7 @@ import PT from 'prop-types'; import React from 'react'; import { removeTrailingSlash } from 'utils/url'; import { isActive, target } from 'utils/contentful'; +import { isomorphy } from 'topcoder-react-utils'; import NavMenu from './Menu'; @@ -18,6 +19,7 @@ const THEMES = { Default: require('./themes/default.scss'), 'TCO19 - Header Menu': require('./themes/tco19-header.scss'), 'TCO19 - Footer Menu': require('./themes/tco19-footer.scss'), + 'TCO20 - Footer Menu': require('./themes/tco20-footer.scss'), }; /* eslint-enable global-require */ @@ -65,23 +67,93 @@ function MenuItemsLoader(props) {
); } - if (menuItem.fields.childRoutes && menuItem.fields.excludeFromNavigationMenus !== true && isActive(baseUrl, menuItem, 'childRoutes')) { - return ( -
- + +
+ ); + } + if (!menuItem.fields.url || menuItem.fields.url === '/') { + // need to load the submenu to see if it matches for the location + // this is special case when we have sub menus under root "/"" path + // all other cases are covered by above rule. + + // get the current location 1st + let location = ''; + if (isomorphy.isClientSide()) { + location = window.location.pathname; + location = location.toLowerCase(); + location = _.replace(location, '/__community__/tco19', ''); + } else { + // TODO: should probably get the current URL from the web framework + } + // When we are at home/root just load the menu directly + if (!location || location === '/') { + return ( +
+ +
+ ); + } + // In all other cases we need to load the menu items + // to check if some matches against location path + return ( + { + const links = _.values(childRoutesData.entries.items).map(childItem => `/${childItem.fields.url}`); + if (links.some(link => location.startsWith(link))) { + return ( +
+ +
+ ); + } + return null; + }} + renderPlaceholder={LoadingIndicator} /> - - ); + ); + } } return null; })); diff --git a/src/shared/components/Contentful/Menu/themes/default.scss b/src/shared/components/Contentful/Menu/themes/default.scss index 17d71a3b58..11d812cf91 100644 --- a/src/shared/components/Contentful/Menu/themes/default.scss +++ b/src/shared/components/Contentful/Menu/themes/default.scss @@ -3,6 +3,10 @@ .outerContainer { width: 100%; + @include lg { + padding-left: 30px; + } + .menuContainer { display: flex; width: 100%; diff --git a/src/shared/components/Contentful/Menu/themes/tco19-header.scss b/src/shared/components/Contentful/Menu/themes/tco19-header.scss index 48ec0e3115..0945ead1f6 100644 --- a/src/shared/components/Contentful/Menu/themes/tco19-header.scss +++ b/src/shared/components/Contentful/Menu/themes/tco19-header.scss @@ -4,6 +4,10 @@ width: 100%; background-color: $tc-black; + @include lg { + padding-left: 30px; + } + .menuContainer { display: flex; width: 100%; diff --git a/src/shared/components/Contentful/Menu/themes/tco20-footer.scss b/src/shared/components/Contentful/Menu/themes/tco20-footer.scss new file mode 100644 index 0000000000..b6286c0ad2 --- /dev/null +++ b/src/shared/components/Contentful/Menu/themes/tco20-footer.scss @@ -0,0 +1,60 @@ +@import '~styles/mixins'; + +.outerContainer { + @include xs-to-sm { + margin-bottom: 1em !important; + margin-left: 35px; + } + + .title { + color: #fff; + font-size: 16px; + font-weight: 700; + line-height: 25px; + text-align: left; + text-transform: uppercase; + margin-bottom: 5px; + } + + .menuContainer { + display: flex; + align-items: left; + + .container { + display: flex; + flex-direction: column; + list-style-type: none; + text-align: left; + padding: 0; + } + } + + a.menuItemLink { + text-decoration: none; + padding: 0; + + @include roboto-regular; + + color: #fff; + font-size: 14px; + font-weight: 400; + line-height: 21px; + } +} + +.submenu { + display: none; + + .outerContainer { + margin-left: 1em; + } + + .menuContainer { + display: flex; + align-items: left; + + .container { + flex-direction: column !important; + } + } +} diff --git a/src/shared/components/buttons/outline/tco/tco07.scss b/src/shared/components/buttons/outline/tco/tco07.scss index bac4f50bba..4c80ddd1a8 100644 --- a/src/shared/components/buttons/outline/tco/tco07.scss +++ b/src/shared/components/buttons/outline/tco/tco07.scss @@ -3,6 +3,7 @@ font-size: 15px !important; font-weight: 500 !important; background-color: #ee9e0b !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco09.scss b/src/shared/components/buttons/outline/tco/tco09.scss index b88db0f836..87c6ee16b4 100644 --- a/src/shared/components/buttons/outline/tco/tco09.scss +++ b/src/shared/components/buttons/outline/tco/tco09.scss @@ -4,6 +4,7 @@ font-weight: 500 !important; background-color: #5f9ab4 !important; text-transform: uppercase !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco10.scss b/src/shared/components/buttons/outline/tco/tco10.scss index 90465ff8d1..7e2fb8e7d2 100644 --- a/src/shared/components/buttons/outline/tco/tco10.scss +++ b/src/shared/components/buttons/outline/tco/tco10.scss @@ -3,6 +3,7 @@ font-size: 15px !important; font-weight: 500 !important; background-color: #006dea !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco11.scss b/src/shared/components/buttons/outline/tco/tco11.scss index f37ef41a71..5cc7654fb1 100644 --- a/src/shared/components/buttons/outline/tco/tco11.scss +++ b/src/shared/components/buttons/outline/tco/tco11.scss @@ -3,6 +3,7 @@ font-size: 15px !important; font-weight: 500 !important; background-color: #00566b !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco12.scss b/src/shared/components/buttons/outline/tco/tco12.scss index 58003948f3..3462b72ba0 100644 --- a/src/shared/components/buttons/outline/tco/tco12.scss +++ b/src/shared/components/buttons/outline/tco/tco12.scss @@ -3,6 +3,7 @@ font-size: 15px !important; font-weight: 500 !important; background-color: #ff8300 !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco13.scss b/src/shared/components/buttons/outline/tco/tco13.scss index 6217174c67..debdce0f80 100644 --- a/src/shared/components/buttons/outline/tco/tco13.scss +++ b/src/shared/components/buttons/outline/tco/tco13.scss @@ -4,6 +4,7 @@ font-weight: 500 !important; background-color: #0e477a !important; text-transform: uppercase !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco14.scss b/src/shared/components/buttons/outline/tco/tco14.scss index 61cae5c43a..50859f616a 100644 --- a/src/shared/components/buttons/outline/tco/tco14.scss +++ b/src/shared/components/buttons/outline/tco/tco14.scss @@ -4,6 +4,7 @@ font-weight: 500 !important; background-color: #43abe4 !important; text-transform: uppercase !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco16.scss b/src/shared/components/buttons/outline/tco/tco16.scss index cdaeed73b2..4f81f65c27 100644 --- a/src/shared/components/buttons/outline/tco/tco16.scss +++ b/src/shared/components/buttons/outline/tco/tco16.scss @@ -3,6 +3,7 @@ font-size: 15px !important; font-weight: 500 !important; background-color: #ff6000 !important; + text-decoration: none !important; &:hover { background-image: none !important; diff --git a/src/shared/components/buttons/outline/tco/tco18.scss b/src/shared/components/buttons/outline/tco/tco18.scss index c6bbbceb5c..5c416c7289 100644 --- a/src/shared/components/buttons/outline/tco/tco18.scss +++ b/src/shared/components/buttons/outline/tco/tco18.scss @@ -2,4 +2,5 @@ color: #fafafb !important; font-size: 15px !important; font-weight: 500 !important; + text-decoration: none !important; } diff --git a/src/shared/components/buttons/outline/tco/tco19-lg.scss b/src/shared/components/buttons/outline/tco/tco19-lg.scss index 021c3a3060..e69c2008b5 100644 --- a/src/shared/components/buttons/outline/tco/tco19-lg.scss +++ b/src/shared/components/buttons/outline/tco/tco19-lg.scss @@ -23,4 +23,5 @@ $tco-disabled-background: #e9e9e9; background-color: $tco-disabled-background !important; border-radius: 20px !important; border: none !important; + text-decoration: none !important; } diff --git a/src/shared/components/buttons/outline/tco/tco19-sec-lg.scss b/src/shared/components/buttons/outline/tco/tco19-sec-lg.scss index 17c631908a..2a483f0893 100644 --- a/src/shared/components/buttons/outline/tco/tco19-sec-lg.scss +++ b/src/shared/components/buttons/outline/tco/tco19-sec-lg.scss @@ -24,4 +24,5 @@ $tco-disabled-background: #e9e9e9; border-radius: 20px !important; border: none !important; color: $tc-white !important; + text-decoration: none !important; } diff --git a/src/shared/components/buttons/outline/tco/tco19-sec.scss b/src/shared/components/buttons/outline/tco/tco19-sec.scss index e5a510264a..d6d70dff10 100644 --- a/src/shared/components/buttons/outline/tco/tco19-sec.scss +++ b/src/shared/components/buttons/outline/tco/tco19-sec.scss @@ -24,4 +24,5 @@ $tco-disabled-background: #e9e9e9; border-radius: 15px !important; border: none !important; color: $tc-white !important; + text-decoration: none !important; } diff --git a/src/shared/components/buttons/outline/tco/tco19.scss b/src/shared/components/buttons/outline/tco/tco19.scss index 2bd492a294..22ab7d85d6 100644 --- a/src/shared/components/buttons/outline/tco/tco19.scss +++ b/src/shared/components/buttons/outline/tco/tco19.scss @@ -23,4 +23,5 @@ $tco-disabled-background: #e9e9e9; background-color: $tco-disabled-background !important; border-radius: 20px !important; border: none !important; + text-decoration: none !important; } diff --git a/src/shared/containers/ContentfulLoader.jsx b/src/shared/containers/ContentfulLoader.jsx index 5e9c0f33d6..cf82b0614d 100644 --- a/src/shared/containers/ContentfulLoader.jsx +++ b/src/shared/containers/ContentfulLoader.jsx @@ -14,8 +14,13 @@ import SSR from 'utils/SSR'; import { config } from 'topcoder-react-utils'; import { connect } from 'react-redux'; -const DEFAULT_MAXAGE = 5 * 60 * 1000; -const DEFAULT_REFRESH_MAXAGE = 1 * 60 * 1000; +// Setting those to infinity to disable maxage and auto refresh +// There are reports that this mechanisum is not working in some cases. +// For instance after long incativity pages are refreshed but if fetch calls fail in that moment +// loding spinners are never removed and page looks ugly with them. +// TODO: find what is causing the probem in details and fix it. +const DEFAULT_MAXAGE = Number.POSITIVE_INFINITY; +const DEFAULT_REFRESH_MAXAGE = Number.POSITIVE_INFINITY; /* Timeout for server-side rendering routine [ms]. */ const SSR_TIMEOUT = 3000; /* 3 seconds */