Commit 2daa264
refactor: remove simplifyblocks and make copy sync (#1160)
* extract updateBlockCommand
* Extracted remaining commands
* extract keyboard shortcuts
* move directory
* remove createblockcommand
* Added merge/split tests
* Updated snapshots
* Added update block tests and unified test setup
* Added test cases for reverting props
* Added additional test cases for changing content type
* remove "nested" insert option
* Split remaining commands & cleaned up
* Added `getNearestBlockContainerPos`
* Refactored `getBlockInfoFromPos`
* Rewrote `splitBlockCommand`
* Added text cursor position tests
* Fixed lint issue
* fix lint
* Fixed `splitBlock` selection
* Small fix
* Added unit tests to check selection setting
* simplify splitblocks
* Fixed selection in `splitBlock` tests
* wip: deprecate getBlockInfoFromPos
* finish cleanup
* Fixed `mergeBlocks` edge cases
* fix build
* clean nodeconversions
* Implemented PR feedback
* Finished review and remaining changes
* Fixed bug in `insertOrUpdateBlock`
* Removed log
* Tiny changes
* remove simplifyblocks, make copy sync
* fix bug
* fix all tests
* Fixed merge/delete behaviour on Backspace
---------
Co-authored-by: matthewlipski <matthewlipski@gmail.com>
Co-authored-by: Matthew Lipski <50169049+matthewlipski@users.noreply.github.com>1 parent bb32c03 commit 2daa264
File tree
15 files changed
+318
-312
lines changed- packages
- core/src
- api
- clipboard/toClipboard
- exporters
- html
- __snapshots__
- complex/misc
- lists
- basic
- nested
- util
- markdown/util
- editor
- schema/blocks
- react/src/test
- server-util/src/context
- __snapshots__
15 files changed
+318
-312
lines changedLines changed: 24 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | | - | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
| |||
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 92 | + | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
106 | | - | |
| 100 | + | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
112 | 106 | | |
113 | | - | |
| 107 | + | |
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
117 | | - | |
| 111 | + | |
118 | 112 | | |
119 | 113 | | |
120 | 114 | | |
| |||
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
141 | | - | |
| 135 | + | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
| |||
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
168 | 163 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
175 | 169 | | |
176 | 170 | | |
177 | 171 | | |
| |||
229 | 223 | | |
230 | 224 | | |
231 | 225 | | |
232 | | - | |
233 | | - | |
234 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
235 | 234 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 235 | | |
243 | 236 | | |
244 | 237 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 12 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
53 | 43 | | |
54 | 44 | | |
55 | 45 | | |
56 | 46 | | |
57 | | - | |
| 47 | + | |
58 | 48 | | |
59 | 49 | | |
60 | 50 | | |
61 | | - | |
| 51 | + | |
| 52 | + | |
62 | 53 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
89 | 58 | | |
90 | 59 | | |
91 | 60 | | |
92 | 61 | | |
93 | | - | |
| 62 | + | |
94 | 63 | | |
95 | | - | |
| 64 | + | |
96 | 65 | | |
97 | 66 | | |
98 | 67 | | |
99 | | - | |
100 | 68 | | |
101 | 69 | | |
102 | 70 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
0 commit comments