File tree Expand file tree Collapse file tree 8 files changed +60
-3
lines changed
__tests__/shared/components/challenge-listing/Filters/__snapshots__
Tooltips/TrackAbbreviationTooltip Expand file tree Collapse file tree 8 files changed +60
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,11 @@ exports[`Matches shallow shapshot shapshot 1`] = `
85
85
devEnabled = { true }
86
86
onClose = { [Function ]}
87
87
opened = { true }
88
+ qaEnabled = { true }
88
89
switchDataScience = { [Function ]}
89
90
switchDesign = { [Function ]}
90
91
switchDev = { [Function ]}
92
+ switchQA = { [Function ]}
91
93
/>
92
94
</div >
93
95
` ;
@@ -159,6 +161,23 @@ exports[`Matches shallow shapshot shapshot 2`] = `
159
161
themePriority = " adhoc-context-default"
160
162
/>
161
163
</span >
164
+ <span
165
+ aria-checked = { false }
166
+ aria-label = " QA toggle button pressed Off"
167
+ className = " src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-switch-with-label___21Ups"
168
+ role = " switch"
169
+ >
170
+ <ThemedSwitchWithLabel
171
+ composeAdhocTheme = " deeply"
172
+ composeContextTheme = " softly"
173
+ enabled = { false }
174
+ labelAfter = " "
175
+ labelBefore = " QA"
176
+ mapThemrProps = { [Function ]}
177
+ onSwitch = { [Function ]}
178
+ themePriority = " adhoc-context-default"
179
+ />
180
+ </span >
162
181
</span >
163
182
<span
164
183
className = " src-shared-components-challenge-listing-Filters-___ChallengeFilters__pulled-right___bfsMZ"
@@ -254,9 +273,11 @@ exports[`Matches shallow shapshot shapshot 2`] = `
254
273
devEnabled = { false }
255
274
onClose = { [Function ]}
256
275
opened = { true }
276
+ qaEnabled = { false }
257
277
switchDataScience = { [Function ]}
258
278
switchDesign = { [Function ]}
259
279
switchDev = { [Function ]}
280
+ switchQA = { [Function ]}
260
281
/>
261
282
</div >
262
283
` ;
Original file line number Diff line number Diff line change @@ -34,11 +34,14 @@ $track-radius-4: $corner-radius * 2;
34
34
background : $tc-light-blue-110 ;
35
35
}
36
36
37
- & .develop ,
38
- & .qa {
37
+ & .develop {
39
38
background : $tc-green-110 ;
40
39
}
41
40
41
+ & .qa {
42
+ background : $tc-purple-110 ;
43
+ }
44
+
42
45
& .data_science ,
43
46
& .data-science ,
44
47
& .data {
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ function ChallengeCard({
48
48
challenge . isDataScience = false ;
49
49
if ( ( challenge . tags && challenge . tags . includes ( 'Data Science' ) ) || isDevelopMM ( challenge ) ) {
50
50
challenge . isDataScience = true ;
51
+ track = 'DATA_SCIENCE' ;
52
+ }
53
+ if ( challenge . tags && challenge . tags . includes ( 'QA' ) ) {
54
+ track = 'QA' ;
51
55
}
52
56
challenge . prize = challenge . prizes || [ ] ;
53
57
Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ export default function ChallengeFilters({
100
100
onSwitch = { on => switchTrack ( TRACKS . DATA_SCIENCE , on ) }
101
101
/>
102
102
</ span >
103
+ < span styleName = "filter-switch-with-label" aria-label = { `QA toggle button pressed ${ isTrackOn ( TRACKS . QA ) ? 'On' : 'Off' } ` } role = "switch" aria-checked = { isTrackOn ( TRACKS . QA ) } >
104
+ < SwitchWithLabel
105
+ enabled = { isTrackOn ( TRACKS . QA ) }
106
+ labelBefore = "QA"
107
+ onSwitch = { on => switchTrack ( TRACKS . QA , on ) }
108
+ />
109
+ </ span >
103
110
</ span >
104
111
) : ''
105
112
}
@@ -178,6 +185,8 @@ export default function ChallengeFilters({
178
185
switchDev = { on => switchTrack ( TRACKS . DEVELOP , on ) }
179
186
dataScienceEnabled = { isTrackOn ( TRACKS . DATA_SCIENCE ) }
180
187
switchDataScience = { on => switchTrack ( TRACKS . DATA_SCIENCE , on ) }
188
+ qaEnabled = { isTrackOn ( TRACKS . QA ) }
189
+ switchQA = { on => switchTrack ( TRACKS . QA , on ) }
181
190
/>
182
191
</ div >
183
192
) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ $challenge-radius-4: $corner-radius * 2;
10
10
11
11
/* -100px is necessary to compensate for the temporarly added `Alpha preview`
12
12
* banner. Should be modified / removed together with banner. */
13
- $search-bar-width : ' 100% - 475px ' ;
13
+ $search-bar-width : ' 100% - 536px ' ;
14
14
$search-input-width : ' 100% - 56px' ;
15
15
16
16
.ChallengeSearchBar {
Original file line number Diff line number Diff line change 16
16
* switchDev={enable => this.setTracks(DEVELOP_TRACK, enable)}
17
17
* dataScienceEnabled={this.state.filter.tracks.has(DATA_SCIENCE_TRACK)}
18
18
* switchDataScience={enable => this.setTracks(DATA_SCIENCE_TRACK, enable)}
19
+ * qaEnabled={this.state.filter.tracks.has(QA_TRACK)}
20
+ * switchQA={enable => this.setTracks(QA_TRACK, enable)}
19
21
* />
20
22
*/
21
23
import React from 'react' ;
@@ -28,11 +30,13 @@ function EditTrackPanel({
28
30
dataScienceEnabled,
29
31
designEnabled,
30
32
devEnabled,
33
+ qaEnabled,
31
34
onClose,
32
35
opened,
33
36
switchDataScience,
34
37
switchDesign,
35
38
switchDev,
39
+ switchQA,
36
40
} ) {
37
41
return (
38
42
< div styleName = { `EditTrackPanel ${ opened === true ? 'opened' : 'closed' } ` } >
@@ -75,6 +79,15 @@ function EditTrackPanel({
75
79
onSwitch = { switchDataScience }
76
80
/>
77
81
</ div >
82
+ < div styleName = "row" >
83
+ < span >
84
+ QA
85
+ </ span >
86
+ < Switch
87
+ enabled = { qaEnabled }
88
+ onSwitch = { switchQA }
89
+ />
90
+ </ div >
78
91
</ div >
79
92
) ;
80
93
}
@@ -92,6 +105,8 @@ EditTrackPanel.propTypes = {
92
105
switchDev : PT . func . isRequired ,
93
106
dataScienceEnabled : PT . bool . isRequired ,
94
107
switchDataScience : PT . func . isRequired ,
108
+ qaEnabled : PT . bool . isRequired ,
109
+ switchQA : PT . func . isRequired ,
95
110
} ;
96
111
97
112
export default EditTrackPanel ;
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ const TRACK_COLOR_CLASS = {
92
92
DESIGN : 'blue' ,
93
93
DEVELOP : 'green' ,
94
94
DATA_SCIENCE : 'orange' ,
95
+ QA : 'purple' ,
95
96
} ;
96
97
97
98
/**
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ $track-radius-4: $corner-radius * 2;
25
25
& .orange {
26
26
border-left : $track-radius-4 solid $tc-orange ;
27
27
}
28
+
29
+ & .purple {
30
+ border-left : $track-radius-4 solid $tc-purple ;
31
+ }
28
32
}
29
33
30
34
.body {
You can’t perform that action at this time.
0 commit comments