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

feat: create new text with width #8038

Merged
merged 23 commits into from
May 28, 2024
Merged

feat: create new text with width #8038

merged 23 commits into from
May 28, 2024

Conversation

ryan-di
Copy link
Member

@ryan-di ryan-di commented May 20, 2024

Just like with generic elements (rectangles, diamonds, etc), this PR introduces width for newly created texts. More specifically, users can drag to create a text with some width. Texts will then be wrapped according to the specified width.

close #8054
close #8018

Copy link

vercel bot commented May 20, 2024

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

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview May 27, 2024 10:08pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview May 27, 2024 10:08pm
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview May 27, 2024 10:08pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 27, 2024 10:08pm

fix
Copy link

github-actions bot commented May 23, 2024

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 65.62% (🎯 70%) 51430 / 78369
🔴 Statements 65.62% (🎯 70%) 51430 / 78369
🔴 Functions 66.7% (🎯 68%) 1567 / 2349
🟢 Branches 80.98% (🎯 70%) 6303 / 7783
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/excalidraw/constants.ts 99.5% 50% 100% 99.5% 10-11
packages/excalidraw/snapping.ts 28.31% 41.02% 40% 28.31% 32-33, 118-119, 131-132, 156, 159-160, 162-165, 168-169, 172-266, 269-286, 289-404, 407-574, 577-594, 597-650, 662, 672-710, 769-771, 774-785, 788-855, 858-872, 875-1071, 1085-1087, 1094-1170, 1183, 1227-1252, 1298-1359, 1362-1363
packages/excalidraw/types.ts 100% 100% 100% 100%
packages/excalidraw/components/App.tsx 69.68% 76.53% 68.39% 69.68% 479-480, 587-596, 695-696, 714-715, 736-796, 799-805, 808-811, 814-890, 893-912, 915-920, 928-938, 940-941, 946-947, 951-953, 967, 974-1235, 1295-1296, 1307-1308, 1336-1338, 1348-1393, 1419, 1429, 1436-1439, 1448-1452, 1483-1484, 1568-1578, 1583-1598, 1602-1649, 1722-1727, 1756-1761, 1764-1794, 1802-1827, 1830-1839, 1842-1954, 1957-1965, 1974-1987, 1990-2016, 2019-2090, 2093-2134, 2186-2187, 2201-2202, 2229-2230, 2234-2235, 2255-2263, 2268-2281, 2287-2288, 2293-2301, 2303-2311, 2323, 2364-2365, 2387-2388, 2395, 2464-2466, 2469-2474, 2479-2480, 2519-2527, 2532-2541, 2579-2580, 2667-2668, 2672, 2675-2676, 2684-2687, 2696-2709, 2715-2718, 2721, 2723-2724, 2731-2732, 2738-2739, 2742-2743, 2751-2752, 2755-2756, 2759-2762, 2773-2781, 2786-2787, 2837-2838, 2852-2858, 2864-2872, 2876-2884, 2888-2889, 2892-2925, 2928-2940, 2951-2952, 2963-2964, 2981-2985, 2989-2992, 2999-3001, 3019-3026, 3029, 3031-3036, 3040-3042, 3063-3064, 3071-3073, 3075-3098, 3124, 3130, 3186-3187, 3204-3206, 3228-3229, 3235-3238, 3244-3325, 3379, 3383, 3418-3419, 3478, 3488-3506, 3509-3515, 3518-3519, 3525-3538, 3624-3625, 3627-3628, 3633-3635, 3643-3644, 3667-3681, 3686-3705, 3757-3758, 3837, 3846-3847, 3849-3856, 3871-3875, 3886-3887, 3890-3894, 3896-3897, 3899-3902, 3927-3928, 3937-3939, 3941, 4024-4027, 4049-4051, 4061-4062, 4064-4084, 4087-4093, 4110-4113, 4119-4122, 4132-4139, 4179-4183, 4187, 4192-4193, 4198-4202, 4235-4236, 4239-4240, 4252-4256, 4261-4262, 4268-4278, 4283-4310, 4315-4326, 4390, 4416-4417, 4482-4488, 4571, 4596, 4622-4624, 4691-4692, 4707-4708, 4883-4884, 4887-4888, 4896, 4945-4949, 5000-5007, 5013-5079, 5123, 5175, 5202, 5209-5210, 5219-5222, 5253, 5301-5304, 5307-5313, 5315-5318, 5333-5342, 5345-5346, 5446-5447, 5450, 5452-5457, 5463-5465, 5467, 5476, 5498-5503, 5505-5508, 5512-5513, 5523-5623, 5627-5628, 5643-5644, 5677-5678, 5705-5706, 5739-5766, 5773-5774, 5796-5797, 5816, 5818-5861, 5866-5867, 5869-5870, 5886-5887, 5893-5894, 5898-5901, 5904-5905, 5919-5946, 5954-5955, 5959-5962, 5964-5968, 5986-5990, 6037-6042, 6044-6046, 6062, 6064-6077, 6102-6105, 6149, 6166-6167, 6169-6192, 6207-6208, 6319-6347, 6453-6454, 6474-6475, 6569, 6575-6576, 6599-6618, 6633, 6762, 6784-6822, 6826-6876, 6891, 6900, 6934-6940, 6955-6957, 7099-7102, 7126-7157, 7170, 7172-7180, 7194, 7196-7204, 7211-7214, 7222-7227, 7254-7255, 7260-7262, 7265-7266, 7291-7292, 7323-7324, 7407-7408, 7457-7470, 7536-7539, 7565-7566, 7602-7603, 7616, 7634-7640, 7647-7650, 7673-7679, 7751, 7757, 7772-7779, 7782-7789, 7845, 7922-7923, 7944-7946, 7949, 7963-7987, 8115-8139, 8149-8188, 8201-8202, 8211-8218, 8232-8245, 8258-8265, 8319-8345, 8347-8348, 8422-8423, 8430, 8432-8468, 8497, 8558, 8590-8592, 8617-8622, 8624-8625, 8630-8632, 8635-8655, 8669-8670, 8676-8685, 8690, 8694-8698, 8707-8711, 8714-8719, 8723-8730, 8760, 8762-8766, 8768-8778, 8794-8796, 8807-8815, 8819-8863, 8866-8937, 8945, 8963-8970, 8972-8988, 9003-9025, 9044-9046, 9091-9092, 9206-9210, 9212-9228, 9230-9234, 9246-9247, 9257-9273, 9292-9311, 9313-9314, 9341-9342, 9346-9347, 9357, 9359-9362, 9364-9365, 9405, 9426-9427, 9454, 9457, 9498, 9511-9519, 9536-9537, 9569-9572, 9665-9672, 9698-9699, 9742-9796, 9844-9845, 9854-9857, 9862-9863, 9884-9886, 9888-9892, 9930
packages/excalidraw/components/canvases/InteractiveCanvas.tsx 88.13% 100% 100% 88.13% 86-113
packages/excalidraw/element/dragElements.ts 75.43% 74.07% 100% 75.43% 42-47, 159-183, 189-193, 201-221
packages/excalidraw/element/resizeElements.ts 94.6% 80.47% 100% 94.6% 157, 170-178, 215-216, 269-270, 288-290, 293-294, 296-297, 300-302, 539-540, 591-592, 688-694, 769-770, 813-814, 819, 823, 830-831, 925-926, 938-939, 942-943, 1031-1040
packages/excalidraw/element/textElement.ts 94.93% 94.81% 95% 94.93% 68, 182-183, 223, 366-367, 579-586, 598-619, 633-634, 649-650, 689-696
packages/excalidraw/renderer/interactiveScene.ts 87.12% 85.47% 85.71% 87.12% 82-83, 87-88, 134-135, 148-166, 243-254, 269-294, 368, 439-441, 462-463, 503-510, 562-573, 613-614, 665-666, 786-795, 812, 935-958
packages/excalidraw/renderer/renderElement.ts 83.9% 76.15% 100% 83.9% 86-88, 110-111, 169-170, 174-175, 233-234, 282, 328-329, 342-359, 370-373, 387, 410-411, 413-414, 435, 596, 598-611, 673-675, 703-713, 754-762, 768-769, 773-836, 841-843, 896-898, 920, 923, 950-951
packages/excalidraw/scene/types.ts 0% 0% 0% 0% 1-140
Generated in workflow #2573

@dwelle dwelle merged commit 860308e into master May 28, 2024
11 checks passed
@dwelle dwelle deleted the new-text-with-width branch May 28, 2024 13:53
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.

Feat: Easy Text Box Without Border FR - drag to create a fixed width text element
2 participants