From 866817a8431d1950c4bec2ca781b2ad2479205fb Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Fri, 15 Sep 2017 18:50:58 +0530 Subject: [PATCH 01/10] New branch with issue fix --- .../__snapshots__/DateRangePicker.jsx.snap | 2 +- .../__snapshots__/FiltersPanel.jsx.snap | 4 ++ package-lock.json | 52 +++++++++---------- .../Filters/DateRangePicker.jsx | 2 + 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/DateRangePicker.jsx.snap b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/DateRangePicker.jsx.snap index a615d07f48..e6b3b3cc3f 100644 --- a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/DateRangePicker.jsx.snap +++ b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/DateRangePicker.jsx.snap @@ -67,7 +67,7 @@ exports[`Matches shallow shapshot 1`] = ` "upArrowDownArrow": "up and down arrow keys", } } - readOnly={false} + readOnly={true} renderCalendarInfo={null} renderDay={null} renderMonth={null} diff --git a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap index 3e46f13bd2..ebd6bdee3a 100644 --- a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap +++ b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap @@ -127,6 +127,7 @@ exports[`Matches shallow shapshot 1`] = ` id="date-range-picker" numberOfMonths={1} onDatesChange={[Function]} + readOnly={true} startDate={undefined} /> @@ -143,6 +144,7 @@ exports[`Matches shallow shapshot 1`] = ` id="date-range-picker" numberOfMonths={2} onDatesChange={[Function]} + readOnly={true} startDate={undefined} /> @@ -274,6 +276,7 @@ exports[`Matches shallow shapshot 2`] = ` id="date-range-picker" numberOfMonths={1} onDatesChange={[Function]} + readOnly={true} startDate={undefined} /> @@ -290,6 +293,7 @@ exports[`Matches shallow shapshot 2`] = ` id="date-range-picker" numberOfMonths={2} onDatesChange={[Function]} + readOnly={true} startDate={undefined} /> diff --git a/package-lock.json b/package-lock.json index 709c868720..03eab05d19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4935,11 +4935,6 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" }, - "is_js": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", - "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" - }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -5177,6 +5172,11 @@ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, + "is_js": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", + "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -11822,14 +11822,6 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-convert": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", @@ -11859,6 +11851,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -12394,6 +12394,10 @@ "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.5.tgz", "integrity": "sha512-z7zOXZKEFOloIeSMtsDpudWWfXd7L2qmhyxOAve4ZGFYwBn98zYBd2R4CIlPWMpcm4ZwfhIMTVUxCDgSSXrPKw==" }, + "Base64": { + "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", + "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" + }, "abbrev": { "version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" @@ -13484,10 +13488,6 @@ "version": "https://registry.npmjs.org/base62/-/base62-1.2.0.tgz", "integrity": "sha1-MeflYNyEbJ9EwaUx32UU2jVHQVc=" }, - "Base64": { - "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", - "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" - }, "base64-js": { "version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=" @@ -15456,16 +15456,16 @@ } } }, - "string_decoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -18805,10 +18805,6 @@ "version": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", @@ -18818,6 +18814,10 @@ "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" } }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" diff --git a/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx b/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx index d4276633fd..e4f2366171 100644 --- a/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx +++ b/src/shared/components/challenge-listing/Filters/DateRangePicker.jsx @@ -37,6 +37,7 @@ class DateRangePicker extends React.Component { endDate={this.props.endDate} anchorDirection={'right'} displayFormat={'MMM DD, YYYY'} + readOnly={this.props.readOnly} /> ); } @@ -44,6 +45,7 @@ class DateRangePicker extends React.Component { DateRangePicker.defaultProps = { onDatesChange: () => true, + readOnly: true, }; DateRangePicker.propTypes = { From 3791153246d053faef8c3f9ef54e9ddd19f6a23a Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Mon, 18 Sep 2017 00:29:42 +0200 Subject: [PATCH 02/10] Replaces react-css-themr by react-css-super-themr + Fixes a communities bug Fixed communities bug: before, when we navigated from one community to another, and some metadata fields were defined in the first community, but no in the other, they had not been reseted to undefined. Fixed by ensuring that proper defaults are set for community metadata on server-side instead of undefined. Fixes #460 --- .exchange-rates.cache | 2 +- README.md | 2 +- .../__snapshots__/LeaderboardTable.jsx.snap | 16 +- .../Leaderboard/__snapshots__/Podium.jsx.snap | 4 +- .../__snapshots__/PodiumSpot.jsx.snap | 8 +- .../__snapshots__/index.jsx.snap | 4 +- .../mobile/__snapshots__/UserMenu.jsx.snap | 4 +- .../components/__snapshots__/Avatar.jsx.snap | 4 +- .../__snapshots__/ChallengeFilters.jsx.snap | 12 +- .../Themr/__snapshots__/index.jsx.snap | 20 +- .../__snapshots__/Accordion.jsx.snap | 4 +- .../__snapshots__/Banner.jsx.snap | 12 +- .../__snapshots__/CommunityStats.jsx.snap | 20 +- .../__snapshots__/IconStat.jsx.snap | 6 +- .../__snapshots__/JoinCommunity.jsx.snap | 8 +- .../__snapshots__/NewsSection.jsx.snap | 8 +- .../__snapshots__/NewsletterSignup.jsx.snap | 14 +- .../community-2/__snapshots__/Home.jsx.snap | 36 +++- .../community-2/__snapshots__/Learn.jsx.snap | 56 +++-- .../demo-expert/__snapshots__/Learn.jsx.snap | 104 +++++++--- .../taskforce/__snapshots__/Home.jsx.snap | 44 +++- .../tc-prod-dev/__snapshots__/Learn.jsx.snap | 96 ++++++--- .../wipro/__snapshots__/Learn.jsx.snap | 12 +- config/webpack/default.js | 1 + docs/coding-standards.md | 4 +- package-lock.json | 196 +++++------------- package.json | 2 +- src/shared/components/Avatar/index.jsx | 4 +- .../components/LoadingIndicator/index.jsx | 2 +- src/shared/components/Modal/index.jsx | 2 +- src/shared/components/Switch/index.jsx | 2 +- .../components/SwitchWithLabel/index.jsx | 2 +- src/shared/components/buttons/danger.scss | 2 +- src/shared/components/buttons/default.scss | 2 +- src/shared/components/buttons/index.jsx | 7 +- .../buttons/primaryDataScience.scss | 2 +- .../components/buttons/primaryDesign.scss | 2 +- .../components/buttons/primaryDevelop.scss | 2 +- src/shared/components/buttons/secondary.scss | 2 +- .../challenge-detail/Header/index.jsx | 2 +- .../Filters/FiltersSwitch/style.scss | 2 +- .../components/examples/Buttons/index.jsx | 2 +- src/shared/components/examples/Tags/index.jsx | 2 +- .../Themr/ThemableComponent/index.jsx | 2 +- .../examples/Themr/contextStyle.scss | 2 + .../components/examples/Themr/index.jsx | 4 +- src/shared/components/tags/default.scss | 6 +- .../components/tags/eventDataScience.scss | 4 +- src/shared/components/tags/eventDesign.scss | 9 +- src/shared/components/tags/eventDevelop.scss | 4 +- src/shared/components/tags/index.jsx | 2 +- .../components/tags/primaryDataScience.scss | 7 +- src/shared/components/tags/primaryDesign.scss | 7 +- .../components/tags/primaryDevelop.scss | 7 +- .../Accordion/Accordion/index.jsx | 2 +- .../Accordion/AccordionItem/index.jsx | 2 +- .../tc-communities/ArticleCard/index.jsx | 2 +- .../tc-communities/Banner/Link/index.jsx | 2 +- .../tc-communities/Banner/index.jsx | 2 +- .../tc-communities/Footer/index.jsx | 2 +- .../tc-communities/Header/index.jsx | 2 +- .../tc-communities/IconStat/index.jsx | 2 +- .../tc-communities/ImageText/index.jsx | 2 +- .../tc-communities/LinksCard/index.jsx | 2 +- .../tc-communities/NewsletterSignup/index.jsx | 2 +- .../tc-communities/ResourceCard/index.jsx | 2 +- .../tc-communities/Section/index.jsx | 2 +- .../components/tc-communities/Text/index.jsx | 2 +- .../tc-communities/VideoCard/index.jsx | 2 +- .../communities/wipro/FAQ/index.jsx | 2 +- .../communities/wipro/Footer/index.jsx | 2 +- .../communities/wipro/Home/themes/banner.scss | 17 +- .../wipro/theme/buttons/default.scss | 2 +- .../communities/wipro/theme/header.scss | 2 +- .../routes/Communities/Wipro/Routes.jsx | 2 +- src/shared/utils/tc.js | 22 +- 76 files changed, 504 insertions(+), 367 deletions(-) diff --git a/.exchange-rates.cache b/.exchange-rates.cache index 573767798a..a0c93a9c3f 100644 --- a/.exchange-rates.cache +++ b/.exchange-rates.cache @@ -1 +1 @@ -{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505476800,"base":"USD","rates":{"AED":3.672973,"AFN":68.53875,"ALL":111.73,"AMD":478.45,"ANG":1.779153,"AOA":165.9215,"ARS":16.991,"AUD":1.247669,"AWG":1.795251,"AZN":1.7,"BAM":1.635738,"BBD":2,"BDT":80.748286,"BGN":1.636866,"BHD":0.377182,"BIF":1744.7,"BMD":1,"BND":1.344435,"BOB":6.961525,"BRL":3.119496,"BSD":1,"BTC":0.000332933814,"BTN":64.115874,"BWP":10.18401,"BYN":1.938447,"BZD":2.014757,"CAD":1.214515,"CDF":1562.881563,"CHF":0.960965,"CLF":0.02319,"CLP":624.585,"CNH":6.548744,"CNY":6.544708,"COP":2897.85,"CRC":576.58,"CUC":1,"CUP":25.5,"CVE":92.875,"CZK":21.82455,"DJF":178.76,"DKK":6.226904,"DOP":47.249072,"DZD":111.064167,"EGP":17.649,"ERN":15.342579,"ETB":23.436764,"EUR":0.836853,"FJD":2.011699,"FKP":0.737039,"GBP":0.737039,"GEL":2.462425,"GGP":0.737039,"GHS":4.432711,"GIP":0.737039,"GMD":46.125,"GNF":8958.4,"GTQ":7.290084,"GYD":207.965254,"HKD":7.81631,"HNL":23.386311,"HRK":6.257973,"HTG":63.022754,"HUF":258.53643,"IDR":13245.494062,"ILS":3.521825,"IMP":0.737039,"INR":64.095,"IQD":1167.5,"IRR":33310,"ISK":105.869261,"JEP":0.737039,"JMD":130.718525,"JOD":0.709001,"JPY":111.24616667,"KES":102.89,"KGS":68.643776,"KHR":4053.25,"KMF":413.765225,"KPW":900,"KRW":1130.8775,"KWD":0.301312,"KYD":0.832879,"KZT":339.45,"LAK":8284.8,"LBP":1507.45,"LKR":152.844139,"LRD":117.074294,"LSL":13.189412,"LYD":1.361315,"MAD":9.346,"MDL":17.619678,"MGA":2964.6,"MKD":51.51098,"MMK":1356.4,"MNT":2453.879163,"MOP":8.046782,"MRO":364.805,"MUR":33.435,"MVR":15.409873,"MWK":725.54,"MXN":17.69335,"MYR":4.189799,"MZN":61.31,"NAD":13.19125,"NGN":359.787233,"NIO":30.350347,"NOK":7.818863,"NPR":102.528085,"NZD":1.373359,"OMR":0.384928,"PAB":1,"PEN":3.23699,"PGK":3.19319,"PHP":51.3075,"PKR":105.338422,"PLN":3.576407,"PYG":5651.15,"QAR":3.705007,"RON":3.848964,"RSD":99.74475,"RUB":57.6456,"RWF":831.045,"SAR":3.750774,"SBD":7.734844,"SCR":13.58249,"SDG":6.673154,"SEK":7.952538,"SGD":1.344,"SHP":0.737039,"SLL":7538.529905,"SOS":578.390064,"SRD":7.438,"SSP":125.881,"STD":20535.146277,"SVC":8.74534,"SYP":514.99999,"SZL":13.18534,"THB":33.09125,"TJS":8.792897,"TMT":3.504979,"TND":2.445204,"TOP":2.217942,"TRY":3.440186,"TTD":6.743577,"TWD":30.062,"TZS":2243.1,"UAH":26.190843,"UGX":3593.3,"USD":1,"UYU":28.993638,"UZS":8087.8,"VEF":9.985022,"VND":22753.894861,"VUV":103.676756,"WST":2.509453,"XAF":548.939628,"XAG":0.05661072,"XAU":0.00075623,"XCD":2.70255,"XDR":0.704516,"XOF":548.939628,"XPD":0.00107946,"XPF":99.863135,"XPT":0.00102682,"YER":250.306642,"ZAR":13.17867,"ZMW":9.3882,"ZWL":322.355011}} \ No newline at end of file +{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505667605,"base":"USD","rates":{"AED":3.673018,"AFN":68.6555,"ALL":111.94,"AMD":479.33149,"ANG":1.780573,"AOA":165.9215,"ARS":16.998695,"AUD":1.2495,"AWG":1.795504,"AZN":1.7,"BAM":1.637148,"BBD":2,"BDT":80.812667,"BGN":1.63577,"BHD":0.377011,"BIF":1746.05,"BMD":1,"BND":1.344995,"BOB":6.967312,"BRL":3.111222,"BSD":1,"BTC":0.000266773882,"BTN":64.110799,"BWP":10.188712,"BYN":1.940118,"BZD":2.016369,"CAD":1.219654,"CDF":1560,"CHF":0.96006,"CLF":0.02317,"CLP":624.4,"CNH":6.546622,"CNY":6.5526,"COP":2897.25,"CRC":577.04,"CUC":1,"CUP":25.5,"CVE":92.5,"CZK":21.845509,"DJF":178.57,"DKK":6.229181,"DOP":47.290669,"DZD":111.071,"EGP":17.6435,"ERN":15.33,"ETB":23.45501,"EUR":0.837135,"FJD":2.011699,"FKP":0.735645,"GBP":0.735645,"GEL":2.464538,"GGP":0.735645,"GHS":4.436479,"GIP":0.735645,"GMD":45.875,"GNF":8970,"GTQ":7.295961,"GYD":208.08,"HKD":7.81925,"HNL":23.406512,"HRK":6.26,"HTG":63.067879,"HUF":258.95,"IDR":13240.832859,"ILS":3.521887,"IMP":0.735645,"INR":64.126661,"IQD":1169.175369,"IRR":33310,"ISK":106.658713,"JEP":0.735645,"JMD":130.81281,"JOD":0.7086,"JPY":110.83844928,"KES":103.08048,"KGS":68.599399,"KHR":4056.4,"KMF":412.025,"KPW":900,"KRW":1133.25,"KWD":0.301284,"KYD":0.833535,"KZT":339.74,"LAK":8291.3,"LBP":1508.7,"LKR":152.95,"LRD":117.002232,"LSL":13.1995,"LYD":1.3625,"MAD":9.343101,"MDL":17.599529,"MGA":2966.95,"MKD":51.537325,"MMK":1357.45,"MNT":2450.916667,"MOP":8.052724,"MRO":365.08315,"MUR":33.42,"MVR":15.450233,"MWK":726.208938,"MXN":17.656937,"MYR":4.189975,"MZN":61.499992,"NAD":13.1995,"NGN":360.2,"NIO":30.37668,"NOK":7.850835,"NPR":102.620712,"NZD":1.37155,"OMR":0.38503,"PAB":1,"PEN":3.23805,"PGK":3.195665,"PHP":51.294,"PKR":105.405465,"PLN":3.58015,"PYG":5655.4,"QAR":3.64325,"RON":3.851876,"RSD":99.674799,"RUB":57.6877,"RWF":832.65994,"SAR":3.7504,"SBD":7.830881,"SCR":13.6,"SDG":6.678951,"SEK":7.9669,"SGD":1.345307,"SHP":0.735645,"SLL":7562.5,"SOS":579.535007,"SRD":7.438,"SSP":125.881,"STD":20512.75,"SVC":8.752337,"SYP":514.98999,"SZL":13.1955,"THB":33.10125,"TJS":8.800293,"TMT":3.50998,"TND":2.445393,"TOP":2.21505,"TRY":3.437792,"TTD":6.749059,"TWD":30.070115,"TZS":2243.75,"UAH":26.212642,"UGX":3596.15,"USD":1,"UYU":29.015056,"UZS":8094.8,"VEF":9.985022,"VND":22724.1,"VUV":103.880001,"WST":2.509533,"XAF":549.124563,"XAG":0.05686676,"XAU":0.00075752,"XCD":2.70255,"XDR":0.702343,"XOF":549.124563,"XPD":0.00108288,"XPF":99.896778,"XPT":0.00103094,"YER":250.325,"ZAR":13.1532,"ZMW":9.548118,"ZWL":322.355011}} \ No newline at end of file diff --git a/README.md b/README.md index cf92b1ed16..00dd8ac7fb 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ This App already contains: - Node-Config; - React; - React CSS Modules (via Babel plugin); -- [react-css-themr](https://github.com/javivelasco/react-css-themr); +- [react-css-super-themr](https://github.com/birdofpreyru/react-css-super-themr); - React Router; - Redux with Flux Standard Actions, redux-promise middleware, support of server-side rendering, and DevTools for dev environment; - SCSS support; diff --git a/__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap b/__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap index 4728b0f0ee..b3605aa784 100644 --- a/__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap +++ b/__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap @@ -45,7 +45,8 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x" > @@ -102,7 +104,8 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x" > @@ -159,7 +163,8 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x" > @@ -216,7 +222,8 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x" > diff --git a/__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap b/__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap index 7eb011f47d..69750208f8 100644 --- a/__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap +++ b/__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap @@ -59,8 +59,10 @@ exports[`Matches shallow shapshot 2`] = ` className="src-shared-components-Leaderboard-Podium-___styles__Podium___2rb4T" > `; diff --git a/__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap b/__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap index 187534f53f..b6a28b69c1 100644 --- a/__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap +++ b/__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap @@ -8,7 +8,8 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-Leaderboard-PodiumSpot-___styles__leaderboard-avatar___2Aea7" > @@ -55,7 +57,8 @@ exports[`Matches shallow shapshot 2`] = ` className="src-shared-components-Leaderboard-PodiumSpot-___styles__leaderboard-avatar___2Aea7" > diff --git a/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap b/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap index 1803310172..4ee143f409 100644 --- a/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap @@ -469,7 +469,8 @@ exports[`Render with specified profile 1`] = ` className="src-shared-components-TopcoderHeader-___style__avatar___3BqbY" > diff --git a/__tests__/shared/components/TopcoderHeader/mobile/__snapshots__/UserMenu.jsx.snap b/__tests__/shared/components/TopcoderHeader/mobile/__snapshots__/UserMenu.jsx.snap index a1acff7509..4aec924457 100644 --- a/__tests__/shared/components/TopcoderHeader/mobile/__snapshots__/UserMenu.jsx.snap +++ b/__tests__/shared/components/TopcoderHeader/mobile/__snapshots__/UserMenu.jsx.snap @@ -9,7 +9,8 @@ exports[`Snapshot match 1`] = ` href="/members/username" > diff --git a/__tests__/shared/components/examples/Themr/__snapshots__/index.jsx.snap b/__tests__/shared/components/examples/Themr/__snapshots__/index.jsx.snap index f799f81e05..f3d586ab7a 100644 --- a/__tests__/shared/components/examples/Themr/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/examples/Themr/__snapshots__/index.jsx.snap @@ -10,14 +10,17 @@ exports[`Matches shallow shapshot 1`] = ` Default theme

Default theme + Parent-provided styling

Default theme + Context styling @@ -40,8 +44,10 @@ exports[`Matches shallow shapshot 1`] = ` } >

