File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ import {
1616 InitialMatcher ,
1717 InitialMatcherClass ,
1818 getInitialMatchers ,
19- getRuleTypeFromInitialMatcher
19+ getRuleTypeFromInitialMatcher ,
20+ StableRuleTypes
2021} from '../../model/rules/rules' ;
2122import {
2223 summarizeMatcherClass
@@ -74,8 +75,8 @@ export const InitialMatcherRow = React.forwardRef((p: {
7475} , ref : React . Ref < HTMLSelectElement > ) => {
7576 const availableInitialMatchers = getInitialMatchers ( ) ;
7677
77- const [ httpMatchers , otherMatchers ] = _ . partition ( availableInitialMatchers , m =>
78- getRuleTypeFromInitialMatcher ( getMatcherKey ( m ) ! ) === 'http'
78+ const [ stableMatchers , experimentalMatchers ] = _ . partition ( availableInitialMatchers , m =>
79+ StableRuleTypes . includes ( getRuleTypeFromInitialMatcher ( getMatcherKey ( m ) ! ) )
7980 ) ;
8081
8182 return < MatcherRow >
@@ -98,11 +99,11 @@ export const InitialMatcherRow = React.forwardRef((p: {
9899 </ option >
99100 }
100101
101- < MatcherOptions matchers = { httpMatchers } />
102+ < MatcherOptions matchers = { stableMatchers } />
102103
103- { otherMatchers . length > 0 &&
104+ { experimentalMatchers . length > 0 &&
104105 < optgroup label = 'Experimental' >
105- < MatcherOptions matchers = { otherMatchers } />
106+ < MatcherOptions matchers = { experimentalMatchers } />
106107 </ optgroup >
107108 }
108109 </ Select >
Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ const InitialMatcherClasses = [
209209 ...RTCInitialMatcherClasses
210210] ;
211211
212+ export const StableRuleTypes = [
213+ 'http' ,
214+ 'websocket'
215+ ] ;
216+
212217export const getInitialMatchers = ( ) => InitialMatcherClasses . filter ( ( matcherCls ) => {
213218 const matcherKey = MatcherClassKeyLookup . get ( matcherCls ) ! ;
214219 return serverSupports ( PartVersionRequirements [ matcherKey ] ) ;
You can’t perform that action at this time.
0 commit comments