Commit cce0ff1
authored
ENG-1138 Migrate canvas shape node type to discourse-node (#894)
* Refactor Discourse Node Handling and Introduce Node Type ID
- Replaced the use of createNodeShapeUtils with DiscourseNodeUtil across components to streamline discourse node management.
- Introduced DISCOURSE_NODE_SHAPE_TYPE constant for consistent node type identification.
- Updated various components to utilize nodeTypeId for better clarity and functionality in shape creation and manipulation.
- Enhanced migration logic to accommodate new node type structure, ensuring backward compatibility and improved data integrity.
This refactor improves the maintainability and readability of the codebase while ensuring that new features can be integrated more seamlessly.
* Fix clipboard discourse node shape typing
* Fix missed discourse node type checks
* Keep legacy node shape utils for cloud sync
* Refactor Discourse Relation Shape Utilities
- Introduced utility functions to determine relation and bindable discourse node shape types for improved clarity in shape handling.
- Updated migration logic to clarify assumptions regarding node and relation type IDs.
- Added a TODO comment to rename the migration file for better organization as it serves both relation and node shapes.
* Enhance Clipboard Component with TypeId for Discourse Nodes
- Introduced a new type definition, ClipboardDiscourseNode, to include typeId for better structure and clarity.
- Updated state management in ClipboardPageSection to utilize the new type, improving type safety and consistency.
- Adjusted logic to map and retrieve typeId from discourse nodes, ensuring accurate handling of node types throughout the component.
* .1 parent 5ec2734 commit cce0ff1
15 files changed
Lines changed: 356 additions & 134 deletions
File tree
- apps/roam/src
- components
- canvas
- DiscourseRelationShape
- overlays
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
| 366 | + | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| |||
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
555 | | - | |
| 556 | + | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
60 | | - | |
61 | | - | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
66 | | - | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
| 408 | + | |
403 | 409 | | |
404 | 410 | | |
405 | 411 | | |
406 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
407 | 422 | | |
408 | 423 | | |
409 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
391 | 394 | | |
392 | 395 | | |
393 | 396 | | |
| 397 | + | |
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
397 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
398 | 409 | | |
399 | 410 | | |
400 | 411 | | |
| |||
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
440 | | - | |
| 451 | + | |
441 | 452 | | |
442 | 453 | | |
443 | 454 | | |
| |||
469 | 480 | | |
470 | 481 | | |
471 | 482 | | |
| 483 | + | |
472 | 484 | | |
473 | 485 | | |
474 | 486 | | |
| |||
531 | 543 | | |
532 | 544 | | |
533 | 545 | | |
| 546 | + | |
534 | 547 | | |
535 | 548 | | |
536 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
537 | 556 | | |
| 557 | + | |
538 | 558 | | |
539 | 559 | | |
540 | 560 | | |
| |||
545 | 565 | | |
546 | 566 | | |
547 | 567 | | |
548 | | - | |
| 568 | + | |
549 | 569 | | |
550 | 570 | | |
551 | 571 | | |
| |||
554 | 574 | | |
555 | 575 | | |
556 | 576 | | |
| 577 | + | |
557 | 578 | | |
558 | 579 | | |
559 | 580 | | |
| |||
670 | 691 | | |
671 | 692 | | |
672 | 693 | | |
| 694 | + | |
673 | 695 | | |
674 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
675 | 703 | | |
676 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
677 | 708 | | |
678 | 709 | | |
679 | 710 | | |
| |||
697 | 728 | | |
698 | 729 | | |
699 | 730 | | |
700 | | - | |
| 731 | + | |
701 | 732 | | |
702 | | - | |
| 733 | + | |
703 | 734 | | |
704 | 735 | | |
705 | 736 | | |
| |||
710 | 741 | | |
711 | 742 | | |
712 | 743 | | |
| 744 | + | |
713 | 745 | | |
714 | 746 | | |
715 | 747 | | |
716 | 748 | | |
717 | | - | |
| 749 | + | |
718 | 750 | | |
719 | 751 | | |
720 | 752 | | |
| |||
0 commit comments