diff --git a/.circleci/config.yml b/.circleci/config.yml index 0241a88e16..79238fb0ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -174,7 +174,7 @@ workflows: filters: branches: only: - - develop + - hot-fixes # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -182,16 +182,13 @@ workflows: 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": @@ -206,4 +203,4 @@ workflows: filters: branches: ignore: - - develop \ No newline at end of file + - develop diff --git a/docs/contentful/ContentBlock.md b/docs/contentful/ContentBlock.md index 8f0a9d20c4..b69f8bceb4 100644 --- a/docs/contentful/ContentBlock.md +++ b/docs/contentful/ContentBlock.md @@ -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) \ No newline at end of file +![](./pics/ContentBlock.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/2Vf6Xn8CaNG4C55nqblsZa diff --git a/docs/contentful/Countdown.md b/docs/contentful/Countdown.md index 3393b02eb5..bd8b37713f 100644 --- a/docs/contentful/Countdown.md +++ b/docs/contentful/Countdown.md @@ -2,4 +2,7 @@ Generic Countdown model. Renders a countdown timer until `endDate` is reached. ## Fields -![](./pics/Countdown.png) \ No newline at end of file +![](./pics/Countdown.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/7h34mzW03NG1KOBAPnUVEi diff --git a/docs/contentful/DashboardAnnouncement.md b/docs/contentful/DashboardAnnouncement.md index bbfb2cd7ed..9feb0b8b0d 100644 --- a/docs/contentful/DashboardAnnouncement.md +++ b/docs/contentful/DashboardAnnouncement.md @@ -2,4 +2,7 @@ An announcement scheduled to be shown in the Topcoder's member dashboard. ## Fields -![](./pics/DashboardAnnouncement.png) \ No newline at end of file +![](./pics/DashboardAnnouncement.png) + +## Live Demo +https://community-app.topcoder.com/my-dashboard?announcementPreviewId=2pP16TL0lFS1hFqNv3FfT2 diff --git a/docs/contentful/Dropdown.md b/docs/contentful/Dropdown.md index 210da68954..31043e7456 100644 --- a/docs/contentful/Dropdown.md +++ b/docs/contentful/Dropdown.md @@ -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) \ No newline at end of file +![](./pics/DropdownItem.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/5ve2acdU6Z3C5FyXMO99El diff --git a/docs/contentful/NavigationMenu.md b/docs/contentful/NavigationMenu.md index b4ee30d8ee..9188561d24 100644 --- a/docs/contentful/NavigationMenu.md +++ b/docs/contentful/NavigationMenu.md @@ -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) \ No newline at end of file +![](./pics/NavigationMenuItem.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/2VtYSyqeFb3XBEsSREIVgP diff --git a/docs/contentful/Route.md b/docs/contentful/Route.md index f9dcf815f8..e718d4829f 100644 --- a/docs/contentful/Route.md +++ b/docs/contentful/Route.md @@ -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) \ No newline at end of file +![](./pics/Route.png) + +## Live Demo +https://community-app.topcoder-dev.com/examples/contentful/route/7AJwV3vA7OsDjJBFlfIFqr diff --git a/docs/contentful/accordion.md b/docs/contentful/accordion.md index 9db1542fe6..1aba740511 100644 --- a/docs/contentful/accordion.md +++ b/docs/contentful/accordion.md @@ -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) \ No newline at end of file +![](./pics/AccordionItem.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/23gfdoR2PkU0PyE9bRbbY8 diff --git a/docs/contentful/banner.md b/docs/contentful/banner.md index f8af02cfac..76e2582e2f 100644 --- a/docs/contentful/banner.md +++ b/docs/contentful/banner.md @@ -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) \ No newline at end of file +![](./pics/Banner.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/2W1Wb1bwEabiIZhaSc4EwV diff --git a/docs/contentful/slider.md b/docs/contentful/slider.md index 1003bae68b..7f87a5fb53 100644 --- a/docs/contentful/slider.md +++ b/docs/contentful/slider.md @@ -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) \ No newline at end of file +![](./pics/Slider.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/22U4diMLAiUjGV6hxAbz7K diff --git a/docs/contentful/viewport.md b/docs/contentful/viewport.md index 652abec24e..39c864b35f 100644 --- a/docs/contentful/viewport.md +++ b/docs/contentful/viewport.md @@ -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) \ No newline at end of file +![](./pics/Viewport.png) + +## Live Demo +https://community-app.topcoder.com/examples/contentful/viewport/7yVst7wTJIalmNhRoUNAWp diff --git a/src/shared/containers/challenge-listing/Listing/index.jsx b/src/shared/containers/challenge-listing/Listing/index.jsx index d0697fd61a..84709473fd 100644 --- a/src/shared/containers/challenge-listing/Listing/index.jsx +++ b/src/shared/containers/challenge-listing/Listing/index.jsx @@ -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 { @@ -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) {