Only show "Edit sketch" button when code pane is focused with sketch selected (#5691)
* Only show "Edit sketch" button when code pane is focused with sketch selected Closes #4273. WIP until tests are updated, since this will impact many that look for the "Edit sketch" button. * Start removing "edit sketch" point-and-click from E2E * Update more E2E tests * Update more tests that assumed Edit Sketch button * A snapshot a day keeps the bugs away! 📷🐛 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { useRef, useMemo, memo, useCallback, useState } from 'react'
|
||||
import { isCursorInSketchCommandRange } from 'lang/util'
|
||||
import { engineCommandManager, kclManager } from 'lib/singletons'
|
||||
import { editorManager, engineCommandManager, kclManager } from 'lib/singletons'
|
||||
import { useModelingContext } from 'hooks/useModelingContext'
|
||||
import { useNetworkContext } from 'hooks/useNetworkContext'
|
||||
import { NetworkHealthState } from 'hooks/useNetworkStatus'
|
||||
@ -77,8 +77,15 @@ export function Toolbar({
|
||||
modelingState: state,
|
||||
modelingSend: send,
|
||||
sketchPathId,
|
||||
editorHasFocus: editorManager.editorView?.hasFocus,
|
||||
}),
|
||||
[state, send, commandBarActor.send, sketchPathId]
|
||||
[
|
||||
state,
|
||||
send,
|
||||
commandBarActor.send,
|
||||
sketchPathId,
|
||||
editorManager.editorView?.hasFocus,
|
||||
]
|
||||
)
|
||||
|
||||
const tooltipContentClassName = !showRichContent
|
||||
|
Reference in New Issue
Block a user