Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W to Wrap should use the new insert menu #5442

Closed
Rheeseyb opened this issue Apr 30, 2024 · 1 comment · Fixed by #5691
Closed

W to Wrap should use the new insert menu #5442

Rheeseyb opened this issue Apr 30, 2024 · 1 comment · Fixed by #5691
Assignees
Milestone

Comments

@Rheeseyb
Copy link
Contributor

Rheeseyb commented Apr 30, 2024

Much like S to Swap and A to Add Element, except this will need to insert the new element and add the current selection as children. Depending on the chosen implementation, this may be blocked by #5441 , so please coordinate with the owner of that ticket

Moved to #5696 :

Be aware that we'll need to case the logic on the type of wrapper, meaning we'll need to ensure we handle wrapping in:

  • maps
  • conditionals
@Rheeseyb
Copy link
Contributor Author

Rheeseyb commented May 7, 2024

I pushed some preliminary work to a branch with this commit dd666b6 but it brings up questions around how multiselect should work with the insert menu for the various insertion types.

@liady liady self-assigned this May 8, 2024
@maltenuhn maltenuhn added this to the 1. Creation milestone May 13, 2024
@liady liady linked a pull request May 16, 2024 that will close this issue
9 tasks
liady added a commit that referenced this issue May 21, 2024
**Problem:**
The "Wrap" feature currently doesn't use the new component picker

**Fix:**
This PR makes the "Wrap..." option use the new component picker - currently only for a single element. (subsequent PR for supporting multiple selection).

This PR includes:
- [x] Open the new picker when wrapping an element (from UI and shortcut)
- [x] Call the correct action for wrapping the element
- [x] Show only HTML elements that can accept children
- [x] Have the picker API _support_ multiple selection

This PR _doesn't_ include:
- [ ] Filter out custom elements that don't support children
- [ ] Wrap in non-elements (conditionals, etc)
- [ ] Wrap multiple elements

<video src="https://github.com/concrete-utopia/utopia/assets/7003853/824f1c26-6bb5-4b0c-9213-5378b256214e"></video>

This PR also skips the element tests (5ac6d25) that will be re-enabled in the subsequent PR

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

 Related to #5442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants