Skip to content

Commit 3791153

Browse files
committed
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
1 parent dd87440 commit 3791153

File tree

76 files changed

+504
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+504
-367
lines changed

.exchange-rates.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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}}
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}}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ This App already contains:
104104
- Node-Config;
105105
- React;
106106
- React CSS Modules (via Babel plugin);
107-
- [react-css-themr](https://github.com/javivelasco/react-css-themr);
107+
- [react-css-super-themr](https://github.com/birdofpreyru/react-css-super-themr);
108108
- React Router;
109109
- Redux with Flux Standard Actions, redux-promise middleware, support of server-side rendering, and DevTools for dev environment;
110110
- SCSS support;

__tests__/shared/components/Leaderboard/__snapshots__/LeaderboardTable.jsx.snap

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ exports[`Matches shallow shapshot 1`] = `
4545
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x"
4646
>
4747
<ThemedAvatar
48-
composeTheme="deeply"
48+
composeAdhocTheme="deeply"
49+
composeContextTheme="softly"
4950
customStyles={null}
5051
mapThemrProps={[Function]}
5152
theme={
5253
Object {
5354
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
5455
}
5556
}
57+
themePriority="adhoc-context-default"
5658
url="some.fake.string"
5759
/>
5860
</span>
@@ -102,14 +104,16 @@ exports[`Matches shallow shapshot 1`] = `
102104
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x"
103105
>
104106
<ThemedAvatar
105-
composeTheme="deeply"
107+
composeAdhocTheme="deeply"
108+
composeContextTheme="softly"
106109
customStyles={null}
107110
mapThemrProps={[Function]}
108111
theme={
109112
Object {
110113
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
111114
}
112115
}
116+
themePriority="adhoc-context-default"
113117
url="some.fake.string"
114118
/>
115119
</span>
@@ -159,14 +163,16 @@ exports[`Matches shallow shapshot 1`] = `
159163
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x"
160164
>
161165
<ThemedAvatar
162-
composeTheme="deeply"
166+
composeAdhocTheme="deeply"
167+
composeContextTheme="softly"
163168
customStyles={null}
164169
mapThemrProps={[Function]}
165170
theme={
166171
Object {
167172
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
168173
}
169174
}
175+
themePriority="adhoc-context-default"
170176
url="some.fake.string"
171177
/>
172178
</span>
@@ -216,14 +222,16 @@ exports[`Matches shallow shapshot 1`] = `
216222
className="src-shared-components-Leaderboard-LeaderboardTable-___styles__leaderboard-avatar___3Ly7x"
217223
>
218224
<ThemedAvatar
219-
composeTheme="deeply"
225+
composeAdhocTheme="deeply"
226+
composeContextTheme="softly"
220227
customStyles={null}
221228
mapThemrProps={[Function]}
222229
theme={
223230
Object {
224231
"avatar": "src-shared-components-Leaderboard-___avatarStyles__default___1bHTz",
225232
}
226233
}
234+
themePriority="adhoc-context-default"
227235
url="https://www.topcoder-dev.com/assets/a.jpg"
228236
/>
229237
</span>

__tests__/shared/components/Leaderboard/__snapshots__/Podium.jsx.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ exports[`Matches shallow shapshot 2`] = `
5959
className="src-shared-components-Leaderboard-Podium-___styles__Podium___2rb4T"
6060
>
6161
<ThemedLoadingIndicator
62-
composeTheme="deeply"
62+
composeAdhocTheme="deeply"
63+
composeContextTheme="softly"
6364
mapThemrProps={[Function]}
65+
themePriority="adhoc-context-default"
6466
/>
6567
</div>
6668
`;

__tests__/shared/components/Leaderboard/__snapshots__/PodiumSpot.jsx.snap

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ exports[`Matches shallow shapshot 1`] = `
88
className="src-shared-components-Leaderboard-PodiumSpot-___styles__leaderboard-avatar___2Aea7"
99
>
1010
<ThemedAvatar
11-
composeTheme="deeply"
11+
composeAdhocTheme="deeply"
12+
composeContextTheme="softly"
1213
customStyles={null}
1314
mapThemrProps={[Function]}
1415
theme={
1516
Object {
1617
"avatar": "src-shared-components-Leaderboard-___avatarStyles__gold___1KUGN",
1718
}
1819
}
20+
themePriority="adhoc-context-default"
1921
url="some.fake.string"
2022
/>
2123
</span>
@@ -55,14 +57,16 @@ exports[`Matches shallow shapshot 2`] = `
5557
className="src-shared-components-Leaderboard-PodiumSpot-___styles__leaderboard-avatar___2Aea7"
5658
>
5759
<ThemedAvatar
58-
composeTheme="deeply"
60+
composeAdhocTheme="deeply"
61+
composeContextTheme="softly"
5962
customStyles={null}
6063
mapThemrProps={[Function]}
6164
theme={
6265
Object {
6366
"avatar": "src-shared-components-Leaderboard-___avatarStyles__gold___1KUGN",
6467
}
6568
}
69+
themePriority="adhoc-context-default"
6670
url="https://www.topcoder-dev.com/assets/a.jpg"
6771
/>
6872
</span>

__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,16 @@ exports[`Render with specified profile 1`] = `
469469
className="src-shared-components-TopcoderHeader-___style__avatar___3BqbY"
470470
>
471471
<ThemedAvatar
472-
composeTheme="deeply"
472+
composeAdhocTheme="deeply"
473+
composeContextTheme="softly"
473474
customStyles={null}
474475
mapThemrProps={[Function]}
475476
theme={
476477
Object {
477478
"avatar": "",
478479
}
479480
}
481+
themePriority="adhoc-context-default"
480482
url={null}
481483
/>
482484
</div>

__tests__/shared/components/TopcoderHeader/mobile/__snapshots__/UserMenu.jsx.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ exports[`Snapshot match 1`] = `
99
href="/members/username"
1010
>
1111
<ThemedAvatar
12-
composeTheme="deeply"
12+
composeAdhocTheme="deeply"
13+
composeContextTheme="softly"
1314
customStyles={null}
1415
mapThemrProps={[Function]}
1516
theme={
1617
Object {
1718
"avatar": "",
1819
}
1920
}
21+
themePriority="adhoc-context-default"
2022
url={null}
2123
/>
2224
<span

__tests__/shared/components/__snapshots__/Avatar.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports[`Matches shallow shapshot 3`] = `
2929
customStyles={null}
3030
theme={
3131
Object {
32-
"avatar": "src-shared-components-Avatar-___style__avatar___3QhkH test-style",
32+
"avatar": "test-style src-shared-components-Avatar-___style__avatar___3QhkH",
3333
}
3434
}
3535
url={null}
@@ -41,7 +41,7 @@ exports[`Matches shallow shapshot 4`] = `
4141
customStyles={null}
4242
theme={
4343
Object {
44-
"avatar": "src-shared-components-Avatar-___style__avatar___3QhkH test-style",
44+
"avatar": "test-style src-shared-components-Avatar-___style__avatar___3QhkH",
4545
}
4646
}
4747
url="some-fake-string"

__tests__/shared/components/challenge-listing/Filters/__snapshots__/ChallengeFilters.jsx.snap

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,36 +105,42 @@ exports[`Matches shallow shapshot shapshot 2`] = `
105105
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
106106
>
107107
<ThemedSwitchWithLabel
108-
composeTheme="deeply"
108+
composeAdhocTheme="deeply"
109+
composeContextTheme="softly"
109110
enabled={false}
110111
labelAfter=""
111112
labelBefore="Design"
112113
mapThemrProps={[Function]}
113114
onSwitch={[Function]}
115+
themePriority="adhoc-context-default"
114116
/>
115117
</span>
116118
<span
117119
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
118120
>
119121
<ThemedSwitchWithLabel
120-
composeTheme="deeply"
122+
composeAdhocTheme="deeply"
123+
composeContextTheme="softly"
121124
enabled={false}
122125
labelAfter=""
123126
labelBefore="Development"
124127
mapThemrProps={[Function]}
125128
onSwitch={[Function]}
129+
themePriority="adhoc-context-default"
126130
/>
127131
</span>
128132
<span
129133
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
130134
>
131135
<ThemedSwitchWithLabel
132-
composeTheme="deeply"
136+
composeAdhocTheme="deeply"
137+
composeContextTheme="softly"
133138
enabled={false}
134139
labelAfter=""
135140
labelBefore="Data Science"
136141
mapThemrProps={[Function]}
137142
onSwitch={[Function]}
143+
themePriority="adhoc-context-default"
138144
/>
139145
</span>
140146
</span>

__tests__/shared/components/examples/Themr/__snapshots__/index.jsx.snap

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ exports[`Matches shallow shapshot 1`] = `
1010
Default theme
1111
</h3>
1212
<ThemedThemableComponent
13-
composeTheme="deeply"
13+
composeAdhocTheme="deeply"
14+
composeContextTheme="softly"
1415
mapThemrProps={[Function]}
16+
themePriority="adhoc-context-default"
1517
/>
1618
<h3>
1719
Default theme + Parent-provided styling
1820
</h3>
1921
<ThemedThemableComponent
20-
composeTheme="deeply"
22+
composeAdhocTheme="deeply"
23+
composeContextTheme="softly"
2124
mapThemrProps={[Function]}
2225
theme={
2326
Object {
2427
"box": "src-shared-components-examples-Themr-___style__box___2VpH5",
2528
"text": "src-shared-components-examples-Themr-___style__text___3B1uO",
2629
}
2730
}
31+
themePriority="adhoc-context-default"
2832
/>
2933
<h3>
3034
Default theme + Context styling
@@ -40,8 +44,10 @@ exports[`Matches shallow shapshot 1`] = `
4044
}
4145
>
4246
<ThemedThemableComponent
43-
composeTheme="deeply"
47+
composeAdhocTheme="deeply"
48+
composeContextTheme="softly"
4449
mapThemrProps={[Function]}
50+
themePriority="adhoc-context-default"
4551
/>
4652
</ThemeProvider>
4753
<h3>
@@ -58,14 +64,16 @@ exports[`Matches shallow shapshot 1`] = `
5864
}
5965
>
6066
<ThemedThemableComponent
61-
composeTheme="deeply"
67+
composeAdhocTheme="deeply"
68+
composeContextTheme="softly"
6269
mapThemrProps={[Function]}
6370
theme={
6471
Object {
6572
"box": "src-shared-components-examples-Themr-___style__box___2VpH5",
6673
"text": "src-shared-components-examples-Themr-___style__text___3B1uO",
6774
}
6875
}
76+
themePriority="adhoc-context-default"
6977
/>
7078
</ThemeProvider>
7179
<h3>
@@ -78,8 +86,10 @@ exports[`Matches shallow shapshot 1`] = `
7886
theme={Object {}}
7987
>
8088
<ThemedThemableComponent
81-
composeTheme="deeply"
89+
composeAdhocTheme="deeply"
90+
composeContextTheme="softly"
8291
mapThemrProps={[Function]}
92+
themePriority="adhoc-context-default"
8393
/>
8494
</ThemeProvider>
8595
</div>

__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ exports[`Snapshot match 1`] = `
1515
}
1616
>
1717
<ThemedAccordionItem
18-
composeTheme="deeply"
18+
composeAdhocTheme="deeply"
19+
composeContextTheme="softly"
1920
isOpen={false}
2021
mapThemrProps={[Function]}
2122
onTitleClick={[Function]}
2223
theme={Object {}}
24+
themePriority="adhoc-context-default"
2325
title="Test title"
2426
>
2527
<div>

