-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace floating insert menu (#5746)
Blocked waiting on #5794 **Problem** We were still using the old insert menu in the canvas toolbar **Fix** Use the new component picker in the canvas toolbar. The main changes here are in `editor/src/components/editor/canvas-toolbar.tsx` (where the old dropdown list was replaced with the new component picker) and `editor/src/components/navigator/navigator-item/component-picker.tsx` (as I've had to update the props so that they styling is different when the picker is rendered inside the toolbar). This PR has ripped out a lot of now dead code around the old dropdown, but hasn't removed the (already dead but still used in some tests) insert menu pane. Note that this PR has removed the `g` shortcut (which was an alias for the `w` to 'wrap in' shortcut but opened the old menu rather than the new one - `cmd`+`g` still exists). I can put that back if we still want it. I just deleted it whilst I was flushing out dead code. Also note that with the old insert menu we had the ability to wrap in certain elements that cannot be inserted normally (e.g. the `Group` element). That functionality no longer exists. <img width="297" alt="image" src="https://github.com/concrete-utopia/utopia/assets/1044774/4268a4b5-39a8-4042-9eea-c4d3c1c5a96f"> <img width="287" alt="image" src="https://github.com/concrete-utopia/utopia/assets/1044774/477fda9c-53ac-4fb5-8c48-268bc4df3857"> **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 #5443 --------- Co-authored-by: Federico Ruggi <[email protected]>
- Loading branch information
Showing
28 changed files
with
221 additions
and
1,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
editor/src/components/canvas/ui/floating-insert-menu-helpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.