Should exit sketchMode when creating new file in the file tree pane (#3993)

* fix new file sketch mode issue

* initial extron app fixture

* Add tests for exiting sketch mode on file tree actions

* organise files

* before all after all clean up

* tweak after each

* makes typedKeys as unsafe

* update mask for draft line snapshots

* fix mask

* add fix again
This commit is contained in:
Kurt Hutten
2024-10-01 07:56:04 +10:00
committed by GitHub
parent 8cb17a8936
commit 5112b48324
23 changed files with 753 additions and 357 deletions

View File

@ -194,7 +194,7 @@ const FileTreeItem = ({
}
return (
<div className="contents" ref={itemRef}>
<div className="contents" data-testid="file-tree-item" ref={itemRef}>
{fileOrDir.children === null ? (
<li
className={
@ -389,12 +389,14 @@ interface FileTreeProps {
export const FileTreeMenu = () => {
const { send } = useFileContext()
const { send: modelingSend } = useModelingContext()
function createFile() {
send({
type: 'Create file',
data: { name: '', makeDir: false, shouldSetToRename: true },
})
modelingSend({ type: 'Cancel' })
}
function createFolder() {