__tests__/shared/components/tc-communities/__snapshots__/Banner.jsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ exports[`Snapshot match 2`] = `
3131
text="You’re eager to get started, and we have a bunch of iOS/Swift challenges!"
3232
theme={
3333
Object {
34-
"container": "src-shared-components-tc-communities-Banner-___style__container___2NxGp container",
35-
"content": "src-shared-components-tc-communities-Banner-___style__content___21lXO content",
36-
"contentBg": "src-shared-components-tc-communities-Banner-___style__contentBg___145Ln contentBg",
37-
"contentInner": "src-shared-components-tc-communities-Banner-___style__contentInner___3w8VH contentInner",
34+
"container": "container src-shared-components-tc-communities-Banner-___style__container___2NxGp",
35+
"content": "content src-shared-components-tc-communities-Banner-___style__content___21lXO",
36+
"contentBg": "contentBg src-shared-components-tc-communities-Banner-___style__contentBg___145Ln",
37+
"contentInner": "contentInner src-shared-components-tc-communities-Banner-___style__contentInner___3w8VH",
3838
"link": "link",
3939
"linkWrap": "linkWrap",
40-
"text": "src-shared-components-tc-communities-Banner-___style__text___-lkXi text",
41-
"title": "src-shared-components-tc-communities-Banner-___style__title___GMY8V title",
40+
"text": "text src-shared-components-tc-communities-Banner-___style__text___-lkXi",
41+
"title": "title src-shared-components-tc-communities-Banner-___style__title___GMY8V",
4242
}
4343
}
4444
title="iOS"

0 commit comments

Comments
 (0)