Skip to content

Conversation

@ryan-di
Copy link
Member

@ryan-di ryan-di commented Jan 20, 2025

This PR lifts the constraint on frame and its children not being allowed to be selected at the same time. By allowing a frame and its children to be box selected together, we get to

  • maintain the previous behaviors
  • allow a user to resize a frame and its children together

@vercel
Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Jan 28, 2025 9:04pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Jan 28, 2025 9:04pm
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Jan 28, 2025 9:04pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 9:04pm

@github-actions
Copy link

github-actions bot commented Jan 20, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 66.67% (🎯 60%) 68284 / 102406
🟢 Statements 66.67% (🎯 60%) 68284 / 102406
🟢 Functions 63.62% (🎯 63%) 1957 / 3076
🟢 Branches 79.31% (🎯 70%) 8170 / 10301
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/excalidraw/frame.ts 66.77% 74.6% 78.12% 66.77% 47-62, 108-115, 168-186, 189-209, 217-230, 285, 303-314, 317-330, 351-360, 368-380, 383-421, 431, 519-520, 534-535, 545-546, 556, 558-559, 590-604, 607-614, 656-665, 677-678, 682-683, 715-716, 740, 750-751, 774-775, 778, 782-787, 804-821, 823-853, 863-864, 872, 876-877, 881-887, 889-913, 920-921
packages/excalidraw/actions/actionAlign.tsx 97.64% 96.66% 60% 97.64% 67, 101, 135, 169, 203, 233
packages/excalidraw/actions/actionFrame.ts 38.78% 100% 45.45% 38.78% 34-61, 71-92, 103-114, 125-144, 165-213
packages/excalidraw/actions/actionGroup.tsx 88.17% 84.21% 71.42% 88.17% 86-88, 106-108, 120-128, 203-204, 211-212, 218-219, 241, 245-257
packages/excalidraw/actions/actionSelectAll.ts 94.73% 66.66% 100% 94.73% 19-20, 50
packages/excalidraw/components/Actions.tsx 95.17% 93.75% 42.1% 95.17% 218-222, 296-297, 319-322, 328-331, 488-496
packages/excalidraw/components/App.tsx 70.14% 76.75% 71.5% 70.14% 509-510, 622-631, 731-732, 750-751, 772-832, 835-841, 854-857, 860-936, 939-958, 961-966, 974-984, 986-987, 992-993, 997-999, 1013, 1020-1285, 1344-1348, 1352-1356, 1377-1378, 1395-1440, 1466, 1476, 1483-1486, 1495-1499, 1530-1531, 1616-1626, 1631-1646, 1650-1697, 1793-1798, 1827-1832, 1835-1865, 1873-1898, 1911-2002, 2005-2013, 2016-2075, 2078-2119, 2122-2127, 2162-2163, 2186-2187, 2219-2220, 2224-2225, 2245-2253, 2258-2271, 2277-2278, 2282, 2287-2295, 2297-2305, 2317, 2352-2353, 2366-2367, 2389-2390, 2397, 2418-2420, 2480-2482, 2485-2490, 2495-2496, 2536-2544, 2549-2558, 2602-2604, 2707-2708, 2712, 2715-2716, 2724-2727, 2736-2749, 2755-2758, 2761, 2763-2764, 2771-2772, 2778-2779, 2782-2783, 2794, 2796-2800, 2803-2804, 2807-2808, 2819-2827, 2832-2833, 2884-2885, 2899-2905, 2911-2919, 2923-2931, 2935-2936, 2939-2972, 2975-2987, 2998-2999, 3010-3011, 3028-3032, 3036-3039, 3046-3048, 3066-3073, 3076, 3078-3083, 3087-3089, 3135-3136, 3143-3145, 3147-3170, 3196, 3202, 3264-3267, 3270-3271, 3288-3290, 3312-3313, 3319-3323, 3329-3410, 3464, 3468, 3503-3504, 3563, 3573-3591, 3594-3600, 3603-3604, 3610-3626, 3666-3691, 3774-3775, 3798-3812, 3820-3826, 3840-3841, 3847-3860, 3917-3918, 3990-4000, 4036, 4185-4186, 4188-4195, 4229-4233, 4235-4236, 4238-4241, 4262-4263, 4270-4271, 4293-4303, 4313-4315, 4317, 4405-4408, 4430-4438, 4442-4444, 4454-4455, 4457-4477, 4484-4507, 4510-4516, 4533-4536, 4551-4558, 4655-4659, 4663, 4671-4672, 4677-4681, 4714-4715, 4718-4719, 4731-4735, 4740-4741, 4747-4757, 4762-4789, 4794-4805, 4905-4906, 4990, 5015, 5041-5043, 5114-5115, 5133-5134, 5325-5326, 5329-5330, 5343-5344, 5391, 5452-5456, 5509-5516, 5518-5519, 5524-5590, 5634, 5691, 5718, 5725-5726, 5739-5742, 5773, 5826-5829, 5832-5836, 5838-5845, 5862-5871, 5874-5875, 5993-5994, 5997, 5999-6004, 6010-6012, 6014, 6023, 6025, 6047-6052, 6054-6057, 6061-6062, 6071-6087, 6089, 6091-6094, 6098-6194, 6198-6199, 6214-6215, 6254-6261, 6288-6289, 6301-6302, 6330, 6332-6362, 6369-6370, 6392-6393, 6412, 6414-6457, 6462-6463, 6465-6466, 6482-6483, 6489-6490, 6494-6497, 6500-6501, 6515-6541, 6549-6550, 6554-6557, 6559-6563, 6581-6585, 6632-6637, 6639-6641, 6657, 6659-6672, 6697-6700, 6755, 6772-6773, 6775-6798, 6813-6814, 6928-6956, 7012-7013, 7076-7077, 7093-7094, 7113-7114, 7208, 7214-7215, 7238-7257, 7266-7275, 7289, 7438-7476, 7480-7530, 7545, 7554, 7588-7594, 7621-7623, 7794-7797, 7819-7849, 7862, 7864-7872, 7886, 7888-7896, 7903-7906, 7914-7919, 7928-7929, 7947-7964, 8011-8012, 8015-8017, 8020-8021, 8044-8045, 8051-8052, 8079-8080, 8163-8164, 8215-8228, 8232-8318, 8397-8400, 8426-8427, 8484, 8507-8513, 8524-8535, 8563-8569, 8602, 8644, 8650, 8665-8672, 8675-8682, 8742, 8755, 8844-8845, 8866-8868, 8871, 8885-8909, 9018-9032, 9055-9079, 9088-9127, 9140-9141, 9151-9158, 9176-9183, 9237-9242, 9251-9275, 9277-9278, 9352-9353, 9360, 9362-9398, 9427, 9488, 9528-9530, 9555-9560, 9562-9563, 9568-9570, 9573-9593, 9607-9608, 9614-9623, 9628, 9632-9636, 9645-9649, 9652-9657, 9661-9668, 9697, 9699-9703, 9705-9715, 9731-9733, 9744-9752, 9756-9800, 9803-9874, 9882, 9900-9907, 9909-9931, 9946-9968, 9987-9989, 10036-10037, 10150-10154, 10156-10172, 10174-10178, 10190-10191, 10201-10217, 10236-10255, 10257-10258, 10285-10286, 10290-10291, 10301, 10303-10306, 10308-10309, 10349, 10390-10391, 10401, 10443, 10461-10469, 10480-10485, 10495-10496, 10498-10569, 10592-10593, 10625-10628, 10723-10730, 10756-10757, 10807-10878, 10926-10927, 10936-10939, 10944-10945, 10966-10968, 10970-10974, 11012
packages/excalidraw/components/LayerUI.tsx 85.62% 87.5% 48.14% 85.62% 320, 341-344, 358-359, 374-379, 424-469, 472-476, 480-490, 496-504, 551-554
packages/excalidraw/components/MobileMenu.tsx 85.57% 33.33% 57.14% 85.57% 137-142, 174-184, 189-201
packages/excalidraw/components/Stats/index.tsx 89.63% 66.66% 60% 89.63% 138, 192-199, 217-227, 247-255, 262-264, 268-273, 277-282, 287
packages/excalidraw/scene/selection.ts 87.2% 96.42% 88.88% 87.2% 62-71, 92-93, 102-121
Generated in workflow #4189 for commit df32ad3 by the Vitest Coverage Report Action

@ryan-di ryan-di marked this pull request as ready for review January 22, 2025 03:23
@dwelle
Copy link
Member

dwelle commented Jan 22, 2025

two more things to handle and we're good to go!

  • remove the align actions altogether from the left panel if frame + children selected
  • selectAll action should select frames + children I'd say

@dwelle
Copy link
Member

dwelle commented Jan 28, 2025

That group-related fixes I've decided to open a separate PR instead as it was getting a bit out of scope. Merging, thanks!

@dwelle dwelle merged commit 52eaf64 into master Jan 28, 2025
10 checks passed
@dwelle dwelle deleted the ryan-di/refactor-frame-children-selection branch January 28, 2025 21:10
mtolmacs pushed a commit that referenced this pull request Feb 6, 2025
…9031)

* box select frame & children

* avoid selecting children twice to avoid double their moving

* do not show ele stats if frame and children selected together

* do not update frame membership if selected together

* do not group frame and its children

* comment and refactor code

* hide align altogether

* include frame children when selecting all

* simplify

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
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.

3 participants