feat: add action to wrap selected items in a frame (#9005)

* feat: add action to wrap selected items in a frame

* fix type

* select frame on wrap & refactor

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Ryan Di 2025-01-14 02:03:56 +11:00 committed by GitHub
parent c92f3bebf5
commit 00b5b0a0ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 111 additions and 4 deletions

View file

@ -97,6 +97,7 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
"category": "element",
},
},
"separator",
{
"label": "labels.selectAllElementsInFrame",
"name": "selectAllElementsInFrame",
@ -115,6 +116,15 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
"category": "history",
},
},
{
"label": "labels.wrapSelectionInFrame",
"name": "wrapSelectionInFrame",
"perform": [Function],
"predicate": [Function],
"trackEvent": {
"category": "element",
},
},
"separator",
{
"PanelComponent": [Function],
@ -4731,6 +4741,7 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"category": "element",
},
},
"separator",
{
"label": "labels.selectAllElementsInFrame",
"name": "selectAllElementsInFrame",
@ -4749,6 +4760,15 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"category": "history",
},
},
{
"label": "labels.wrapSelectionInFrame",
"name": "wrapSelectionInFrame",
"perform": [Function],
"predicate": [Function],
"trackEvent": {
"category": "element",
},
},
"separator",
{
"PanelComponent": [Function],
@ -5942,6 +5962,7 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"category": "element",
},
},
"separator",
{
"label": "labels.selectAllElementsInFrame",
"name": "selectAllElementsInFrame",
@ -5960,6 +5981,15 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"category": "history",
},
},
{
"label": "labels.wrapSelectionInFrame",
"name": "wrapSelectionInFrame",
"perform": [Function],
"predicate": [Function],
"trackEvent": {
"category": "element",
},
},
"separator",
{
"PanelComponent": [Function],
@ -7876,6 +7906,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"category": "element",
},
},
"separator",
{
"label": "labels.selectAllElementsInFrame",
"name": "selectAllElementsInFrame",
@ -7894,6 +7925,15 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"category": "history",
},
},
{
"label": "labels.wrapSelectionInFrame",
"name": "wrapSelectionInFrame",
"perform": [Function],
"predicate": [Function],
"trackEvent": {
"category": "element",
},
},
"separator",
{
"PanelComponent": [Function],
@ -8854,6 +8894,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"category": "element",
},
},
"separator",
{
"label": "labels.selectAllElementsInFrame",
"name": "selectAllElementsInFrame",
@ -8872,6 +8913,15 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"category": "history",
},
},
{
"label": "labels.wrapSelectionInFrame",
"name": "wrapSelectionInFrame",
"perform": [Function],
"predicate": [Function],
"trackEvent": {
"category": "element",
},
},
"separator",
{
"PanelComponent": [Function],

View file

@ -120,6 +120,7 @@ describe("contextMenu element", () => {
"cut",
"copy",
"paste",
"wrapSelectionInFrame",
"copyStyles",
"pasteStyles",
"deleteSelectedElements",
@ -213,6 +214,7 @@ describe("contextMenu element", () => {
"cut",
"copy",
"paste",
"wrapSelectionInFrame",
"copyStyles",
"pasteStyles",
"deleteSelectedElements",
@ -269,6 +271,7 @@ describe("contextMenu element", () => {
"cut",
"copy",
"paste",
"wrapSelectionInFrame",
"copyStyles",
"pasteStyles",
"deleteSelectedElements",