Commit 429f96e
SD-2527 - feat: implement new types of ordered lists (#2873)
* feat: implement 2 extra types of bullet lists (square, circle)
* refactor: code reuse
* refactor: simplified code removing font override
* chore: small code tweaks
* feat: extra ordered list types
* chore: small UI tweaks
* chore: removed console log
* test(lists): add unit, behavior, and visual tests for new list styles (SD-2527)
Coverage for the 10 styles this PR introduces (3 bullet + 7 ordered):
- Unit: full mapping matrix for markerTextToBulletStyle and
numberingInfoToOrderedStyle, plus the BULLET_STYLE_CHARS and
ORDERED_LIST_STYLES override branches in numbering-transforms.
- Unit: style param threading through toggleList, including the
same-style-toggle-off and different-style-create cases.
- Unit: headless toolbar deriver values for all 10 styles plus
documented null cases (upper-alpha-paren, decimalZero, prefixed).
- Unit: registry rename compatibility (legacy toggleBulletList /
toggleOrderedList no longer flows through bullet-list/numbered-list).
- Behavior: each toggle command produces correct OOXML and locks in
current partial-selection style-switch fragmentation behavior.
- Visual: fixture spec for sd-2527-list-styles.docx (auto-discovered).
* fix: apply style change to entire list's level
* refactor: simplify logic
* feat: added upper alpha paren list style
* refactor: simplify code
* fix: highlight list buttons in toolbar based on cursor position
* feat: apply inline list style when selection is not empty
* fix: cmd + Z not undoing list style changes
* fix: list style change not applying for nested children inline
* fix: backward compat for toggleOrderedList
* refactor: create generic list styles button
* fix: tests
* fix: lists alignment
* fix: list alignment
* fix: change repeating pattern for upper/lower alpha
* fix: changing list styles affecting alignment
* fix: added missing code
* fix: refresh abstract id and dispatch tr
* test(lists): repro tests for clone-path findings (SD-2527 review)
Two passing tests that document the current behavior of
cloneListDefinitionWithLevelStyle when the source num carries
w:lvlOverride or when the abstract is a w:numStyleLink wrapper.
Comments explain why each assertion is a bug; invert when fixing.
* Revert "test(lists): repro tests for clone-path findings (SD-2527 review)"
This reverts commit d537dcc.
* fix: changing list level overrides styles to null
* test: added tests to ensure nested lists use the correct marker
* test: behavior tests to ensure markers are correct on nested lists
---------
Co-authored-by: Gabriel Chittolina <gabrielchittolina1@gmail.com>
Co-authored-by: Caio Pizzol <caio@superdoc.dev>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c64a05d commit 429f96e
41 files changed
Lines changed: 2584 additions & 153 deletions
File tree
- packages
- layout-engine/layout-bridge/src
- super-editor/src
- editors/v1
- components/toolbar
- core
- commands
- helpers
- parts/adapters
- extensions
- paragraph
- types
- headless-toolbar
- helpers
- scripts
- tests
- behavior/tests/lists
- visual/tests/rendering
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
400 | 414 | | |
401 | 415 | | |
402 | 416 | | |
| |||
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
54 | | - | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
71 | | - | |
| 78 | + | |
72 | 79 | | |
73 | | - | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | | - | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | | - | |
101 | | - | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
644 | | - | |
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
659 | 661 | | |
660 | 662 | | |
661 | 663 | | |
| |||
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
669 | | - | |
| 671 | + | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
672 | 676 | | |
673 | | - | |
| 677 | + | |
674 | 678 | | |
675 | 679 | | |
676 | 680 | | |
677 | 681 | | |
678 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
679 | 702 | | |
680 | 703 | | |
681 | 704 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
644 | 653 | | |
645 | 654 | | |
646 | 655 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
74 | 90 | | |
75 | 91 | | |
76 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2703 | 2703 | | |
2704 | 2704 | | |
2705 | 2705 | | |
| 2706 | + | |
2706 | 2707 | | |
2707 | 2708 | | |
2708 | 2709 | | |
| |||
2723 | 2724 | | |
2724 | 2725 | | |
2725 | 2726 | | |
2726 | | - | |
| 2727 | + | |
2727 | 2728 | | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
2728 | 2733 | | |
2729 | 2734 | | |
2730 | 2735 | | |
| |||
2772 | 2777 | | |
2773 | 2778 | | |
2774 | 2779 | | |
2775 | | - | |
| 2780 | + | |
2776 | 2781 | | |
2777 | 2782 | | |
2778 | 2783 | | |
| |||
2784 | 2789 | | |
2785 | 2790 | | |
2786 | 2791 | | |
2787 | | - | |
| 2792 | + | |
2788 | 2793 | | |
2789 | 2794 | | |
2790 | 2795 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
Lines changed: 56 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
0 commit comments