{when(codeEditorEnabled,
)}
diff --git a/editor/src/components/canvas/floating-panels-state.spec.tsx b/editor/src/components/canvas/floating-panels-state.spec.tsx
deleted file mode 100644
index e98def9f96b3..000000000000
--- a/editor/src/components/canvas/floating-panels-state.spec.tsx
+++ /dev/null
@@ -1,195 +0,0 @@
-import { windowPoint } from '../../core/shared/math-utils'
-import {
- DefaultPanels,
- dragPaneToNewPosition,
- updatePanelPositionsBasedOnLocationAndSize,
- updatePanelsToDefaultSizes,
-} from './floating-panels-state'
-
-describe('dragPaneToNewPosition', () => {
- const canvasSize = { width: 1000, height: 1000 }
- it('drag navigator to the left of the code editor, then drag the code editor to the left of the navigator', () => {
- const firstDragResult = dragPaneToNewPosition(
- updatePanelPositionsBasedOnLocationAndSize(
- updatePanelsToDefaultSizes(DefaultPanels, canvasSize),
- canvasSize,
- ),
- canvasSize,
- 'navigator',
- 'leftMenu1',
- windowPoint({
- x: 20,
- y: 500,
- }),
- )
- const secondDragResult = dragPaneToNewPosition(
- firstDragResult,
- canvasSize,
- 'code-editor',
- 'leftMenu2',
- windowPoint({
- x: 20,
- y: 500,
- }),
- )
- expect(secondDragResult).toMatchInlineSnapshot(`
- Object {
- "panelContent": Object {
- "leftMenu1": Array [
- Object {
- "frame": Object {
- "height": 1000,
- "width": 500,
- "x": 10,
- "y": 0,
- },
- "name": "code-editor",
- "type": "pane",
- },
- ],
- "leftMenu2": Array [
- Object {
- "frame": Object {
- "height": 980,
- "width": 260,
- "x": 520,
- "y": 0,
- },
- "name": "navigator",
- "type": "menu",
- },
- ],
- "rightMenu1": Array [
- Object {
- "frame": Object {
- "height": 980,
- "width": 255,
- "x": 735,
- "y": 0,
- },
- "name": "inspector",
- "type": "menu",
- },
- ],
- "rightMenu2": Array [],
- },
- }
- `)
- })
- it('drag navigator to the left of the code editor', () => {
- const result = dragPaneToNewPosition(
- updatePanelPositionsBasedOnLocationAndSize(
- updatePanelsToDefaultSizes(DefaultPanels, canvasSize),
- canvasSize,
- ),
- canvasSize,
- 'navigator',
- 'leftMenu1',
- windowPoint({
- x: 20,
- y: 500,
- }),
- )
- expect(result).toMatchInlineSnapshot(`
- Object {
- "panelContent": Object {
- "leftMenu1": Array [
- Object {
- "frame": Object {
- "height": 980,
- "width": 260,
- "x": 10,
- "y": 0,
- },
- "name": "navigator",
- "type": "menu",
- },
- ],
- "leftMenu2": Array [
- Object {
- "frame": Object {
- "height": 600,
- "width": 500,
- "x": 280,
- "y": 0,
- },
- "name": "code-editor",
- "type": "pane",
- },
- ],
- "rightMenu1": Array [
- Object {
- "frame": Object {
- "height": 980,
- "width": 255,
- "x": 735,
- "y": 0,
- },
- "name": "inspector",
- "type": "menu",
- },
- ],
- "rightMenu2": Array [],
- },
- }
- `)
- })
- it('drag navigator to the left of the inspector', () => {
- const result = dragPaneToNewPosition(
- updatePanelPositionsBasedOnLocationAndSize(
- updatePanelsToDefaultSizes(DefaultPanels, canvasSize),
- canvasSize,
- ),
- canvasSize,
- 'navigator',
- 'leftMenu1',
- windowPoint({
- x: 900,
- y: 500,
- }),
- )
-
- expect(result).toMatchInlineSnapshot(`
- Object {
- "panelContent": Object {
- "leftMenu1": Array [
- Object {
- "frame": Object {
- "height": 1000,
- "width": 500,
- "x": 10,
- "y": 0,
- },
- "name": "code-editor",
- "type": "pane",
- },
- ],
- "leftMenu2": Array [],
- "rightMenu1": Array [
- Object {
- "frame": Object {
- "height": 646.6666666666666,
- "width": 255,
- "x": 735,
- "y": 0,
- },
- "name": "inspector",
- "type": "menu",
- },
- Object {
- "frame": Object {
- "height": 313.3333333333333,
- "width": 255,
- "x": 735,
- "y": 656.6666666666666,
- },
- "name": "navigator",
- "type": "menu",
- },
- ],
- "rightMenu2": Array [],
- },
- }
- `)
- })
-})
diff --git a/editor/src/components/canvas/floating-panels-state.tsx b/editor/src/components/canvas/floating-panels-state.tsx
deleted file mode 100644
index 3fa283b14778..000000000000
--- a/editor/src/components/canvas/floating-panels-state.tsx
+++ /dev/null
@@ -1,639 +0,0 @@
-import type { Direction } from 're-resizable/lib/resizer'
-import { eitherToMaybe, foldEither } from '../../core/shared/either'
-import { modify, set, toFirst } from '../../core/shared/optics/optic-utilities'
-import type { Size, WindowPoint, WindowRectangle } from '../../core/shared/math-utils'
-import { rectContainsPoint } from '../../core/shared/math-utils'
-import {
- boundingRectangleArray,
- rectContainsPointInclusive,
- zeroWindowRect,
-} from '../../core/shared/math-utils'
-import { windowRectangle } from '../../core/shared/math-utils'
-import {
- filtered,
- fromArrayIndex,
- fromField,
- fromObjectField,
- objectValues,
- traverseArray,
-} from '../../core/shared/optics/optic-creators'
-import type { Optic } from '../../core/shared/optics/optics'
-import { UtopiaTheme } from '../../uuiui'
-import { LeftPaneDefaultWidth } from '../editor/store/editor-state'
-
-export type Menu = 'inspector' | 'navigator'
-export type Pane = 'code-editor' | 'preview'
-
-export const allMenusAndPanels: Array