5
5
*/
6
6
7
7
import { IDEOption , IDEOptions } from "@gitpod/gitpod-protocol/lib/ide-protocol" ;
8
- import { useCallback , useContext , useEffect , useState } from "react" ;
8
+ import { useCallback , useEffect , useState } from "react" ;
9
9
import { getGitpodService } from "../service/service" ;
10
10
import { DropDown2 , DropDown2Element } from "./DropDown2" ;
11
11
import Editor from "../icons/Editor.svg" ;
12
- import { FeatureFlagContext } from "../contexts/FeatureFlagContext" ;
13
12
14
13
interface SelectIDEComponentProps {
15
14
selectedIdeOption ?: string ;
@@ -18,15 +17,12 @@ interface SelectIDEComponentProps {
18
17
setError ?: ( error ?: string ) => void ;
19
18
}
20
19
21
- function filteredIdeOptions ( ideOptions : IDEOptions , experimentalTurnedOn : boolean ) {
22
- return IDEOptions . asArray ( ideOptions )
23
- . filter ( ( x ) => ! x . hidden )
24
- . filter ( ( x ) => ( x . experimental ? experimentalTurnedOn : true ) ) ;
20
+ function filteredIdeOptions ( ideOptions : IDEOptions ) {
21
+ return IDEOptions . asArray ( ideOptions ) . filter ( ( x ) => ! x . hidden ) ;
25
22
}
26
23
27
24
export default function SelectIDEComponent ( props : SelectIDEComponentProps ) {
28
25
const [ ideOptions , setIdeOptions ] = useState < IDEOptions > ( ) ;
29
- const { experimentalIdes } = useContext ( FeatureFlagContext ) ;
30
26
31
27
useEffect ( ( ) => {
32
28
getGitpodService ( ) . server . getIDEOptions ( ) . then ( setIdeOptions ) ;
@@ -36,7 +32,7 @@ export default function SelectIDEComponent(props: SelectIDEComponentProps) {
36
32
if ( ! ideOptions ) {
37
33
return [ ] ;
38
34
}
39
- const options = filteredIdeOptions ( ideOptions , experimentalIdes ) ;
35
+ const options = filteredIdeOptions ( ideOptions ) ;
40
36
const result : DropDown2Element [ ] = [ ] ;
41
37
for ( const ide of options . filter ( ( ide ) =>
42
38
`${ ide . label } ${ ide . title } ${ ide . notes } ${ ide . id } ` . toLowerCase ( ) . includes ( search . toLowerCase ( ) ) ,
@@ -57,7 +53,7 @@ export default function SelectIDEComponent(props: SelectIDEComponentProps) {
57
53
}
58
54
return result ;
59
55
} ,
60
- [ experimentalIdes , ideOptions , props . useLatest ] ,
56
+ [ ideOptions , props . useLatest ] ,
61
57
) ;
62
58
const internalOnSelectionChange = ( id : string ) => {
63
59
const { ide, useLatest } = parseId ( id ) ;
0 commit comments