@@ -39,21 +39,21 @@ export const ViewControls: FC<ViewControlsProps> = ({
3939 onFilterChange,
4040} ) => {
4141 const context = useContext ( SidePanelsContext ) ;
42- const getGrouppingLabels = useCallback ( ( value : GroupingOptions ) : LabelInfo => {
42+ const getGroupingLabels = useCallback ( ( value : GroupingOptions ) : LabelInfo => {
4343 switch ( value ) {
4444 case 'manual' : return {
4545 label : 'Group Manually' ,
46- selectedLabel : 'Manual Grouping' ,
46+ selectedLabel : isFF ( FF_DEV_3873 ) ? 'Manual' : 'Manual Grouping' ,
4747 icon : < IconList /> ,
4848 } ;
4949 case 'label' : return {
5050 label : 'Group by Label' ,
51- selectedLabel : 'Grouped by Label' ,
51+ selectedLabel : isFF ( FF_DEV_3873 ) ? 'Label' : 'Grouped by Label' ,
5252 icon : < IconTagAlt /> ,
5353 } ;
5454 case 'type' : return {
5555 label : 'Group by Tool' ,
56- selectedLabel : 'Grouped by Tool' ,
56+ selectedLabel : isFF ( FF_DEV_3873 ) ? 'Tool' : 'Grouped by Tool' ,
5757 icon : < IconCursor /> ,
5858 } ;
5959 }
@@ -80,32 +80,50 @@ export const ViewControls: FC<ViewControlsProps> = ({
8080 value = { grouping }
8181 options = { [ 'manual' , 'type' , 'label' ] }
8282 onChange = { value => onGroupingChange ( value ) }
83- readableValueForKey = { getGrouppingLabels }
83+ readableValueForKey = { getGroupingLabels }
8484 />
8585 { grouping === 'manual' && (
86- < Grouping
87- value = { ordering }
88- direction = { orderingDirection }
89- options = { [ 'score' , 'date' ] }
90- onChange = { value => onOrderingChange ( value ) }
91- readableValueForKey = { getOrderingLabels }
92- allowClickSelected
93- />
86+ < Elem name = "sort" >
87+ < Grouping
88+ value = { ordering }
89+ direction = { orderingDirection }
90+ options = { [ 'score' , 'date' ] }
91+ onChange = { value => onOrderingChange ( value ) }
92+ readableValueForKey = { getOrderingLabels }
93+ allowClickSelected
94+ />
95+ { isFF ( FF_DEV_3873 ) && (
96+ < Button
97+ type = "text"
98+ icon = {
99+ orderingDirection === 'asc' ? (
100+ < IconSortUp style = { { color : '#898098' } } />
101+ ) : (
102+ < IconSortDown style = { { color : '#898098' } } />
103+ )
104+ }
105+ style = { { padding : 0 , whiteSpace : 'nowrap' } }
106+ onClick = { ( ) => onOrderingChange ( ordering ) }
107+ />
108+ ) }
109+ </ Elem >
94110 ) }
95111 { isFF ( FF_DEV_3873 ) && (
96112 < Filter
97113 onChange = { onFilterChange }
98114 filterData = { regions ?. regions }
99- availableFilters = { [ {
100- label : 'Annotation results' ,
101- path : 'labelName' ,
102- type : 'String' ,
103- } ,
104- {
105- label : 'Confidence score' ,
106- path : 'score' ,
107- type : 'Number' ,
108- } ] }
115+ availableFilters = { [
116+ {
117+ label : 'Annotation results' ,
118+ path : 'labelName' ,
119+ type : 'String' ,
120+ } ,
121+ {
122+ label : 'Confidence score' ,
123+ path : 'score' ,
124+ type : 'Number' ,
125+ } ,
126+ ] }
109127 />
110128 ) }
111129 </ Block >
0 commit comments