Skip to content

Commit

Permalink
Chore: remove old insert menu (#5819)
Browse files Browse the repository at this point in the history
The legacy `InsertMenu` component is not used anymore, so this PR
removes it and some related helpers.

**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Preview mode

Fixes #5444
  • Loading branch information
ruggi authored Jun 4, 2024
1 parent a3aab0b commit 5af55cc
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 4,910 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ import { wrapInContainerCommand } from '../../commands/wrap-in-container-command
import type { InsertionPath } from '../../../editor/store/insertion-path'
import { childInsertionPath } from '../../../editor/store/insertion-path'

/**
* NOTE: this strategy was mostly used for legacy insert menu interactions, but it's kept
* intact since it's still used for image insertion from other places.
*/
export const dragToInsertMetaStrategy: MetaCanvasStrategy = (
canvasState: InteractionCanvasState,
interactionSession: InteractionSession | null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ import { wildcardPatch } from '../../commands/wildcard-patch-command'
import type { InsertionPath } from '../../../editor/store/insertion-path'
import { childInsertionPath } from '../../../editor/store/insertion-path'

/**
*
* NOTE: https://github.com/concrete-utopia/utopia/pull/5819 deleted a bunch of
* tests for this strategy that relied on the legacy insert menu.
*
* ! IF YOU WORK ON THIS, PLEASE RESURRECT THE TESTS AND MAKE THEM USE THE 'F' SHORTCUT !
*
*/
export const drawToInsertMetaStrategy: MetaCanvasStrategy = (
canvasState: InteractionCanvasState,
interactionSession: InteractionSession | null,
Expand Down
Loading

0 comments on commit 5af55cc

Please sign in to comment.