diff --git a/.circleci/config.yml b/.circleci/config.yml index ac5bb66a4b..539c227375 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,7 +230,7 @@ workflows: filters: branches: only: - - develop + - hot-fix # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -245,7 +245,8 @@ workflows: filters: branches: only: - - community-app-tests-poc + - milestone-20200917 + - develop # This is beta env for production soft releases - "build-prod-beta": context : org-global diff --git a/package.json b/package.json index 17d01d001b..e9dbff8f52 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.5", + "topcoder-react-lib": "1.0.6", "topcoder-react-ui-kit": "2.0.1", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", diff --git a/src/shared/components/challenge-detail/Specification/styles.scss b/src/shared/components/challenge-detail/Specification/styles.scss index 04b3f00171..2605a43efe 100644 --- a/src/shared/components/challenge-detail/Specification/styles.scss +++ b/src/shared/components/challenge-detail/Specification/styles.scss @@ -68,115 +68,6 @@ $tc-link-visited: #0c4e98; max-width: 10px !important; } -.challenge-details-view { - white-space: normal; - display: flex; - flex-wrap: wrap; - justify-content: center; - overflow: hidden; - position: relative; - align-items: baseline; - word-break: break-word; - - @include linkStyle; - - @include xs-to-sm { - flex-direction: column; - } - - .challenge-specifications { - @include roboto-regular; - - flex: 4; - text-align: left; - display: flex; - flex-direction: column; - margin: 5px 0 50px; - - .challenge-specs-develop { - blockquote { - border-left: 3px solid $tc-green; - padding-left: 17px; - } - } - - .challenge-specs-datasci { - blockquote { - border-left: 3px solid $tc-orange; - padding-left: 17px; - } - } - - .challenge-specs-design { - blockquote { - border-left: 3px solid $tc-light-blue; - padding-left: 17px; - } - } - - img { - max-width: 100%; - } - } -} - -h2 { - @include roboto-bold; - - font-size: 20px; - color: $tc-black; - line-height: 30px; - margin: (6 * $base-unit) 0 (2 * $base-unit); -} - -h3 { - @include roboto-bold; - - font-size: 15px; - color: $tc-black; - line-height: 25px; - margin: (5 * $base-unit) 0 0; - text-transform: uppercase; -} - -p, -em, -strong { - @include roboto-regular; - - font-size: 15px; - color: $tc-gray-90; - line-height: 25px; -} - -p { - @include roboto-regular; - - font-size: 15px; - color: $tc-gray-90; - line-height: 25px; - - @include linkStyle; - - margin: (2 * $base-unit) 0 (3 * $base-unit); -} - -ul { - @include roboto-regular; - - margin: 0 0 5px 20px; - font-size: 15px; - color: $tc-gray-90; - line-height: 25px; - list-style: disc outside none; - - li { - font-weight: 400; - - @include linkStyle; - } -} - .rawHtml { @include tc-typography; @@ -304,6 +195,229 @@ ul { @include linkStyle; } +.challenge-details-view { + white-space: normal; + display: flex; + flex-wrap: wrap; + justify-content: center; + overflow: hidden; + position: relative; + align-items: baseline; + word-break: break-word; + + @include linkStyle; + + @include xs-to-sm { + flex-direction: column; + } + + .challenge-specifications { + @include roboto-regular; + + flex: 4; + text-align: left; + display: flex; + flex-direction: column; + margin: 5px 0 50px; + + .challenge-specs-develop { + blockquote { + border-left: 3px solid $tc-green; + padding-left: 17px; + } + } + + .challenge-specs-datasci { + blockquote { + border-left: 3px solid $tc-orange; + padding-left: 17px; + } + } + + .challenge-specs-design { + blockquote { + border-left: 3px solid $tc-light-blue; + padding-left: 17px; + } + } + + h1 { + @include roboto-bold; + + font-size: 28px; + color: #151516; + letter-spacing: -0.78px; + line-height: 40px; + margin: (10 * $base-unit) 0 (2 * $base-unit); + } + + h2 { + @include roboto-bold; + + font-size: 20px; + color: $tc-black; + line-height: 30px; + margin: (6 * $base-unit) 0 (2 * $base-unit); + } + + h3 { + @include roboto-bold; + + font-size: 15px; + color: $tc-black; + line-height: 25px; + margin: (5 * $base-unit) 0 0; + text-transform: uppercase; + } + + h4 { + @include roboto-bold; + + margin: (4 * $base-unit) 0 (2 * $base-unit); + font-size: 15px; + line-height: 25px; + color: $tc-gray-90; + } + + h5, + h6 { + margin: (4 * $base-unit) 0 (2 * $base-unit); + } + + p, + em, + strong { + @include roboto-regular; + + font-size: 15px; + color: $tc-gray-90; + line-height: 25px; + } + + p { + @include roboto-regular; + + font-size: 15px; + color: $tc-gray-90; + line-height: 25px; + + @include linkStyle; + + margin: (2 * $base-unit) 0 (3 * $base-unit); + } + + ul { + @include roboto-regular; + + margin: 0 0 5px 20px; + font-size: 15px; + color: $tc-gray-90; + line-height: 25px; + list-style: disc outside none; + + li { + font-weight: 400; + + @include linkStyle; + } + } + + em { + @include roboto-regular; + + font-style: italic; + font-weight: 400; + font-size: 15px; + color: $tc-gray-90; + line-height: 25px; + } + + ol { + @include roboto-regular; + + color: $tc-gray-80; + font-size: 15px; + line-height: 25px; + list-style-type: decimal; + margin: 0 0 5px; + counter-reset: item; + display: table; + + li { + list-style-type: none; + font-weight: 400; + counter-increment: item; + display: table-row; + white-space: normal; + + &::before { + display: table-cell; + font-weight: 700; + text-align: right; + content: counter(item) "."; + padding: 0 10px 0 0; + } + } + } + + td, + th { + @include roboto-regular; + + color: $tc-gray-80; + font-size: 15px; + line-height: 25px; + } + + img { + max-width: 100%; + } + + code { + white-space: pre; + margin: 10px 0 15px; + background: $tc-gray-neutral-light; + border: 1px solid silver; + border-radius: 6px; + font-family: Roboto Mono, monospace; + font-weight: 400; + font-size: 13px; + color: $tc-black; + line-height: 20px; + padding: 15px; + display: block; + } + + sub { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + bottom: -0.25em; + } + + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + top: -0.5em; + } + + strong { + @include roboto-bold; + + font-size: 15px; + color: $tc-gray-90; + line-height: 25px; + } + + pre { + overflow-x: scroll; + } + } +} + .challenge-specs-main { @include roboto-regular; diff --git a/src/shared/containers/terms-detail/index.jsx b/src/shared/containers/terms-detail/index.jsx index 0f79a1a904..af5efa5ab0 100644 --- a/src/shared/containers/terms-detail/index.jsx +++ b/src/shared/containers/terms-detail/index.jsx @@ -37,10 +37,25 @@ class TermsDetailPageContainer extends React.Component { } componentWillReceiveProps(nextProps) { - const { loadTermDetails, authTokens, termId } = this.props; + const { + loadTermDetails, + authTokens, + termId, + } = this.props; + + const { + details, + history, + } = nextProps; + if (!_.isEqual(nextProps.termId, termId)) { loadTermDetails(authTokens, nextProps.termId); } + + if (details && details.isLegacyTerm && !history.location.pathname.includes(details.id)) { + const path = `/challenges/terms/detail/${details.id}`; + history.push(path, history.state); + } } switchHandler() { @@ -90,7 +105,7 @@ class TermsDetailPageContainer extends React.Component { ) : null } { - details + (details && details.text) ? (
@@ -196,6 +211,7 @@ TermsDetailPageContainer.propTypes = { 'terms-title': PT.string.isRequired, modalMsg: PT.any, }).isRequired, + history: PT.shape().isRequired, }; function mapStateToProps(state, props) {