Skip to content

Fix for Issue #2391 #2414

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
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
9 changes: 3 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,21 @@ workflows:
filters:
branches:
only:
- develop
- hot-fixes
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
filters:
branches:
only:
- hot-fixes
- legacy-tco
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
filters:
branches:
only:
- hot-fixes
- develop
- general-features
- server_side_filtering
# Production builds are exectuted only on tagged commits to the
# master branch.
- "build-prod":
Expand All @@ -206,4 +203,4 @@ workflows:
filters:
branches:
ignore:
- develop
- develop
5 changes: 4 additions & 1 deletion docs/contentful/ContentBlock.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
The first content type you should consider for your content elements inside a viewport. It allows you to insert into the page arbitrary text (supporting Markdown and HTML syntax), as well as misc inline UI elements, specific to our website (buttons, internal hyper-references, modals, etc.). It also supports the *image + text* type of content, for cases when, rather than an inline image, you need some special layout of the image with respect to the textual content. We also support different styles for content blocks via themes.

## Fields
![](./pics/ContentBlock.png)
![](./pics/ContentBlock.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/2Vf6Xn8CaNG4C55nqblsZa
5 changes: 4 additions & 1 deletion docs/contentful/Countdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
Generic Countdown model. Renders a countdown timer until `endDate` is reached.

## Fields
![](./pics/Countdown.png)
![](./pics/Countdown.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/7h34mzW03NG1KOBAPnUVEi
5 changes: 4 additions & 1 deletion docs/contentful/DashboardAnnouncement.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
An announcement scheduled to be shown in the Topcoder's member dashboard.

## Fields
![](./pics/DashboardAnnouncement.png)
![](./pics/DashboardAnnouncement.png)

## Live Demo
https://community-app.topcoder.com/my-dashboard?announcementPreviewId=2pP16TL0lFS1hFqNv3FfT2
5 changes: 4 additions & 1 deletion docs/contentful/Dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ The component for blocks of content rendered in dropdows. Renders a list of **Dr
![](./pics/Dropdown.png)

**Dropdown Item**
![](./pics/DropdownItem.png)
![](./pics/DropdownItem.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/5ve2acdU6Z3C5FyXMO99El
5 changes: 4 additions & 1 deletion docs/contentful/NavigationMenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ Model that will render navigation menus of links with optional sub-links/menus.
![](./pics/NavigationMenu.png)

**Navigation Menu Item**
![](./pics/NavigationMenuItem.png)
![](./pics/NavigationMenuItem.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/2VtYSyqeFb3XBEsSREIVgP
5 changes: 4 additions & 1 deletion docs/contentful/Route.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
A Route that can render a Viewport at its endpoint, and also include sub-routes with Viewports. When linked to community-app it will render its [Viewport](./viewport.md) under the specified `URL`.

## Fields
![](./pics/Route.png)
![](./pics/Route.png)

## Live Demo
https://community-app.topcoder-dev.com/examples/contentful/route/7AJwV3vA7OsDjJBFlfIFqr
5 changes: 4 additions & 1 deletion docs/contentful/accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ The component for blocks of content. Each accordion holds a list of **AccordionI
![](./pics/Accordion.png)

**Accordion Item**
![](./pics/AccordionItem.png)
![](./pics/AccordionItem.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/23gfdoR2PkU0PyE9bRbbY8
5 changes: 4 additions & 1 deletion docs/contentful/banner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
This content type provides banners: large background image, some textual content, positioned above it, and also some extra background just under the text, to improve its readability against the main background image. We support a few different banner styles via themes. Moving forward, probably, we will merge **Banner** type into **ContentBlock** one at some point, as there is no much differences between them in term of data they rely on.

## Fields
![](./pics/Banner.png)
![](./pics/Banner.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/2W1Wb1bwEabiIZhaSc4EwV
5 changes: 4 additions & 1 deletion docs/contentful/slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
Slide/cycle content ([Banner](./banner.md), [Content Block](./ContentBlock)) in various ways. Flexible component to iterate content.

## Fields
![](./pics/Slider.png)
![](./pics/Slider.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/22U4diMLAiUjGV6hxAbz7K
5 changes: 4 additions & 1 deletion docs/contentful/viewport.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
A generic container for other objects, that renders its children into a container element. It supports nested viewports, different layout options for viewport content via themes. Viewport should be considered as the main content layout and grouping component.

## Fields
![](./pics/Viewport.png)
![](./pics/Viewport.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/7yVst7wTJIalmNhRoUNAWp
44 changes: 40 additions & 4 deletions src/shared/containers/challenge-listing/Listing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ let mounted = false;

const SEO_PAGE_TITLE = 'Topcoder Challenges';

const DEVELOP_TRACK_ONLY = ['UI_PROTOTYPE_COMPETITION', 'ASSEMBLY_COMPETITION', 'FIRST_2_FINISH', 'BUG_HUNT', 'CODE',
'DESIGN_FIRST_2_FINISH', 'DESIGN', 'DEVELOPMENT', 'ARCHITECTURE', 'CONCEPTUALIZATION',
'TEST_SCENARIOS', 'CONTENT_CREATION', 'TEST_SUITES', 'SPECIFICATION', 'RIA_BUILD_COMPETITION',
'WEB_DESIGNS', 'WIDGET_OR_MOBILE_SCREEN_DESIGN', 'APPLICATION_FRONT_END_DESIGN',
'PRINT_OR_PRESENTATION', 'IDEA_GENERATION', 'WIREFRAMES', 'LOGO_DESIGN', 'BANNERS_OR_ICONS',
'STUDIO_OTHER', 'FRONT_END_FLASH'];

const DESIGN_TRACK_ONLY = ['WEB_DESIGNS', 'WIDGET_OR_MOBILE_SCREEN_DESIGN', 'DESIGN_FIRST_2_FINISH',
'APPLICATION_FRONT_END_DESIGN', 'PRINT_OR_PRESENTATION', 'IDEA_GENERATION', 'WIREFRAMES',
'LOGO_DESIGN', 'BANNERS_OR_ICONS', 'STUDIO_OTHER', 'FRONT_END_FLASH'];

const DATASCIENCE_TRACK_ONLY = ['DEVELOP_MARATHON_MATCH', 'MARATHON_MATCH', 'SRM'];


export class ListingContainer extends React.Component {
componentDidMount() {
const {
Expand Down Expand Up @@ -171,18 +185,40 @@ export class ListingContainer extends React.Component {
selectedCommunityId,
} = this.props;

const finalTracks = _.clone(filter.tracks) || {};
let finalSubTracks = _.clone(filter.subtracks);

const f = {};
if (!filter) {
return f;
}

if (filter.tags) {
f.keywords = filter.tags.join(',');
}
if (filter.subtracks) {
f.subTrack = filter.subtracks.join(',');
}

if (filter.tracks) {
const tracks = Object.keys(filter.tracks).map(t => t.toUpperCase());
if (!(!filter.tracks.design && filter.tracks.develop && filter.tracks.data_science)) {
finalSubTracks = [];
}

if (filter.tracks.design) {
finalSubTracks = _.concat(finalSubTracks, DESIGN_TRACK_ONLY);
}

if (filter.tracks.develop && !filter.tracks.data_science) {
finalSubTracks = _.concat(finalSubTracks, DEVELOP_TRACK_ONLY);
} else if (!filter.tracks.develop && filter.tracks.data_science) {
finalTracks.develop = true;
finalSubTracks = _.concat(finalSubTracks, DATASCIENCE_TRACK_ONLY);
}
}

if (finalSubTracks) {
f.subTrack = finalSubTracks.join(',');
}
if (filter.tracks && finalTracks) {
const tracks = Object.keys(finalTracks).map(t => t.toUpperCase());
f.track = tracks.join(',');
}
if (filter.text) {
Expand Down