Skip to content

v1.9.0 #5497

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 6 commits into from
May 3, 2021
Merged

v1.9.0 #5497

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
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ workflows:
branches:
only:
- develop
- nursoltan-s-issue-5490
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
Expand Down Expand Up @@ -304,6 +305,7 @@ workflows:
branches:
only:
- develop
- nursoltan-s-issue-5490
- "approve-smoke-test-on-staging":
type: approval
requires:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`Matches shallow shapshot 1 shapshot 1 1`] = `
<Connect(Container)
setFilterState={[MockFunction]}
/>
<Banner />
<div
className="src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
>
Expand Down Expand Up @@ -64,6 +65,7 @@ exports[`Matches shallow shapshot 2 shapshot 2 1`] = `
<Connect(Container)
setFilterState={[MockFunction]}
/>
<Banner />
<div
className="src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
>
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ docker build -t $TAG \
--build-arg OPEN_EXCHANGE_RATES_KEY=$OPEN_EXCHANGE_RATES_KEY \
--build-arg SEGMENT_IO_API_KEY=$SEGMENT_IO_API_KEY \
--build-arg CHAMELEON_VERIFICATION_SECRET=$CHAMELEON_VERIFICATION_SECRET \
--build-arg PLATFORM_SITE_URL=$PLATFORM_SITE_URL \
--build-arg SERVER_API_KEY=$SERVER_API_KEY \
--build-arg TC_M2M_CLIENT_ID=$TC_M2M_CLIENT_ID \
--build-arg TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET \
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,5 @@ module.exports = {
OPTIMIZELY: {
SDK_KEY: '7V4CJhurXT3Y3bnzv1hv1',
},
PLATFORM_SITE_URL: 'https://platform.topcoder.com',
};
1 change: 1 addition & 0 deletions config/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ module.exports = {
URL: {
USER_SETTINGS: '', /* No dev server is available for saved searches */
},
PLATFORM_SITE_URL: 'https://platform.topcoder-dev.com',
};
8 changes: 8 additions & 0 deletions src/assets/images/banner-close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/images/banner-info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions src/shared/components/challenge-listing/Banner/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { useState } from 'react';
import { config } from 'topcoder-react-utils';

import BannerCloseIcon from 'assets/images/banner-close.svg';
import BannerInfoIcon from 'assets/images/banner-info.svg';
import './style.scss';

const Banner = () => {
const [isDisplayed, setIsDisplayed] = useState(true);

return isDisplayed && (
<a
href={`${config.PLATFORM_SITE_URL}/earn/find/challenges`}
target="_blank"
rel="noopener noreferrer"
styleName="banner"
>
<div styleName="content">
<div styleName="banner-info">
<BannerInfoIcon />
</div>
<span>
Click here if you&apos;d like to visit the new Beta Challenge Listings site
</span>
</div>

<div
styleName="banner-close"
onClick={(e) => {
e.preventDefault();
setIsDisplayed(false);
}}
aria-hidden="true"
role="button"
>
<BannerCloseIcon />
</div>
</a>
);
};

export default Banner;
59 changes: 59 additions & 0 deletions src/shared/components/challenge-listing/Banner/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@import "~styles/mixins";

.banner {
@include roboto-medium;

@include xs-to-sm {
height: 81px;
line-height: 22px;
padding-left: 20px;
}

display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
margin: 10px 15px 0 15px;
height: 50px;
background: linear-gradient(90deg, #2c95d7 0%, #06d6a0 100%);
border-radius: 10px;
color: #fff;
font-size: 16px;

.content {
display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
color: #fff;

.banner-info {
width: 24px;
height: 24px;
margin-left: 20px;
margin-right: 10px;

@include xs-to-sm {
display: none;
}
}

@include xs-to-sm {
width: 80%;
}
}

.banner-close {
width: 14px;
height: 14px;
margin-right: 30px;

&:hover {
cursor: pointer;
}

@include xs-to-sm {
margin-bottom: 20px;
}
}
}
3 changes: 3 additions & 0 deletions src/shared/components/challenge-listing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useMediaQuery } from 'react-responsive';
import NoChallengeCard from './NoChallengeCard';
import Listing from './Listing';
// import ChallengeCardPlaceholder from './placeholders/ChallengeCard';
import Banner from './Banner';

import './style.scss';

Expand Down Expand Up @@ -167,6 +168,8 @@ export default function ChallengeListing(props) {
)
}

<Banner />

<div styleName="tc-content-wrapper">
<div styleName={desktop ? 'sidebar-container-desktop' : 'sidebar-container-mobile'}>
<Sidebar
Expand Down