Skip to content

Social share updates #6599

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 21 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ed864e3
Merge pull request #6374 from topcoder-platform/develop
luizrrodrigues Jun 3, 2022
2904f64
Merge pull request #6380 from topcoder-platform/develop
luizrrodrigues Jun 15, 2022
599975b
Merge pull request #6386 from topcoder-platform/develop
luizrrodrigues Jun 16, 2022
977428e
fix: topgear page not loading
rakibansary Jun 23, 2022
cd48712
fix: update test snapshots
rakibansary Jun 23, 2022
6cf89f5
Merge pull request #6549 from topcoder-platform/hotfix/topgear-outage
ThomasKranitsas Jun 23, 2022
d7d5d2b
Merge pull request #6527 from topcoder-platform/develop
luizrrodrigues Jun 24, 2022
0994dc0
Merge pull request #6563 from topcoder-platform/develop
luizrrodrigues Jun 24, 2022
18a82aa
Merge pull request #6573 from topcoder-platform/develop
luizrrodrigues Jul 1, 2022
4231948
Merge pull request #6588 from topcoder-platform/develop
luizrrodrigues Jul 20, 2022
c771bcd
Merge pull request #6590 from topcoder-platform/develop
luizrrodrigues Jul 20, 2022
0a198e3
Merge pull request #6594 from topcoder-platform/develop
luizrrodrigues Jul 26, 2022
c53b11d
update social share images
kkartunov Jul 27, 2022
abf27b6
ci: on beta
kkartunov Jul 27, 2022
f535656
fix lint errors
kkartunov Jul 27, 2022
8a30d76
Fix image for DS challenges
kkartunov Jul 29, 2022
db01cd6
add f2f and task per track share images
kkartunov Aug 1, 2022
4e2c568
fixed import images names
kkartunov Aug 1, 2022
e69b0de
add design F2Fs and tasks
kkartunov Aug 1, 2022
c894364
design task
kkartunov Aug 1, 2022
dd5a0d1
fixed QA & Design task images
kkartunov Aug 3, 2022
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: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ workflows:
filters:
branches:
only:
- footer-update
- social-share-updates
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
Expand Down
Binary file modified src/assets/images/open-graph/challenges/02-Design-Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/open-graph/challenges/03-Development.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/open-graph/challenges/04-Data-Science.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/open-graph/challenges/05-QA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/open-graph/challenges/06-Big-Prize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 35 additions & 5 deletions src/shared/containers/challenge-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,18 @@ import { getService } from 'services/contentful';

import ogUiDesign from
'../../../assets/images/open-graph/challenges/02-Design-Preview.png';
import ogFirst2Finish from
'../../../assets/images/open-graph/challenges/09-First2Finish.png';
import ogFirst2FinishDEV from
'../../../assets/images/open-graph/challenges/Development-First2Finish.png';
import ogFirst2FinishDESIGN from
'../../../assets/images/open-graph/challenges/Design-First2Finish.png';
import ogFirst2FinishQA from
'../../../assets/images/open-graph/challenges/QA-First2Finish.png';
import ogDEVTask from
'../../../assets/images/open-graph/challenges/Development-Task.png';
import ogDESIGNTask from
'../../../assets/images/open-graph/challenges/Design-Task.png';
import ogQATask from
'../../../assets/images/open-graph/challenges/QA-Task.png';
import ogDevelopment from
'../../../assets/images/open-graph/challenges/03-Development.png';
import ogBigPrizesChallenge from
Expand All @@ -63,6 +73,8 @@ import ogQAChallenge from
'../../../assets/images/open-graph/challenges/05-QA.png';
import ogDSChallenge from
'../../../assets/images/open-graph/challenges/04-Data-Science.png';
import ogMMChallenge from
'../../../assets/images/open-graph/challenges/MM-Challenge.png';

/* A fallback image, just in case we missed some corner case. */
import ogImage from
Expand Down Expand Up @@ -91,7 +103,19 @@ function getOgImage(challenge) {
}

switch (subTrack) {
case SUBTRACKS.FIRST_2_FINISH: return ogFirst2Finish;
case SUBTRACKS.FIRST_2_FINISH:
switch (challenge.track) {
case COMPETITION_TRACKS_V3.DEVELOP: return challenge.type === 'Task' ? ogDEVTask : ogFirst2FinishDEV;
case COMPETITION_TRACKS_V3.QA: return challenge.type === 'Task' ? ogQATask : ogFirst2FinishQA;
default: return ogFirst2FinishDEV;
}

case SUBTRACKS.DESIGN_FIRST_2_FINISH:
switch (challenge.track) {
case COMPETITION_TRACKS_V3.DESIGN: return challenge.type === 'Task' ? ogDESIGNTask : ogFirst2FinishDESIGN;
default: return ogUiDesign;
}

case SUBTRACKS.UI_PROTOTYPE_COMPETITION: {
const submission = (challenge.phases || [])
.find(p => p.name === CHALLENGE_PHASE_TYPES.SUBMISSION);
Expand All @@ -105,13 +129,19 @@ function getOgImage(challenge) {
case SUBTRACKS.QA:
case SUBTRACKS.TEST_SUITES:
return ogQAChallenge;
case SUBTRACKS.DS: return ogDSChallenge;
case SUBTRACKS.MM:
if (challenge.tags && challenge.tags.indexOf(COMPETITION_TRACKS_V3.DS) !== -1) {
return ogDSChallenge;
}
return ogMMChallenge;
default:
}

switch (challenge.track) {
case COMPETITION_TRACKS_V3.DEVELOP: return ogDevelopment;
case COMPETITION_TRACKS_V3.DESIGN: return ogUiDesign;
case COMPETITION_TRACKS_V3.DESIGN: return challenge.type === 'Task' ? ogDESIGNTask : ogUiDesign;
case COMPETITION_TRACKS_V3.DS: return ogDSChallenge;
case COMPETITION_TRACKS_V3.QA: return challenge.type === 'Task' ? ogQATask : ogQAChallenge;
default: return ogImage;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/shared/utils/tc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const COMPETITION_TRACKS_V3 = {
DESIGN: 'Design',
DEVELOP: 'Development',
DS: 'Data Science',
QA: 'Quality Assurance',
};

/* Holds valid subtracks (only some of possible values are included into this
Expand All @@ -44,7 +45,8 @@ export const SUBTRACKS = {
WIREFRAMES: 'WIREFRAMES',
QA: 'BUG_HUNT',
TEST_SUITES: 'TEST_SUITES',
DS: 'DEVELOP_MARATHON_MATCH',
MM: 'DEVELOP_MARATHON_MATCH',
DESIGN_FIRST_2_FINISH: 'DESIGN_FIRST_2_FINISH',
};

/**
Expand Down