@@ -219,30 +219,24 @@ function ConnectedCloudEnvironmentRow(props: {
219219 setLastDescriptor ( props . descriptor ) ;
220220 }
221221 return (
222- < Pressable
223- accessibilityHint = "Long press to remove from this device"
224- accessibilityRole = { props . onOpen ? "button" : undefined }
225- accessibilityLabel = { props . onOpen ? `Manage ${ props . environment . environmentLabel } ` : undefined }
226- onPress = { props . onOpen }
227- onLongPress = { props . onRemove }
228- >
229- < CloudEnvironmentRowShell
230- opensDetails = { props . onOpen !== undefined }
231- connectionError = { enabled || unsupported ? props . environment . connectionError : null }
232- connectionErrorTraceId = { enabled ? props . environment . connectionErrorTraceId : null }
233- connectionState = { enabled || unsupported ? props . environment . connectionState : "available" }
234- errorExpanded = { props . errorExpanded }
235- label = { props . environment . environmentLabel }
236- machine = { resolveEnvironmentMachineKind (
237- serverConfig ?? ( lastDescriptor === undefined ? null : { environment : lastDescriptor } ) ,
238- ) }
239- onValueChange = { props . onSetEnabled }
240- onToggleError = { props . onToggleError }
241- disabled = { unsupported }
242- { ...( enabled || unsupported ? { } : { statusText : "Off" } ) }
243- value = { enabled }
244- />
245- </ Pressable >
222+ < CloudEnvironmentRowShell
223+ opensDetails = { props . onOpen !== undefined }
224+ onOpen = { props . onOpen }
225+ onRemove = { props . onRemove }
226+ connectionError = { enabled || unsupported ? props . environment . connectionError : null }
227+ connectionErrorTraceId = { enabled ? props . environment . connectionErrorTraceId : null }
228+ connectionState = { enabled || unsupported ? props . environment . connectionState : "available" }
229+ errorExpanded = { props . errorExpanded }
230+ label = { props . environment . environmentLabel }
231+ machine = { resolveEnvironmentMachineKind (
232+ serverConfig ?? ( lastDescriptor === undefined ? null : { environment : lastDescriptor } ) ,
233+ ) }
234+ onValueChange = { props . onSetEnabled }
235+ onToggleError = { props . onToggleError }
236+ disabled = { unsupported }
237+ { ...( enabled || unsupported ? { } : { statusText : "Off" } ) }
238+ value = { enabled }
239+ />
246240 ) ;
247241}
248242
@@ -289,6 +283,8 @@ function CloudEnvironmentRow(props: {
289283function CloudEnvironmentRowShell ( props : {
290284 readonly showChevron ?: boolean ;
291285 readonly opensDetails ?: boolean ;
286+ readonly onOpen ?: ( ( ) => void ) | undefined ;
287+ readonly onRemove ?: ( ( ) => void ) | undefined ;
292288 readonly connectionError : string | null ;
293289 readonly connectionErrorTraceId : string | null ;
294290 readonly connectionState : EnvironmentConnectionPhase ;
@@ -344,7 +340,14 @@ function CloudEnvironmentRowShell(props: {
344340 ) ;
345341 return (
346342 < View collapsable = { false } className = "flex-row items-center gap-3 bg-grouped-card px-4 py-3.5" >
347- < View className = "min-w-0 flex-1 gap-0.5" >
343+ < Pressable
344+ className = "min-w-0 flex-1 gap-0.5"
345+ accessibilityHint = { props . onRemove ? "Long press to remove from this device" : undefined }
346+ accessibilityRole = { props . onOpen ? "button" : undefined }
347+ accessibilityLabel = { props . onOpen ? `Manage ${ props . label } ` : undefined }
348+ onPress = { props . onOpen }
349+ onLongPress = { props . onRemove }
350+ >
348351 < View className = "min-w-0 flex-row items-center gap-2" >
349352 < ConnectionStatusDot state = { props . connectionState } pulse = { shouldPulse } size = { 7 } />
350353 < EnvironmentMachineSymbol
@@ -404,17 +407,25 @@ function CloudEnvironmentRowShell(props: {
404407 />
405408 ) : null }
406409 </ StatusContainer >
407- </ View >
410+ </ Pressable >
408411 < ThemedSwitch
412+ accessibilityLabel = { `Enable ${ props . label } ` }
409413 style = { { alignSelf : "center" } }
410414 disabled = { props . disabled }
411415 onValueChange = { props . onValueChange }
412416 value = { props . value }
413417 />
414418 { props . opensDetails || props . showChevron ? (
415- < View style = { { opacity : props . opensDetails ? 1 : 0.4 } } >
419+ < Pressable
420+ accessibilityRole = { props . onOpen ? "button" : undefined }
421+ accessibilityLabel = { props . onOpen ? `Manage ${ props . label } ` : undefined }
422+ onPress = { props . onOpen }
423+ onLongPress = { props . onRemove }
424+ hitSlop = { 8 }
425+ style = { { opacity : props . opensDetails ? 1 : 0.4 } }
426+ >
416427 < SymbolView name = "chevron.right" size = { 12 } tintColorClassName = "accent-icon-subtle" />
417- </ View >
428+ </ Pressable >
418429 ) : null }
419430 </ View >
420431 ) ;
0 commit comments