@@ -58,7 +64,8 @@ exports[`Matches shallow shapshot 1`] = ` } >

@@ -78,8 +86,10 @@ exports[`Matches shallow shapshot 1`] = ` theme={Object {}} > diff --git a/__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap index f3d50736ef..a8f137864e 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap @@ -15,11 +15,13 @@ exports[`Snapshot match 1`] = ` } >
diff --git a/__tests__/shared/components/tc-communities/__snapshots__/Banner.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/Banner.jsx.snap index 590c1002e9..24bab341c4 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/Banner.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/Banner.jsx.snap @@ -31,14 +31,14 @@ exports[`Snapshot match 2`] = ` text="You’re eager to get started, and we have a bunch of iOS/Swift challenges!" theme={ Object { - "container": "src-shared-components-tc-communities-Banner-___style__container___2NxGp container", - "content": "src-shared-components-tc-communities-Banner-___style__content___21lXO content", - "contentBg": "src-shared-components-tc-communities-Banner-___style__contentBg___145Ln contentBg", - "contentInner": "src-shared-components-tc-communities-Banner-___style__contentInner___3w8VH contentInner", + "container": "container src-shared-components-tc-communities-Banner-___style__container___2NxGp", + "content": "content src-shared-components-tc-communities-Banner-___style__content___21lXO", + "contentBg": "contentBg src-shared-components-tc-communities-Banner-___style__contentBg___145Ln", + "contentInner": "contentInner src-shared-components-tc-communities-Banner-___style__contentInner___3w8VH", "link": "link", "linkWrap": "linkWrap", - "text": "src-shared-components-tc-communities-Banner-___style__text___-lkXi text", - "title": "src-shared-components-tc-communities-Banner-___style__title___GMY8V title", + "text": "text src-shared-components-tc-communities-Banner-___style__text___-lkXi", + "title": "title src-shared-components-tc-communities-Banner-___style__title___GMY8V", } } title="iOS" diff --git a/__tests__/shared/components/tc-communities/__snapshots__/CommunityStats.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/CommunityStats.jsx.snap index a1a5f2d153..f6b8587eae 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/CommunityStats.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/CommunityStats.jsx.snap @@ -3,7 +3,8 @@ exports[`Snapshot match 1`] = ` `; diff --git a/__tests__/shared/components/tc-communities/__snapshots__/IconStat.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/IconStat.jsx.snap index f4d139bb3b..2edec25efb 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/IconStat.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/IconStat.jsx.snap @@ -2,19 +2,19 @@ exports[`Snapshot match 1`] = `

5

Projects

diff --git a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap index f965c10ae3..fb819ab963 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap @@ -30,13 +30,15 @@ exports[`Matches shallow shapshot 2`] = ` Joining...

