Skip to content

Commit dd657c4

Browse files
authored
Merge pull request #2414 from mhikeo/issues/mhikeo/2391
Fix for Issue #2391
2 parents 7554922 + 3d3d5ab commit dd657c4

File tree

12 files changed

+83
-20
lines changed

12 files changed

+83
-20
lines changed

.circleci/config.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -174,24 +174,21 @@ workflows:
174174
filters:
175175
branches:
176176
only:
177-
- develop
177+
- hot-fixes
178178
# This is alternate dev env for parallel testing
179179
- "build-test":
180180
context : org-global
181181
filters:
182182
branches:
183183
only:
184184
- hot-fixes
185-
- legacy-tco
186185
# This is beta env for production soft releases
187186
- "build-prod-beta":
188187
context : org-global
189188
filters:
190189
branches:
191190
only:
192-
- hot-fixes
193-
- develop
194-
- general-features
191+
- server_side_filtering
195192
# Production builds are exectuted only on tagged commits to the
196193
# master branch.
197194
- "build-prod":
@@ -206,4 +203,4 @@ workflows:
206203
filters:
207204
branches:
208205
ignore:
209-
- develop
206+
- develop

docs/contentful/ContentBlock.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
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.
33

44
## Fields
5-
![](./pics/ContentBlock.png)
5+
![](./pics/ContentBlock.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/examples/contentful/viewport/2Vf6Xn8CaNG4C55nqblsZa

docs/contentful/Countdown.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
Generic Countdown model. Renders a countdown timer until `endDate` is reached.
33

44
## Fields
5-
![](./pics/Countdown.png)
5+
![](./pics/Countdown.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/examples/contentful/viewport/7h34mzW03NG1KOBAPnUVEi

docs/contentful/DashboardAnnouncement.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
An announcement scheduled to be shown in the Topcoder's member dashboard.
33

44
## Fields
5-
![](./pics/DashboardAnnouncement.png)
5+
![](./pics/DashboardAnnouncement.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/my-dashboard?announcementPreviewId=2pP16TL0lFS1hFqNv3FfT2

docs/contentful/Dropdown.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ The component for blocks of content rendered in dropdows. Renders a list of **Dr
66
![](./pics/Dropdown.png)
77

88
**Dropdown Item**
9-
![](./pics/DropdownItem.png)
9+
![](./pics/DropdownItem.png)
10+
11+
## Live Demo
12+
https://community-app.topcoder.com/examples/contentful/viewport/5ve2acdU6Z3C5FyXMO99El

docs/contentful/NavigationMenu.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ Model that will render navigation menus of links with optional sub-links/menus.
66
![](./pics/NavigationMenu.png)
77

88
**Navigation Menu Item**
9-
![](./pics/NavigationMenuItem.png)
9+
![](./pics/NavigationMenuItem.png)
10+
11+
## Live Demo
12+
https://community-app.topcoder.com/examples/contentful/viewport/2VtYSyqeFb3XBEsSREIVgP

docs/contentful/Route.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
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`.
33

44
## Fields
5-
![](./pics/Route.png)
5+
![](./pics/Route.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder-dev.com/examples/contentful/route/7AJwV3vA7OsDjJBFlfIFqr

docs/contentful/accordion.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ The component for blocks of content. Each accordion holds a list of **AccordionI
66
![](./pics/Accordion.png)
77

88
**Accordion Item**
9-
![](./pics/AccordionItem.png)
9+
![](./pics/AccordionItem.png)
10+
11+
## Live Demo
12+
https://community-app.topcoder.com/examples/contentful/viewport/23gfdoR2PkU0PyE9bRbbY8

docs/contentful/banner.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
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.
33

44
## Fields
5-
![](./pics/Banner.png)
5+
![](./pics/Banner.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/examples/contentful/viewport/2W1Wb1bwEabiIZhaSc4EwV

docs/contentful/slider.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
Slide/cycle content ([Banner](./banner.md), [Content Block](./ContentBlock)) in various ways. Flexible component to iterate content.
33

44
## Fields
5-
![](./pics/Slider.png)
5+
![](./pics/Slider.png)
6+
7+
## Live Demo
8+
https://community-app.topcoder.com/examples/contentful/viewport/22U4diMLAiUjGV6hxAbz7K

docs/contentful/viewport.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
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.
44

55
## Fields
6-
![](./pics/Viewport.png)
6+
![](./pics/Viewport.png)
7+
8+
## Live Demo
9+
https://community-app.topcoder.com/examples/contentful/viewport/7yVst7wTJIalmNhRoUNAWp

src/shared/containers/challenge-listing/Listing/index.jsx

+40-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ let mounted = false;
3434

3535
const SEO_PAGE_TITLE = 'Topcoder Challenges';
3636

37+
const DEVELOP_TRACK_ONLY = ['UI_PROTOTYPE_COMPETITION', 'ASSEMBLY_COMPETITION', 'FIRST_2_FINISH', 'BUG_HUNT', 'CODE',
38+
'DESIGN_FIRST_2_FINISH', 'DESIGN', 'DEVELOPMENT', 'ARCHITECTURE', 'CONCEPTUALIZATION',
39+
'TEST_SCENARIOS', 'CONTENT_CREATION', 'TEST_SUITES', 'SPECIFICATION', 'RIA_BUILD_COMPETITION',
40+
'WEB_DESIGNS', 'WIDGET_OR_MOBILE_SCREEN_DESIGN', 'APPLICATION_FRONT_END_DESIGN',
41+
'PRINT_OR_PRESENTATION', 'IDEA_GENERATION', 'WIREFRAMES', 'LOGO_DESIGN', 'BANNERS_OR_ICONS',
42+
'STUDIO_OTHER', 'FRONT_END_FLASH'];
43+
44+
const DESIGN_TRACK_ONLY = ['WEB_DESIGNS', 'WIDGET_OR_MOBILE_SCREEN_DESIGN', 'DESIGN_FIRST_2_FINISH',
45+
'APPLICATION_FRONT_END_DESIGN', 'PRINT_OR_PRESENTATION', 'IDEA_GENERATION', 'WIREFRAMES',
46+
'LOGO_DESIGN', 'BANNERS_OR_ICONS', 'STUDIO_OTHER', 'FRONT_END_FLASH'];
47+
48+
const DATASCIENCE_TRACK_ONLY = ['DEVELOP_MARATHON_MATCH', 'MARATHON_MATCH', 'SRM'];
49+
50+
3751
export class ListingContainer extends React.Component {
3852
componentDidMount() {
3953
const {
@@ -171,18 +185,40 @@ export class ListingContainer extends React.Component {
171185
selectedCommunityId,
172186
} = this.props;
173187

188+
const finalTracks = _.clone(filter.tracks) || {};
189+
let finalSubTracks = _.clone(filter.subtracks);
190+
174191
const f = {};
175192
if (!filter) {
176193
return f;
177194
}
195+
178196
if (filter.tags) {
179197
f.keywords = filter.tags.join(',');
180198
}
181-
if (filter.subtracks) {
182-
f.subTrack = filter.subtracks.join(',');
183-
}
199+
184200
if (filter.tracks) {
185-
const tracks = Object.keys(filter.tracks).map(t => t.toUpperCase());
201+
if (!(!filter.tracks.design && filter.tracks.develop && filter.tracks.data_science)) {
202+
finalSubTracks = [];
203+
}
204+
205+
if (filter.tracks.design) {
206+
finalSubTracks = _.concat(finalSubTracks, DESIGN_TRACK_ONLY);
207+
}
208+
209+
if (filter.tracks.develop && !filter.tracks.data_science) {
210+
finalSubTracks = _.concat(finalSubTracks, DEVELOP_TRACK_ONLY);
211+
} else if (!filter.tracks.develop && filter.tracks.data_science) {
212+
finalTracks.develop = true;
213+
finalSubTracks = _.concat(finalSubTracks, DATASCIENCE_TRACK_ONLY);
214+
}
215+
}
216+
217+
if (finalSubTracks) {
218+
f.subTrack = finalSubTracks.join(',');
219+
}
220+
if (filter.tracks && finalTracks) {
221+
const tracks = Object.keys(finalTracks).map(t => t.toUpperCase());
186222
f.track = tracks.join(',');
187223
}
188224
if (filter.text) {

0 commit comments

Comments
 (0)