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

Wrap an element using the new component picker #5691

Merged
merged 21 commits into from
May 21, 2024
Merged

Conversation

liady
Copy link
Contributor

@liady liady commented May 16, 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:

  • Open the new picker when wrapping an element (from UI and shortcut)
  • Call the correct action for wrapping the element
  • Show only HTML elements that can accept children
  • 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

Monosnap.screencast.2024-05-16.12-50-11.mp4

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

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Preview mode

Related to #5442

Copy link
Contributor

github-actions bot commented May 16, 2024

Try me

Copy link

relativeci bot commented May 16, 2024

#12533 Bundle Size — 62.14MiB (~+0.01%).

5ac6d25(current) vs 6339ece master#12522(baseline)

Warning

Bundle contains 52 duplicate packages – View duplicate packages

Bundle metrics  Change 4 changes Regression 2 regressions
                 Current
#12533
     Baseline
#12522
Regression  Initial JS 45.21MiB(~+0.01%) 45.21MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.46% 21.38%
No change  Chunks 30 30
No change  Assets 33 33
Change  Modules 4288(+0.05%) 4286
Regression  Duplicate Modules 519(+0.39%) 517
No change  Duplicate Code 31.01% 31.01%
No change  Packages 449 449
No change  Duplicate Packages 52 52
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#12533
     Baseline
#12522
Regression  JS 62.13MiB (~+0.01%) 62.12MiB
Improvement  HTML 10.94KiB (-0.34%) 10.97KiB

Bundle analysis reportBranch feat/wrap-with-contextProject dashboard

Copy link
Contributor

github-actions bot commented May 16, 2024

Performance test results:
(Chart1)
(Chart2)

@liady liady changed the title Feat/wrap with context Prep PR - Wrap a single element using the component picker May 16, 2024
@liady liady changed the title Prep PR - Wrap a single element using the component picker Wrap an element using the new component picker May 16, 2024
@liady liady marked this pull request as ready for review May 16, 2024 12:36
@liady liady linked an issue May 16, 2024 that may be closed by this pull request
@liady liady merged commit 4b33c77 into master May 21, 2024
13 checks passed
@liady liady deleted the feat/wrap-with-context branch May 21, 2024 10:42
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 this pull request may close these issues.

W to Wrap should use the new insert menu
4 participants