@@ -58,10 +60,12 @@ exports[`Matches shallow shapshot 4`] = ` Join Community

diff --git a/__tests__/shared/components/tc-communities/__snapshots__/NewsletterSignup.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/NewsletterSignup.jsx.snap index 0904b25819..31f0fe5eee 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/NewsletterSignup.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/NewsletterSignup.jsx.snap @@ -29,13 +29,13 @@ exports[`Snapshot match 2`] = ` text="Don’t miss out on the latest Topcoder IOS challenges and information!" theme={ Object { - "container": "src-shared-components-tc-communities-NewsletterSignup-___style__container___3FbuD container", - "content": "src-shared-components-tc-communities-NewsletterSignup-___style__content___3QiYz content", - "form": "src-shared-components-tc-communities-NewsletterSignup-___style__form___3yW86 form", - "formButton": "src-shared-components-tc-communities-NewsletterSignup-___style__formButton___Jve55 formButton", - "formEmail": "src-shared-components-tc-communities-NewsletterSignup-___style__formEmail___3N_Uv formEmail", - "text": "src-shared-components-tc-communities-NewsletterSignup-___style__text___1bA_y text", - "title": "src-shared-components-tc-communities-NewsletterSignup-___style__title___ErlHl title", + "container": "container src-shared-components-tc-communities-NewsletterSignup-___style__container___3FbuD", + "content": "content src-shared-components-tc-communities-NewsletterSignup-___style__content___3QiYz", + "form": "form src-shared-components-tc-communities-NewsletterSignup-___style__form___3yW86", + "formButton": "formButton src-shared-components-tc-communities-NewsletterSignup-___style__formButton___Jve55", + "formEmail": "formEmail src-shared-components-tc-communities-NewsletterSignup-___style__formEmail___3N_Uv", + "text": "text src-shared-components-tc-communities-NewsletterSignup-___style__text___1bA_y", + "title": "title src-shared-components-tc-communities-NewsletterSignup-___style__title___ErlHl", } } title="Sign up for our newsletter" diff --git a/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Home.jsx.snap b/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Home.jsx.snap index 86d2279bd0..6694515b1d 100644 --- a/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Home.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Home.jsx.snap @@ -3,7 +3,8 @@ exports[`Match shadow snapshot 1`] = `
@@ -130,12 +146,14 @@ exports[`Match shadow snapshot 1`] = ` />
diff --git a/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Learn.jsx.snap index d78b9644ec..1a31b4979b 100644 --- a/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Learn.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/community-2/__snapshots__/Learn.jsx.snap @@ -3,7 +3,8 @@ exports[`Match shadow snapshot 1`] = `

The FULCRUM is “one stop shop” for access to a wide range of training and learning opportunities on Wipro’s Hybrid Crowd. Designed to strengthen the skills of employees, the hub offers physical and online platforms to learn skills on demand, gain hands-on experience, and be future ready. @@ -76,7 +86,8 @@ exports[`Match shadow snapshot 1`] = `

diff --git a/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap index 60d1959217..22bc09b25b 100644 --- a/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/demo-expert/__snapshots__/Learn.jsx.snap @@ -3,7 +3,8 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -68,17 +78,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -86,17 +100,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -118,17 +136,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -136,17 +158,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -168,17 +194,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -186,17 +216,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -207,7 +241,8 @@ exports[`Snapshot match 1`] = `

diff --git a/__tests__/shared/components/tc-communities/communities/taskforce/__snapshots__/Home.jsx.snap b/__tests__/shared/components/tc-communities/communities/taskforce/__snapshots__/Home.jsx.snap index 69b0961cf4..e2b3fc3d5a 100644 --- a/__tests__/shared/components/tc-communities/communities/taskforce/__snapshots__/Home.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/taskforce/__snapshots__/Home.jsx.snap @@ -3,7 +3,8 @@ exports[`Match shadow snapshot 1`] = `

Through Topcoder TaskForce you can easily and quickly get quality design, development, and data tasks accomplished. No matchmaking, no searching for talent, simply tell us what you need done and we’ll take care of the rest. @@ -109,7 +121,8 @@ exports[`Match shadow snapshot 1`] = ` @@ -182,12 +202,14 @@ exports[`Match shadow snapshot 1`] = ` />

diff --git a/__tests__/shared/components/tc-communities/communities/tc-prod-dev/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/tc-prod-dev/__snapshots__/Learn.jsx.snap index a948b9ffcf..a3e1e1c731 100644 --- a/__tests__/shared/components/tc-communities/communities/tc-prod-dev/__snapshots__/Learn.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/tc-prod-dev/__snapshots__/Learn.jsx.snap @@ -3,7 +3,8 @@ exports[`Snapshot match 1`] = `

First things first, ...make sure you sign up for Topcoder. It's quick and painless and opens the door to a whole new world. @@ -65,17 +75,21 @@ exports[`Snapshot match 1`] = `

It's likely that you'll be working on code in a specific git repo. We have many of them, so be sure to ask if you're not sure which one you shoudl be looking at. @@ -86,17 +100,21 @@ exports[`Snapshot match 1`] = `

Nam dapibus nisl vitae elit fringilla rutrum. Aenean sollicitudin, erat a elementum rutrum, neque sem pretium metus, quis mollis nisl nunc et massa. Vestibulum sed metus in lorem tristique ullamcorper id vitae erat. Nulla mollis sapien sollicitudin lacinia lacinia. Vivamus facilisis dolor et massa placerat, at vestibulum nisl egestas. Nullam rhoncus lacus non odio luctus, eu condimentum mauris ultrices. Praesent blandit, augue a posuere aliquam, arcu tortor feugiat turpis, @@ -118,17 +136,21 @@ exports[`Snapshot match 1`] = `

If you'd like to be a copilot for Topcoder projects, send an email to support@topcoder.com and tell us a little about yourself. @@ -156,17 +178,21 @@ exports[`Snapshot match 1`] = `

Make sure you've setup your payment preferences at https://community.topcoder.com/tc?module=EditPaymentPreferences. When you've earned some money and want to withdraw it, you can do that at https://community.topcoder.com/PactsMemberServlet?module=PaymentHistory&full_list=false @@ -174,17 +200,21 @@ exports[`Snapshot match 1`] = `

Everything to do with managing your profile and preferences can be found at https://www.topcoder.com/settings/account/. If you can't find what you're looking for, send us a note at support@topcoder.com. @@ -195,7 +225,8 @@ exports[`Snapshot match 1`] = `

diff --git a/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap b/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap index 6becf4f94a..a30c76c062 100644 --- a/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap +++ b/__tests__/shared/components/tc-communities/communities/wipro/__snapshots__/Learn.jsx.snap @@ -3,7 +3,8 @@ exports[`Snapshot match 1`] = `

Continue diff --git a/config/webpack/default.js b/config/webpack/default.js index f8a4f53b4a..4430aaef62 100644 --- a/config/webpack/default.js +++ b/config/webpack/default.js @@ -114,6 +114,7 @@ module.exports = { /* NOTE: Aliases related to .jsx and .jsx files are defined in Babel * config. */ assets: path.resolve(__dirname, '../../src/assets'), + components: path.resolve(__dirname, '../../src/shared/components'), styles: path.resolve(__dirname, '../../src/styles'), }, extensions: ['.js', '.json', '.jsx', '.scss'], diff --git a/docs/coding-standards.md b/docs/coding-standards.md index d74b969a5e..245a4e92a7 100644 --- a/docs/coding-standards.md +++ b/docs/coding-standards.md @@ -57,7 +57,7 @@ Don't put the actual HTTP calls directly into actions. Always implement them as Redux reducers live in [`reducers`](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/reducers) folder. We use *reducer factories* as our custom solution for async server-side rendering. Details are given in [this document](./why-reducer-factories-and-how-to-use-them.md). Mind that in many cases you should not care much about proper server-side rendering until your code works properly without it. ### Styling -We use CSS Modules ([`babel-plugin-react-css-modules`](https://github.com/gajus/babel-plugin-react-css-modules)) for simple styling all around. In the cases when some components can be reused in multiple places with somewhat different styling (i.e. you see that for some component the same JS code can be reused, while styles should be different), we use [`react-css-themr`](https://github.com/javivelasco/react-css-themr). +We use CSS Modules ([`babel-plugin-react-css-modules`](https://github.com/gajus/babel-plugin-react-css-modules)) for simple styling all around. In the cases when some components can be reused in multiple places with somewhat different styling (i.e. you see that for some component the same JS code can be reused, while styles should be different), we use [`react-css-super-themr`](https://github.com/javivelasco/react-css-super-themr). Generally, there is no need to nest your SCSS code, trying to reproduce nesting of the related HTML markup. During the build, React CSS Modules plugin replaces class names from your stylesheets with specially generated ones, that ensure that there is no clushes between SCSS classes of the same names defined in different SCSS modules. Mind that this replacement is done differently in dev and prod; it is wrong to use generated class names anywhere by taking them from the resulting HTML markup and hard-coding anywhere in the code. The correct way to get class names generated by React CSS Modules plugin is ```js @@ -77,7 +77,7 @@ Avoid using **transform** rules for components that may have arbitrary children. - [Lodash](https://lodash.com/) for all utility function missing in the standard JS. - [MomentJS](https://momentjs.com) for advanced date- / time-related functionality. - We have [money service](https://github.com/topcoder-platform/community-app/blob/develop/src/shared/services/money.js), which allows to make conversions between currencies, using real up-to-date rates from [https://openexchangerates.org](https://openexchangerates.org). -- We have standard [buttons](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/buttons) and [tags](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/tags) (it is also a good example of react-css-themr use). Depending on props these components act either as real buttons, or as button-like links (they are implemented in such way, that switching between these options does not demand any efforts to keep the style). +- We have standard [buttons](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/buttons) and [tags](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/tags) (it is also a good example of react-css-super-themr use). Depending on props these components act either as real buttons, or as button-like links (they are implemented in such way, that switching between these options does not demand any efforts to keep the style). - [Modal](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/Modal) is the base for all modal windows in our app. - [LoadingIndicator](https://github.com/topcoder-platform/community-app/tree/develop/src/shared/components/LoadingIndicator) says for itself (at the moment it works correctly only against a solid white background). diff --git a/package-lock.json b/package-lock.json index 2d2b31ac46..f81a0f5eb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10509,10 +10509,10 @@ "pure-color": "1.3.0" } }, - "react-css-themr": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-css-themr/-/react-css-themr-2.1.2.tgz", - "integrity": "sha1-4BdRTkccIy9Dp1SlW0nYH69dr7g=", + "react-css-super-themr": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-css-super-themr/-/react-css-super-themr-2.2.0.tgz", + "integrity": "sha512-fcSRGHVhYEBU8zx530RViXd7rjosirUjv0PFXimKNHRsoGuhnu1wb0lYDJ1xwhUfehJ/rr3O60+H3jRFP78KaQ==", "requires": { "hoist-non-react-statics": "1.2.0", "invariant": "2.2.2" @@ -14964,18 +14964,12 @@ "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", - "optional": true + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" }, "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=" }, "ansi-regex": { "version": "2.1.1", @@ -14985,8 +14979,7 @@ "aproba": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", - "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", - "optional": true + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=" }, "are-we-there-yet": { "version": "1.1.4", @@ -14996,32 +14989,27 @@ "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "optional": true + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "optional": true + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "optional": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "optional": true + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" }, "aws4": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", - "optional": true + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "balanced-match": { "version": "0.4.2", @@ -15036,27 +15024,17 @@ "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "2.0.3" - } + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "requires": { - "hoek": "2.16.3" - } + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" }, "brace-expansion": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", - "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } + "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=" }, "buffer-shims": { "version": "1.0.0", @@ -15066,14 +15044,12 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "optional": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", @@ -15083,10 +15059,7 @@ "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "requires": { - "delayed-stream": "1.0.0" - } + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" }, "concat-map": { "version": "0.0.1", @@ -15106,43 +15079,29 @@ "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "optional": true, - "requires": { - "boom": "2.10.1" - } + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "optional": true, - "requires": { - "ms": "2.0.0" - } + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" }, "deep-extend": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", - "optional": true + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" }, "delayed-stream": { "version": "1.0.0", @@ -15152,23 +15111,17 @@ "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "optional": true + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=" }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "optional": true + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extsprintf": { "version": "1.0.2", @@ -15178,19 +15131,12 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=" }, "fs.realpath": { "version": "1.0.0", @@ -15216,16 +15162,11 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -15242,24 +15183,17 @@ "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "optional": true + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" }, "har-validator": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=" }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "optional": true + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, "hawk": { "version": "3.1.3", @@ -15289,22 +15223,17 @@ "ini": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", - "optional": true + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=" }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "isarray": { "version": "1.0.0", @@ -15314,50 +15243,37 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "jodid25519": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", - "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=" }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "optional": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "optional": true, - "requires": { - "jsonify": "0.0.0" - } + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=" }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "optional": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "optional": true + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "jsprim": { "version": "1.4.0", @@ -15367,8 +15283,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -15380,18 +15295,12 @@ "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", - "requires": { - "mime-db": "1.27.0" - } + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.7" - } + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" }, "minimist": { "version": "0.0.8", @@ -15401,16 +15310,12 @@ "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "optional": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node-pre-gyp": { "version": "0.6.36", @@ -15435,14 +15340,12 @@ "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "optional": true + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "optional": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "once": { "version": "1.4.0", @@ -15452,8 +15355,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "optional": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-tmpdir": { "version": "1.0.2", diff --git a/package.json b/package.json index 53b1c7d72c..1b709eef48 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "rc-tooltip": "^3.4.9", "react": "^15.6.1", "react-addons-shallow-compare": "^15.6.0", - "react-css-themr": "^2.1.2", + "react-css-super-themr": "^2.2.0", "react-dates": "^12.6.0", "react-dom": "^15.6.1", "react-dropdown": "^1.3.0", diff --git a/src/shared/components/Avatar/index.jsx b/src/shared/components/Avatar/index.jsx index 91cbda7781..3df6ebb5e5 100644 --- a/src/shared/components/Avatar/index.jsx +++ b/src/shared/components/Avatar/index.jsx @@ -8,7 +8,7 @@ * * Styling: * By default the avatar is round-shaped. Custom styling may be applied using - * react-css-themr. + * react-css-super-themr. * * Usage: * @@ -20,7 +20,7 @@ import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import DefaultAvatar from '../../../assets/images/ico-user-default.svg'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/LoadingIndicator/index.jsx b/src/shared/components/LoadingIndicator/index.jsx index aa33ceaadf..91125be8e3 100644 --- a/src/shared/components/LoadingIndicator/index.jsx +++ b/src/shared/components/LoadingIndicator/index.jsx @@ -1,7 +1,7 @@ import PT from 'prop-types'; import Source from 'assets/images/ripple.gif'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import style from './styles.scss'; function LoadingIndicator({ theme }) { diff --git a/src/shared/components/Modal/index.jsx b/src/shared/components/Modal/index.jsx index ed9ea070a2..5f46167eab 100644 --- a/src/shared/components/Modal/index.jsx +++ b/src/shared/components/Modal/index.jsx @@ -9,7 +9,7 @@ import React from 'react'; import PT from 'prop-types'; import _ from 'lodash'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './styles.scss'; function Modal(props) { diff --git a/src/shared/components/Switch/index.jsx b/src/shared/components/Switch/index.jsx index d3f1030a6c..9607402363 100644 --- a/src/shared/components/Switch/index.jsx +++ b/src/shared/components/Switch/index.jsx @@ -7,7 +7,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; function Switch(props) { diff --git a/src/shared/components/SwitchWithLabel/index.jsx b/src/shared/components/SwitchWithLabel/index.jsx index 8585ca4282..92d76f8756 100644 --- a/src/shared/components/SwitchWithLabel/index.jsx +++ b/src/shared/components/SwitchWithLabel/index.jsx @@ -7,7 +7,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import Switch from '../Switch'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/buttons/danger.scss b/src/shared/components/buttons/danger.scss index adea0f26f3..76033e26fa 100644 --- a/src/shared/components/buttons/danger.scss +++ b/src/shared/components/buttons/danger.scss @@ -2,7 +2,7 @@ * Primary button, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active { diff --git a/src/shared/components/buttons/default.scss b/src/shared/components/buttons/default.scss index f423c1d241..0d7a3fdb80 100644 --- a/src/shared/components/buttons/default.scss +++ b/src/shared/components/buttons/default.scss @@ -3,7 +3,7 @@ * a bit rounded corners. */ -@import "~styles/tc-styles"; +@import "~styles/mixins"; @mixin feedback { &:active { diff --git a/src/shared/components/buttons/index.jsx b/src/shared/components/buttons/index.jsx index 3cd612cf26..06fd2526bc 100644 --- a/src/shared/components/buttons/index.jsx +++ b/src/shared/components/buttons/index.jsx @@ -6,11 +6,12 @@ * the props passed in. * * The button uses react-css-themr for styling, and it is exported mupltiple - * times, differently wrapped with react-css-themr decorator. The intent behind + * times, differently wrapped with react-css-super-themr decorator. The intent + * behind * it is to provide a standard button implementation, which can be easily styled * according to the context of use. E.g. in new pages of the main Topcoder site * the design assumes that primary buttons are colored with the colors of - * competition track to which the page relates. react-css-themr allows to + * competition track to which the page relates. react-css-super-themr allows to * wrap entire page into ThemeProvider which overrides the styling of all * PrimaryButton instances in the page; it still allows to further customise * each of these buttons passing theme object directly into each button @@ -40,7 +41,7 @@ import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'utils/router'; import dangerButton from './danger.scss'; diff --git a/src/shared/components/buttons/primaryDataScience.scss b/src/shared/components/buttons/primaryDataScience.scss index 3f3bb8a38c..9a500fe67c 100644 --- a/src/shared/components/buttons/primaryDataScience.scss +++ b/src/shared/components/buttons/primaryDataScience.scss @@ -2,7 +2,7 @@ * Primary button, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active { diff --git a/src/shared/components/buttons/primaryDesign.scss b/src/shared/components/buttons/primaryDesign.scss index 3a51b97524..66c3d2516d 100644 --- a/src/shared/components/buttons/primaryDesign.scss +++ b/src/shared/components/buttons/primaryDesign.scss @@ -2,7 +2,7 @@ * Primary button, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active { diff --git a/src/shared/components/buttons/primaryDevelop.scss b/src/shared/components/buttons/primaryDevelop.scss index 43bb8ab03d..395cb5e92f 100644 --- a/src/shared/components/buttons/primaryDevelop.scss +++ b/src/shared/components/buttons/primaryDevelop.scss @@ -2,7 +2,7 @@ * Primary button, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active { diff --git a/src/shared/components/buttons/secondary.scss b/src/shared/components/buttons/secondary.scss index e856560a3c..34cab910b4 100644 --- a/src/shared/components/buttons/secondary.scss +++ b/src/shared/components/buttons/secondary.scss @@ -2,7 +2,7 @@ * Primary button, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active { diff --git a/src/shared/components/challenge-detail/Header/index.jsx b/src/shared/components/challenge-detail/Header/index.jsx index 4c7230dcd3..87f5c2aedd 100755 --- a/src/shared/components/challenge-detail/Header/index.jsx +++ b/src/shared/components/challenge-detail/Header/index.jsx @@ -11,7 +11,7 @@ import React from 'react'; import PT from 'prop-types'; import moment from 'moment'; import { DangerButton, PrimaryButton } from 'components/buttons'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import ArrowUp from '../../../../assets/images/icon-arrow-up.svg'; import ArrowDown from '../../../../assets/images/icon-arrow-down.svg'; diff --git a/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss b/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss index ed0663f59e..66cdbaf1df 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss +++ b/src/shared/components/challenge-listing/Filters/FiltersSwitch/style.scss @@ -6,7 +6,7 @@ $switch-radius-2: $corner-radius; $switch-radius-4: $corner-radius * 2; .FiltersSwitch { - background: $tc-gray-30; + background: $tc-white; border: 1px solid $tc-gray-30; color: $tc-black; min-width: $switch-space-100 + 2; diff --git a/src/shared/components/examples/Buttons/index.jsx b/src/shared/components/examples/Buttons/index.jsx index 32f1682404..0b4b53da9e 100644 --- a/src/shared/components/examples/Buttons/index.jsx +++ b/src/shared/components/examples/Buttons/index.jsx @@ -5,7 +5,7 @@ import { PrimaryButton, SecondaryButton, } from 'components/buttons'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import primaryDataScienceButtonStyle from '../../buttons/primaryDataScience.scss'; import primaryDevelopButtonStyle from '../../buttons/primaryDevelop.scss'; diff --git a/src/shared/components/examples/Tags/index.jsx b/src/shared/components/examples/Tags/index.jsx index 3d5e76323c..257ffde069 100644 --- a/src/shared/components/examples/Tags/index.jsx +++ b/src/shared/components/examples/Tags/index.jsx @@ -5,7 +5,7 @@ import { PrimaryTag, EventTag, } from 'components/tags'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import primaryDataScienceTagStyle from 'components/tags/primaryDataScience.scss'; import primaryDevelopTagStyle from 'components/tags/primaryDevelop.scss'; diff --git a/src/shared/components/examples/Themr/ThemableComponent/index.jsx b/src/shared/components/examples/Themr/ThemableComponent/index.jsx index 599c24e2c3..33b820194a 100644 --- a/src/shared/components/examples/Themr/ThemableComponent/index.jsx +++ b/src/shared/components/examples/Themr/ThemableComponent/index.jsx @@ -5,7 +5,7 @@ import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import style from './style.scss'; function ThemableComponent({ theme }) { diff --git a/src/shared/components/examples/Themr/contextStyle.scss b/src/shared/components/examples/Themr/contextStyle.scss index 65d36b253d..5e064b744f 100644 --- a/src/shared/components/examples/Themr/contextStyle.scss +++ b/src/shared/components/examples/Themr/contextStyle.scss @@ -1,3 +1,5 @@ +@import "ThemableComponent/style"; + .box { background: paleturquoise !important; border: 3px dashed red !important; diff --git a/src/shared/components/examples/Themr/index.jsx b/src/shared/components/examples/Themr/index.jsx index 4e2d6718d8..257c618cbb 100644 --- a/src/shared/components/examples/Themr/index.jsx +++ b/src/shared/components/examples/Themr/index.jsx @@ -1,9 +1,9 @@ /** - * react-css-themr test/demo. + * react-css-super-themr test/demo. */ import React from 'react'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import ThemableComponent from './ThemableComponent'; import contextStyle from './contextStyle.scss'; import style from './style.scss'; diff --git a/src/shared/components/tags/default.scss b/src/shared/components/tags/default.scss index a0de155385..b454f9d46c 100644 --- a/src/shared/components/tags/default.scss +++ b/src/shared/components/tags/default.scss @@ -1,13 +1,13 @@ /** * Challenge tag button, default style with white text on light blue background. */ -@import "~styles/tc-styles"; +@import "~styles/mixins"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-gray-80 !important; + color: $tc-gray-80; background-color: $tc-dark-blue-30; } @@ -24,7 +24,7 @@ font: bold 11px/20px Roboto; color: $tc-gray-80; margin-right: 5px; - border-radius: 4px; + border-radius: 2 * $corner-radius; margin-bottom: 2px; cursor: pointer; diff --git a/src/shared/components/tags/eventDataScience.scss b/src/shared/components/tags/eventDataScience.scss index d14b1e034f..c37f686031 100644 --- a/src/shared/components/tags/eventDataScience.scss +++ b/src/shared/components/tags/eventDataScience.scss @@ -2,13 +2,13 @@ * Event tag, colored with colors of data science track (orange). */ -@import "~styles/tc-styles"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-orange !important; + color: $tc-orange; background-color: $tc-orange-10; } diff --git a/src/shared/components/tags/eventDesign.scss b/src/shared/components/tags/eventDesign.scss index dabe393d94..384424af6c 100644 --- a/src/shared/components/tags/eventDesign.scss +++ b/src/shared/components/tags/eventDesign.scss @@ -2,13 +2,13 @@ * Event tag, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-dark-blue-90 !important; + color: $tc-dark-blue-90; background-color: $tc-light-blue-10; } @@ -18,11 +18,6 @@ } .tag { - border-radius: 3px; - font-size: 10px; - margin: 5px 5px 0 0; - padding: 0 5px; - font-weight: 700; color: $tc-dark-blue-90; background-color: $tc-light-blue-10; diff --git a/src/shared/components/tags/eventDevelop.scss b/src/shared/components/tags/eventDevelop.scss index be167ee450..2ba95bf2f4 100644 --- a/src/shared/components/tags/eventDevelop.scss +++ b/src/shared/components/tags/eventDevelop.scss @@ -2,13 +2,13 @@ * Event tag, colored with colors of develop track (green). */ -@import "~styles/tc-styles"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-green !important; + color: $tc-green; background-color: $tc-green-10; } diff --git a/src/shared/components/tags/index.jsx b/src/shared/components/tags/index.jsx index 6fa63f1809..9c5e291bc1 100644 --- a/src/shared/components/tags/index.jsx +++ b/src/shared/components/tags/index.jsx @@ -1,6 +1,6 @@ import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'utils/router'; import defaultTag from './default.scss'; diff --git a/src/shared/components/tags/primaryDataScience.scss b/src/shared/components/tags/primaryDataScience.scss index 8fd818b0e2..5d636aa7c9 100644 --- a/src/shared/components/tags/primaryDataScience.scss +++ b/src/shared/components/tags/primaryDataScience.scss @@ -2,13 +2,13 @@ * Primary tag, colored with colors of data science track (orange). */ -@import "./default"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-white !important; + color: $tc-white; background-color: $tc-orange; } @@ -19,10 +19,7 @@ .tag { background-color: $tc-orange; - border-radius: 3px; color: $tc-white; - margin: 5px 5px 0 0; - padding: 0 5px; @include feedback; } diff --git a/src/shared/components/tags/primaryDesign.scss b/src/shared/components/tags/primaryDesign.scss index b5f60e430d..2d15e547aa 100644 --- a/src/shared/components/tags/primaryDesign.scss +++ b/src/shared/components/tags/primaryDesign.scss @@ -2,13 +2,13 @@ * Primary tag, colored with colors of design track (blue). */ -@import "./default"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-white !important; + color: $tc-white; background-color: $tc-light-blue; } @@ -19,10 +19,7 @@ .tag { background-color: $tc-light-blue; - border-radius: 3px; color: $tc-white; - margin: 5px 5px 0 0; - padding: 0 5px; @include feedback; } diff --git a/src/shared/components/tags/primaryDevelop.scss b/src/shared/components/tags/primaryDevelop.scss index 02f651f842..78c12ae67a 100644 --- a/src/shared/components/tags/primaryDevelop.scss +++ b/src/shared/components/tags/primaryDevelop.scss @@ -2,13 +2,13 @@ * Primary tag, colored with colors of develop track (green). */ -@import "./default"; +@import "default"; @mixin feedback { &:active, &:focus, &:hover { - color: $tc-white !important; + color: $tc-white; background-color: $tc-green; } @@ -19,10 +19,7 @@ .tag { background-color: $tc-green; - border-radius: 3px; color: $tc-white; - margin: 5px 5px 0 0; - padding: 0 5px; @include feedback; } diff --git a/src/shared/components/tc-communities/Accordion/Accordion/index.jsx b/src/shared/components/tc-communities/Accordion/Accordion/index.jsx index d4bf7b0dcf..67b759cd4e 100644 --- a/src/shared/components/tc-communities/Accordion/Accordion/index.jsx +++ b/src/shared/components/tc-communities/Accordion/Accordion/index.jsx @@ -12,7 +12,7 @@ import React, { Component } from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import cn from 'classnames'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/Accordion/AccordionItem/index.jsx b/src/shared/components/tc-communities/Accordion/AccordionItem/index.jsx index d73aaebce4..f81d5ddcda 100644 --- a/src/shared/components/tc-communities/Accordion/AccordionItem/index.jsx +++ b/src/shared/components/tc-communities/Accordion/AccordionItem/index.jsx @@ -10,7 +10,7 @@ import _ from 'lodash'; import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import cn from 'classnames'; import Sticky from 'react-stickynode'; import IconTickDown from '../../../../../assets/images/tc-communities/tick_down_big.svg'; diff --git a/src/shared/components/tc-communities/ArticleCard/index.jsx b/src/shared/components/tc-communities/ArticleCard/index.jsx index 65f58903f3..5e28116ab7 100644 --- a/src/shared/components/tc-communities/ArticleCard/index.jsx +++ b/src/shared/components/tc-communities/ArticleCard/index.jsx @@ -4,7 +4,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'react-router-dom'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/Banner/Link/index.jsx b/src/shared/components/tc-communities/Banner/Link/index.jsx index f575539d77..ee8e63a6f1 100644 --- a/src/shared/components/tc-communities/Banner/Link/index.jsx +++ b/src/shared/components/tc-communities/Banner/Link/index.jsx @@ -7,7 +7,7 @@ import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link as RouterLink } from 'utils/router'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/Banner/index.jsx b/src/shared/components/tc-communities/Banner/index.jsx index 2bc5244f8a..8b191701c7 100644 --- a/src/shared/components/tc-communities/Banner/index.jsx +++ b/src/shared/components/tc-communities/Banner/index.jsx @@ -5,7 +5,7 @@ import _ from 'lodash'; import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; import Link from './Link'; diff --git a/src/shared/components/tc-communities/Footer/index.jsx b/src/shared/components/tc-communities/Footer/index.jsx index f44cf8cb34..6914dd39c9 100644 --- a/src/shared/components/tc-communities/Footer/index.jsx +++ b/src/shared/components/tc-communities/Footer/index.jsx @@ -8,7 +8,7 @@ import _ from 'lodash'; import config from 'utils/config'; import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link, NavLink } from 'react-router-dom'; import defaultStyle from './style.scss'; import TopcoderLogoGray from '../../../../assets/images/tc-communities/logo_topcoder_gray.svg'; diff --git a/src/shared/components/tc-communities/Header/index.jsx b/src/shared/components/tc-communities/Header/index.jsx index e866ff25cb..0a3c7654d4 100644 --- a/src/shared/components/tc-communities/Header/index.jsx +++ b/src/shared/components/tc-communities/Header/index.jsx @@ -16,7 +16,7 @@ import Avatar from 'components/Avatar'; import { Link, NavLink } from 'utils/router'; import { getRatingColor } from 'utils/tc'; import Dropdown from 'components/tc-communities/Dropdown'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import IconSearch from '../../../../assets/images/tc-communities/search.svg'; import IconNavExit from '../../../../assets/images/nav/exit.svg'; import IconNavSettings from '../../../../assets/images/nav/settings.svg'; diff --git a/src/shared/components/tc-communities/IconStat/index.jsx b/src/shared/components/tc-communities/IconStat/index.jsx index c1140e5c4e..f81dfb7b16 100644 --- a/src/shared/components/tc-communities/IconStat/index.jsx +++ b/src/shared/components/tc-communities/IconStat/index.jsx @@ -5,7 +5,7 @@ import React from 'react'; import _ from 'lodash'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; function IconStat(props) { diff --git a/src/shared/components/tc-communities/ImageText/index.jsx b/src/shared/components/tc-communities/ImageText/index.jsx index bd2fbe91b6..4a9fe19ecd 100644 --- a/src/shared/components/tc-communities/ImageText/index.jsx +++ b/src/shared/components/tc-communities/ImageText/index.jsx @@ -5,7 +5,7 @@ import _ from 'lodash'; import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'utils/router'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/LinksCard/index.jsx b/src/shared/components/tc-communities/LinksCard/index.jsx index 9025af26b1..1cc9f6a6f1 100644 --- a/src/shared/components/tc-communities/LinksCard/index.jsx +++ b/src/shared/components/tc-communities/LinksCard/index.jsx @@ -5,7 +5,7 @@ import _ from 'lodash'; import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'react-router-dom'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/NewsletterSignup/index.jsx b/src/shared/components/tc-communities/NewsletterSignup/index.jsx index e7cf96e8a5..8dc96cefeb 100644 --- a/src/shared/components/tc-communities/NewsletterSignup/index.jsx +++ b/src/shared/components/tc-communities/NewsletterSignup/index.jsx @@ -9,7 +9,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; function NewsletterSignup(props) { diff --git a/src/shared/components/tc-communities/ResourceCard/index.jsx b/src/shared/components/tc-communities/ResourceCard/index.jsx index 72de5edb22..c406ca2a8f 100644 --- a/src/shared/components/tc-communities/ResourceCard/index.jsx +++ b/src/shared/components/tc-communities/ResourceCard/index.jsx @@ -4,7 +4,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'react-router-dom'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/Section/index.jsx b/src/shared/components/tc-communities/Section/index.jsx index 0eb1406b93..12cdfffce6 100644 --- a/src/shared/components/tc-communities/Section/index.jsx +++ b/src/shared/components/tc-communities/Section/index.jsx @@ -17,7 +17,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import { Link } from 'utils/router'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/Text/index.jsx b/src/shared/components/tc-communities/Text/index.jsx index 9f53e1c4c0..397e237ead 100644 --- a/src/shared/components/tc-communities/Text/index.jsx +++ b/src/shared/components/tc-communities/Text/index.jsx @@ -6,7 +6,7 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; function Text(props) { diff --git a/src/shared/components/tc-communities/VideoCard/index.jsx b/src/shared/components/tc-communities/VideoCard/index.jsx index 5a8bb28e34..f70ac7724c 100644 --- a/src/shared/components/tc-communities/VideoCard/index.jsx +++ b/src/shared/components/tc-communities/VideoCard/index.jsx @@ -5,7 +5,7 @@ import Player from 'react-player'; import PT from 'prop-types'; import React from 'react'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; function ArticleCard(props) { diff --git a/src/shared/components/tc-communities/communities/wipro/FAQ/index.jsx b/src/shared/components/tc-communities/communities/wipro/FAQ/index.jsx index 8bbb2ae0e4..6e57d14576 100644 --- a/src/shared/components/tc-communities/communities/wipro/FAQ/index.jsx +++ b/src/shared/components/tc-communities/communities/wipro/FAQ/index.jsx @@ -25,7 +25,7 @@ import Text from 'components/tc-communities/Text'; import Accordion from 'components/tc-communities/Accordion/Accordion'; import AccordionItem from 'components/tc-communities/Accordion/AccordionItem'; import Text from 'components/tc-communities/Text'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import theme from '../theme'; import style from './style.scss'; diff --git a/src/shared/components/tc-communities/communities/wipro/Footer/index.jsx b/src/shared/components/tc-communities/communities/wipro/Footer/index.jsx index 678a545373..399854a462 100644 --- a/src/shared/components/tc-communities/communities/wipro/Footer/index.jsx +++ b/src/shared/components/tc-communities/communities/wipro/Footer/index.jsx @@ -1,6 +1,6 @@ import React from 'react'; import PT from 'prop-types'; -import { themr } from 'react-css-themr'; +import { themr } from 'react-css-super-themr'; import defaultStyle from './style.scss'; diff --git a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss index 1de3a0a2a3..847d18b79e 100644 --- a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss +++ b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss @@ -1,4 +1,4 @@ -@import '~styles/tc-styles'; +@import '~styles/mixins'; .container { @include xxs-to-xs { @@ -7,18 +7,15 @@ } .content { - position: absolute; - bottom: 0; - left: 0; border-radius: 100%; - width: 364px; + bottom: 0; height: 364px; - transform: none; + left: 0; overflow: visible; - - @include xxs-to-xs { - top: 50%; - } + position: absolute; + top: 50%; + transform: none; + width: 364px; } .contentBg { diff --git a/src/shared/components/tc-communities/communities/wipro/theme/buttons/default.scss b/src/shared/components/tc-communities/communities/wipro/theme/buttons/default.scss index 6f705cfc36..bcf2192adb 100644 --- a/src/shared/components/tc-communities/communities/wipro/theme/buttons/default.scss +++ b/src/shared/components/tc-communities/communities/wipro/theme/buttons/default.scss @@ -3,7 +3,7 @@ * a bit rounded corners. */ -@import "~styles/tc-styles"; +@import "~styles/mixins"; @mixin feedback { &:active { diff --git a/src/shared/components/tc-communities/communities/wipro/theme/header.scss b/src/shared/components/tc-communities/communities/wipro/theme/header.scss index daf982425d..5dc3d87e60 100644 --- a/src/shared/components/tc-communities/communities/wipro/theme/header.scss +++ b/src/shared/components/tc-communities/communities/wipro/theme/header.scss @@ -1,4 +1,4 @@ -@import "~styles/tc-styles"; +@import "../../../Header/style.scss"; .logo { &:first-child > img { diff --git a/src/shared/routes/Communities/Wipro/Routes.jsx b/src/shared/routes/Communities/Wipro/Routes.jsx index a4e0c3dfef..a3b55c2eed 100644 --- a/src/shared/routes/Communities/Wipro/Routes.jsx +++ b/src/shared/routes/Communities/Wipro/Routes.jsx @@ -11,7 +11,7 @@ import Learn from 'components/tc-communities/communities/wipro/Learn'; import PT from 'prop-types'; import React from 'react'; import theme from 'components/tc-communities/communities/wipro/theme'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-css-super-themr'; import { Route, Switch } from 'react-router-dom'; import ChallengeListing from '../ChallengeListing'; diff --git a/src/shared/utils/tc.js b/src/shared/utils/tc.js index 0e2932be59..4cf79dee75 100644 --- a/src/shared/utils/tc.js +++ b/src/shared/utils/tc.js @@ -80,7 +80,27 @@ export function getCommunitiesMetadata(communityId) { if (err) { reject({ error: '404', communityId }); } else { - const metadata = JSON.parse(data); + /* NOTE: We should prevent "undefined" fields, otherwise reducers + * won't replace previously set fields by the new values fetched + * from the api (it looks like reducer should be improved, but it + * is easier just to set these defaults). */ + const metadata = _.defaults(JSON.parse(data), { + authorizedGorupIds: null, + challengeFilter: null, + challengeListing: null, + communityId: '', + communitySelector: [], + groupId: null, + leaderboardApiUrl: null, + logos: [], + additionalLogos: null, + hideSearch: false, + chevronOverAvatar: false, + menuItems: [], + newsFeed: null, + description: null, + image: null, + }); resolve(metadata); } }); From 4813f03ae1a997510b2eac346f9c1bf9cd007fd0 Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Mon, 18 Sep 2017 14:10:53 +0200 Subject: [PATCH 03/10] Updated package-lock.json and .exchange-rates.cache --- .exchange-rates.cache | 2 +- package-lock.json | 52 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.exchange-rates.cache b/.exchange-rates.cache index a0c93a9c3f..3ddffed910 100644 --- a/.exchange-rates.cache +++ b/.exchange-rates.cache @@ -1 +1 @@ -{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505667605,"base":"USD","rates":{"AED":3.673018,"AFN":68.6555,"ALL":111.94,"AMD":479.33149,"ANG":1.780573,"AOA":165.9215,"ARS":16.998695,"AUD":1.2495,"AWG":1.795504,"AZN":1.7,"BAM":1.637148,"BBD":2,"BDT":80.812667,"BGN":1.63577,"BHD":0.377011,"BIF":1746.05,"BMD":1,"BND":1.344995,"BOB":6.967312,"BRL":3.111222,"BSD":1,"BTC":0.000266773882,"BTN":64.110799,"BWP":10.188712,"BYN":1.940118,"BZD":2.016369,"CAD":1.219654,"CDF":1560,"CHF":0.96006,"CLF":0.02317,"CLP":624.4,"CNH":6.546622,"CNY":6.5526,"COP":2897.25,"CRC":577.04,"CUC":1,"CUP":25.5,"CVE":92.5,"CZK":21.845509,"DJF":178.57,"DKK":6.229181,"DOP":47.290669,"DZD":111.071,"EGP":17.6435,"ERN":15.33,"ETB":23.45501,"EUR":0.837135,"FJD":2.011699,"FKP":0.735645,"GBP":0.735645,"GEL":2.464538,"GGP":0.735645,"GHS":4.436479,"GIP":0.735645,"GMD":45.875,"GNF":8970,"GTQ":7.295961,"GYD":208.08,"HKD":7.81925,"HNL":23.406512,"HRK":6.26,"HTG":63.067879,"HUF":258.95,"IDR":13240.832859,"ILS":3.521887,"IMP":0.735645,"INR":64.126661,"IQD":1169.175369,"IRR":33310,"ISK":106.658713,"JEP":0.735645,"JMD":130.81281,"JOD":0.7086,"JPY":110.83844928,"KES":103.08048,"KGS":68.599399,"KHR":4056.4,"KMF":412.025,"KPW":900,"KRW":1133.25,"KWD":0.301284,"KYD":0.833535,"KZT":339.74,"LAK":8291.3,"LBP":1508.7,"LKR":152.95,"LRD":117.002232,"LSL":13.1995,"LYD":1.3625,"MAD":9.343101,"MDL":17.599529,"MGA":2966.95,"MKD":51.537325,"MMK":1357.45,"MNT":2450.916667,"MOP":8.052724,"MRO":365.08315,"MUR":33.42,"MVR":15.450233,"MWK":726.208938,"MXN":17.656937,"MYR":4.189975,"MZN":61.499992,"NAD":13.1995,"NGN":360.2,"NIO":30.37668,"NOK":7.850835,"NPR":102.620712,"NZD":1.37155,"OMR":0.38503,"PAB":1,"PEN":3.23805,"PGK":3.195665,"PHP":51.294,"PKR":105.405465,"PLN":3.58015,"PYG":5655.4,"QAR":3.64325,"RON":3.851876,"RSD":99.674799,"RUB":57.6877,"RWF":832.65994,"SAR":3.7504,"SBD":7.830881,"SCR":13.6,"SDG":6.678951,"SEK":7.9669,"SGD":1.345307,"SHP":0.735645,"SLL":7562.5,"SOS":579.535007,"SRD":7.438,"SSP":125.881,"STD":20512.75,"SVC":8.752337,"SYP":514.98999,"SZL":13.1955,"THB":33.10125,"TJS":8.800293,"TMT":3.50998,"TND":2.445393,"TOP":2.21505,"TRY":3.437792,"TTD":6.749059,"TWD":30.070115,"TZS":2243.75,"UAH":26.212642,"UGX":3596.15,"USD":1,"UYU":29.015056,"UZS":8094.8,"VEF":9.985022,"VND":22724.1,"VUV":103.880001,"WST":2.509533,"XAF":549.124563,"XAG":0.05686676,"XAU":0.00075752,"XCD":2.70255,"XDR":0.702343,"XOF":549.124563,"XPD":0.00108288,"XPF":99.896778,"XPT":0.00103094,"YER":250.325,"ZAR":13.1532,"ZMW":9.548118,"ZWL":322.355011}} \ No newline at end of file +{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505736000,"base":"USD","rates":{"AED":3.673158,"AFN":68.5815,"ALL":111.8,"AMD":477.790313,"ANG":1.778804,"AOA":165.9215,"ARS":16.9755,"AUD":1.25125,"AWG":1.795504,"AZN":1.7,"BAM":1.634564,"BBD":2,"BDT":80.672708,"BGN":1.636335,"BHD":0.377082,"BIF":1741.930974,"BMD":1,"BND":1.34545,"BOB":6.960491,"BRL":3.109108,"BSD":1,"BTC":0.000253264491,"BTN":64.116668,"BWP":10.145655,"BYN":1.937212,"BZD":2.014389,"CAD":1.220886,"CDF":1562.881563,"CHF":0.959897,"CLF":0.02317,"CLP":624.3,"CNH":6.573772,"CNY":6.567823,"COP":2895.45,"CRC":576.47,"CUC":1,"CUP":25.5,"CVE":92.5,"CZK":21.844736,"DJF":178.57,"DKK":6.230533,"DOP":47.218414,"DZD":111.31,"EGP":17.657,"ERN":15.33,"ETB":23.555095,"EUR":0.837253,"FJD":2.021499,"FKP":0.738416,"GBP":0.738416,"GEL":2.4678,"GGP":0.738416,"GHS":4.389404,"GIP":0.738416,"GMD":45.875,"GNF":8956.4,"GTQ":7.288462,"GYD":207.825,"HKD":7.816553,"HNL":23.374343,"HRK":6.263403,"HTG":62.980903,"HUF":259.437857,"IDR":13250.485412,"ILS":3.522186,"IMP":0.738416,"INR":64.13575,"IQD":1165.334957,"IRR":33322.5,"ISK":106.536883,"JEP":0.738416,"JMD":130.80781,"JOD":0.7085,"JPY":111.36808333,"KES":103.163661,"KGS":68.5084,"KHR":4056.35,"KMF":412.198944,"KPW":900,"KRW":1127.07,"KWD":0.301343,"KYD":0.832734,"KZT":340.315,"LAK":8280.05,"LBP":1506.95,"LKR":153.01,"LRD":117.002232,"LSL":13.175459,"LYD":1.361065,"MAD":9.344244,"MDL":17.643449,"MGA":2988,"MKD":51.51,"MMK":1345.1,"MNT":2459.426676,"MOP":8.045534,"MRO":364.77,"MUR":33.434,"MVR":15.450233,"MWK":725.38,"MXN":17.68575,"MYR":4.186467,"MZN":61.32,"NAD":13.176312,"NGN":359.885566,"NIO":30.345231,"NOK":7.824174,"NPR":102.523085,"NZD":1.372936,"OMR":0.384999,"PAB":1,"PEN":3.250448,"PGK":3.237256,"PHP":51.254,"PKR":105.279978,"PLN":3.5905,"PYG":5655.55,"QAR":3.6391,"RON":3.8506,"RSD":99.645,"RUB":57.747,"RWF":830.004133,"SAR":3.7509,"SBD":7.830881,"SCR":13.550608,"SDG":6.672493,"SEK":7.970225,"SGD":1.346251,"SHP":0.738416,"SLL":7562.5,"SOS":577.104786,"SRD":7.438,"SSP":126.0479,"STD":20503.299805,"SVC":8.743343,"SYP":515.10499,"SZL":13.181602,"THB":33.090672,"TJS":8.79211,"TMT":3.50998,"TND":2.439804,"TOP":2.232925,"TRY":3.4586,"TTD":6.74155,"TWD":30.098212,"TZS":2244.6,"UAH":26.142754,"UGX":3593.6,"USD":1,"UYU":28.997418,"UZS":8086.95,"VEF":9.985022,"VND":22727.933333,"VUV":104.754453,"WST":2.500057,"XAF":549.202101,"XAG":0.05731152,"XAU":0.00076117,"XCD":2.70255,"XDR":0.702343,"XOF":549.202101,"XPD":0.00107202,"XPF":99.910884,"XPT":0.00103467,"YER":250.319142,"ZAR":13.207619,"ZMW":9.628588,"ZWL":322.355011}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c49e27d2dc..f81a0f5eb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4935,6 +4935,11 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" }, + "is_js": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", + "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" + }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -5172,11 +5177,6 @@ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, - "is_js": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", - "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -11822,6 +11822,14 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-convert": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", @@ -11851,14 +11859,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -12394,10 +12394,6 @@ "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.5.tgz", "integrity": "sha512-z7zOXZKEFOloIeSMtsDpudWWfXd7L2qmhyxOAve4ZGFYwBn98zYBd2R4CIlPWMpcm4ZwfhIMTVUxCDgSSXrPKw==" }, - "Base64": { - "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", - "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" - }, "abbrev": { "version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" @@ -13488,6 +13484,10 @@ "version": "https://registry.npmjs.org/base62/-/base62-1.2.0.tgz", "integrity": "sha1-MeflYNyEbJ9EwaUx32UU2jVHQVc=" }, + "Base64": { + "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", + "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" + }, "base64-js": { "version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=" @@ -15456,16 +15456,16 @@ } } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" - }, "string_decoder": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=" }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -18805,6 +18805,10 @@ "version": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "string-width": { "version": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", @@ -18814,10 +18818,6 @@ "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" } }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "stringstream": { "version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" From de647fcd465aeb626431d9aca19856ba802f9b65 Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Mon, 18 Sep 2017 16:20:36 +0200 Subject: [PATCH 04/10] New implementation of LoadingIndicator Used to be an animated GIF, that did not work well on non-white backgrounds; now it is an SVG, animated by JS, it should work fine on any background. Fixes #436 --- .../__snapshots__/LoadingIndicator.jsx.snap | 22 +++-- .../__snapshots__/JoinCommunity.jsx.snap | 2 +- config/jest/setup.js | 4 + .../components/LoadingIndicator/index.jsx | 82 +++++++++++++++++-- .../components/LoadingIndicator/styles.scss | 18 +++- .../tc-communities/JoinCommunity/index.jsx | 2 +- 6 files changed, 112 insertions(+), 18 deletions(-) diff --git a/__tests__/shared/components/__snapshots__/LoadingIndicator.jsx.snap b/__tests__/shared/components/__snapshots__/LoadingIndicator.jsx.snap index f10b10e905..3b7d86a673 100644 --- a/__tests__/shared/components/__snapshots__/LoadingIndicator.jsx.snap +++ b/__tests__/shared/components/__snapshots__/LoadingIndicator.jsx.snap @@ -1,9 +1,21 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` -Loading... + + + + `; diff --git a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap index fb819ab963..ffabfd3fc4 100644 --- a/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap +++ b/__tests__/shared/components/tc-communities/__snapshots__/JoinCommunity.jsx.snap @@ -35,7 +35,7 @@ exports[`Matches shallow shapshot 2`] = ` mapThemrProps={[Function]} theme={ Object { - "style": "src-shared-components-tc-communities-JoinCommunity-___style__loadingIndicator___2RP1u", + "container": "src-shared-components-tc-communities-JoinCommunity-___style__loadingIndicator___2RP1u", } } themePriority="adhoc-context-default" diff --git a/config/jest/setup.js b/config/jest/setup.js index 7eaa35225e..c17f1c1edd 100644 --- a/config/jest/setup.js +++ b/config/jest/setup.js @@ -1,5 +1,7 @@ /* global Event, jest */ +import _ from 'lodash'; + global.window.matchMedia = global.window.matchMedia || function matchMedia() { return { matches: false, @@ -8,6 +10,8 @@ global.window.matchMedia = global.window.matchMedia || function matchMedia() { }; }; +global.window.requestAnimationFrame = _.noop; + global.window.resizeTo = (width, height) => { global.window.innerWidth = width || global.window.innerWidth; global.window.innerHeight = height || global.window.innerHeight; diff --git a/src/shared/components/LoadingIndicator/index.jsx b/src/shared/components/LoadingIndicator/index.jsx index 91125be8e3..66be73cb78 100644 --- a/src/shared/components/LoadingIndicator/index.jsx +++ b/src/shared/components/LoadingIndicator/index.jsx @@ -1,17 +1,81 @@ +/** + * Waiting indicator: two co-centric circles periodically increasing their + * radiuses till maximum value, then resetting it to zero. + * + * NOTE: It is implemented as class component because stand-alone animated SVG + * images are not well supported across all browsers yet. + */ + +/* global window */ + import PT from 'prop-types'; -import Source from 'assets/images/ripple.gif'; import React from 'react'; import { themr } from 'react-css-super-themr'; import style from './styles.scss'; -function LoadingIndicator({ theme }) { - return ( - Loading... - ); +class LoadingIndicator extends React.Component { + /** + * Calculates animation phase for the specified timestamp. + * @param {Number} timestamp Current animation time in [ms]. + * @param {Number} shift Optional phase shift [dimensionless]. + * @return {Number} Returns animation phase: a number in [0.0; 1.0] range, + * specifying current position inside animation loop. You may note that + * the result does not change linearly with time, instead it goes quadratic + * in a way that makes animation progress faster in the beginning, and + * slower in the end of a cycle. + */ + static calcPhase(timestamp, shift = 0) { + const PERIOD = 2; /* [s] */ + return ((timestamp / 1000 / PERIOD) + shift) % 1; + } + + componentDidMount() { + this.animationId = window.requestAnimationFrame(ts => this.animation(ts)); + } + + componentWillUnmount() { + window.cancelAnimationFrame(this.animationId); + } + + /* Moves animation forward. */ + animation(timestamp) { + if (this.circle1) { + const phase1 = LoadingIndicator.calcPhase(timestamp); + this.circle1.setAttribute('r', 28 * phase1 * (2.0 - phase1)); + this.circle1.setAttribute('opacity', 1.0 - (phase1 * phase1)); + } + if (this.circle2) { + const phase2 = LoadingIndicator.calcPhase(timestamp, 0.5); + this.circle2.setAttribute('r', 28 * phase2 * (2.0 - phase2)); + this.circle2.setAttribute('opacity', 1.0 - (phase2 * phase2)); + } + this.animationId = window.requestAnimationFrame(ts => this.animation(ts)); + } + + render() { + const { theme } = this.props; + return ( + + { this.circle1 = node; }} + /> + { this.circle2 = node; }} + /> + + ); + } } LoadingIndicator.propTypes = { diff --git a/src/shared/components/LoadingIndicator/styles.scss b/src/shared/components/LoadingIndicator/styles.scss index 24d2fba379..626da9c3dc 100644 --- a/src/shared/components/LoadingIndicator/styles.scss +++ b/src/shared/components/LoadingIndicator/styles.scss @@ -1,7 +1,21 @@ -@import '~styles/tc-styles'; +@import '~styles/mixins'; -.style { +.container { display: block; + height: 64px; margin: 0 auto; text-align: center; + width: 64px; +} + +.circle1 { + fill: none; + stroke: #149efe; + stroke-width: 2; +} + +.circle2 { + fill: none; + stroke: #e3e4e5; + stroke-width: 2; } diff --git a/src/shared/components/tc-communities/JoinCommunity/index.jsx b/src/shared/components/tc-communities/JoinCommunity/index.jsx index ad6abfe01e..48fcedbef4 100644 --- a/src/shared/components/tc-communities/JoinCommunity/index.jsx +++ b/src/shared/components/tc-communities/JoinCommunity/index.jsx @@ -53,7 +53,7 @@ export default function JoinCommunity({ { state === STATE.JOINING ? (

Joining...

- +
) : label} From 5ef2a69b1750a803b2ffbea3d4c80dde32484ff7 Mon Sep 17 00:00:00 2001 From: "Dr. Sergey Pogodin" Date: Mon, 18 Sep 2017 17:53:09 +0200 Subject: [PATCH 05/10] Enhances Challenge Details page for non-existing challenges --- .../containers/challenge-detail/index.jsx | 5 +++++ .../containers/challenge-detail/styles.scss | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index a96741867e..87693b2d9a 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -145,6 +145,11 @@ class ChallengeDetailPageContainer extends React.Component { return (
+ { Boolean(isEmpty) && ( +
+ Challenge #{challengeId} does not exist! +
+ )} { !isEmpty && Date: Mon, 18 Sep 2017 17:57:48 +0200 Subject: [PATCH 06/10] Tiny enhancement of the previous commit --- src/shared/containers/challenge-detail/styles.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/containers/challenge-detail/styles.scss b/src/shared/containers/challenge-detail/styles.scss index 4a32304a5e..7976f73fe1 100644 --- a/src/shared/containers/challenge-detail/styles.scss +++ b/src/shared/containers/challenge-detail/styles.scss @@ -4,6 +4,7 @@ background: $tc-gray-neutral-dark; bottom: 0; left: 0; + overflow-y: scroll; position: absolute; right: 0; top: 0; From 99d1071c2bb1494efef4df9816b2ae42a757a919 Mon Sep 17 00:00:00 2001 From: TonyJ Date: Mon, 18 Sep 2017 12:14:55 -0400 Subject: [PATCH 07/10] updated topgear home content --- .../tc-communities/communities/wipro/Home/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/tc-communities/communities/wipro/Home/index.jsx b/src/shared/components/tc-communities/communities/wipro/Home/index.jsx index 2f9a800ee7..ab5bb8ed90 100644 --- a/src/shared/components/tc-communities/communities/wipro/Home/index.jsx +++ b/src/shared/components/tc-communities/communities/wipro/Home/index.jsx @@ -116,7 +116,7 @@ export default function Home(props) {
Date: Mon, 18 Sep 2017 18:29:40 +0200 Subject: [PATCH 08/10] Updated demo page of loading indicators --- .../LoadingIndicators/green-red-theme.scss | 22 +++++++++ .../examples/LoadingIndicators/index.jsx | 47 ++++++++++++------- .../examples/LoadingIndicators/style.scss | 8 ++++ .../LoadingIndicators/yellow-pink-theme.scss | 22 +++++++++ 4 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 src/shared/components/examples/LoadingIndicators/green-red-theme.scss create mode 100644 src/shared/components/examples/LoadingIndicators/yellow-pink-theme.scss diff --git a/src/shared/components/examples/LoadingIndicators/green-red-theme.scss b/src/shared/components/examples/LoadingIndicators/green-red-theme.scss new file mode 100644 index 0000000000..998943a160 --- /dev/null +++ b/src/shared/components/examples/LoadingIndicators/green-red-theme.scss @@ -0,0 +1,22 @@ +/** + * A sample green / red theme for the loading indicator. + * It is here just to demonstrate customization of the indicator, + * do not use this very style inside the app (it is aesthetically ugly). + */ + +.container { + display: inline-block !important; + height: 128px !important; + vertical-align: middle; + width: 128px !important; +} + +.circle1 { + stroke: green !important; + stroke-width: 1 !important; +} + +.circle2 { + stroke: red !important; + stroke-width: 1 !important; +} diff --git a/src/shared/components/examples/LoadingIndicators/index.jsx b/src/shared/components/examples/LoadingIndicators/index.jsx index 30f92b674d..31e96dfc93 100644 --- a/src/shared/components/examples/LoadingIndicators/index.jsx +++ b/src/shared/components/examples/LoadingIndicators/index.jsx @@ -1,30 +1,43 @@ import LoadingIndicator from 'components/LoadingIndicator'; import React from 'react'; -import './style.scss'; +import greenRedTheme from './green-red-theme.scss'; +import yellowPinkTheme from './yellow-pink-theme.scss'; +import style from './style.scss'; -export default function Buttons() { +export default function LoadingIndicators() { return ( -
+

Loading Indicators

- Demo of loading indicators we have in the code base (at the moment just - a single one, and it works fine against white background only, as - demonstrated below). + Demo of loading indicators we have in the code base. At the moment we + have just one type, but you can flexibly tune its size / coloring using + SCSS:

-
- +
+ */ + theme={{ container: style.indicatorContainer }} + /> + +
- -

- Here is the demo of our loading indicator against non-white backgrounds. - Hopefully, it will be fixed soon. -

-
- +
+ + +
-
- +
+ + +
); diff --git a/src/shared/components/examples/LoadingIndicators/style.scss b/src/shared/components/examples/LoadingIndicators/style.scss index 5a3eb1f3f6..e777b2266b 100644 --- a/src/shared/components/examples/LoadingIndicators/style.scss +++ b/src/shared/components/examples/LoadingIndicators/style.scss @@ -3,6 +3,7 @@ .black-bg { background: black; padding: 24px; + text-align: center; } .page { @@ -46,8 +47,15 @@ ); margin-top: 24px; padding: 24px; + text-align: center; } .white-bg { padding: 24px; + text-align: center; +} + +.indicatorContainer { + display: inline-block; + vertical-align: middle; } diff --git a/src/shared/components/examples/LoadingIndicators/yellow-pink-theme.scss b/src/shared/components/examples/LoadingIndicators/yellow-pink-theme.scss new file mode 100644 index 0000000000..96251da072 --- /dev/null +++ b/src/shared/components/examples/LoadingIndicators/yellow-pink-theme.scss @@ -0,0 +1,22 @@ +/** + * A sample yellow / pink theme for the loading indicator. + * It is here just to demonstrate customization of the indicator, + * do not use this very style inside the app (it is aesthetically ugly). + */ + +.container { + display: inline-block !important; + height: 72px !important; + vertical-align: middle; + width: 72px !important; +} + +.circle1 { + stroke: yellow !important; + stroke-width: 6 !important; +} + +.circle2 { + stroke: pink !important; + stroke-width: 6 !important; +} From 4734a0433348621dadcf4de29b34f7a041a65d48 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Mon, 18 Sep 2017 23:15:55 +0530 Subject: [PATCH 09/10] Change margin/padding in banner.scss. These classes are used only at one place in the whole project, so shouldn't affect other UI's --- package-lock.json | 52 +++++++++---------- .../communities/wipro/Home/themes/banner.scss | 5 +- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index f81a0f5eb5..c49e27d2dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4935,11 +4935,6 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" }, - "is_js": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", - "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" - }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -5177,6 +5172,11 @@ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, + "is_js": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", + "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -11822,14 +11822,6 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-convert": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", @@ -11859,6 +11851,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -12394,6 +12394,10 @@ "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-5.0.5.tgz", "integrity": "sha512-z7zOXZKEFOloIeSMtsDpudWWfXd7L2qmhyxOAve4ZGFYwBn98zYBd2R4CIlPWMpcm4ZwfhIMTVUxCDgSSXrPKw==" }, + "Base64": { + "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", + "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" + }, "abbrev": { "version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" @@ -13484,10 +13488,6 @@ "version": "https://registry.npmjs.org/base62/-/base62-1.2.0.tgz", "integrity": "sha1-MeflYNyEbJ9EwaUx32UU2jVHQVc=" }, - "Base64": { - "version": "https://registry.npmjs.org/Base64/-/Base64-0.1.4.tgz", - "integrity": "sha1-6fbGvvVn/WNepBYqsU3TKedKpt4=" - }, "base64-js": { "version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=" @@ -15456,16 +15456,16 @@ } } }, - "string_decoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=" }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -18805,10 +18805,6 @@ "version": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", @@ -18818,6 +18814,10 @@ "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" } }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" diff --git a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss index 847d18b79e..a9484721f0 100644 --- a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss +++ b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss @@ -52,7 +52,8 @@ h2.title { font-family: 'Akkurat mono'; font-size: 20px; line-height: 100%; - padding-left: 30px; + padding-left: 18px; + padding-top:5px; text-transform: none; width: 167px; } @@ -60,7 +61,7 @@ h2.title { .text { font-family: 'Akkurat regular'; line-height: 20px; - margin-left: 30px; + margin-left: 18px; margin-right: 30px; } From 158cfd92c77825e5d510061c09a98a0da139f2d3 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Mon, 18 Sep 2017 23:27:19 +0530 Subject: [PATCH 10/10] Change margin/padding in banner.scss. These classes are used only at one place in the whole project, so shouldn't affect other UI's --- .../tc-communities/communities/wipro/Home/themes/banner.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss index a9484721f0..000cd76e44 100644 --- a/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss +++ b/src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss @@ -53,7 +53,7 @@ h2.title { font-size: 20px; line-height: 100%; padding-left: 18px; - padding-top:5px; + padding-top: 5px; text-transform: none; width: 167px; }