Commit a76ffa6
change RichMultiString.cs to store RichStrings instead of just strings (#1692)
* change RichMultiString.cs to store RichStrings instead of just strings
* migrate IRichMultiString to use IRichString, make a rich multi ws input editor based off lcm-rich-text-editor.svelte
* only fire onchange on blur and not on keystroke
* Add test for property changes in RichMultiString diffs
This test ensures that the diff logic correctly captures property changes, such as toggling text formatting attributes in RichMultiStrings. It validates the generation of precise replace operations when properties are updated.
* don't allow RichSpan.Ws to be null
* handle null strings better, ensure ws it not null where possible.
Note, in the case of ExampleSentence.Reference we don't have a writing system to fallback to like we do with MultiString, so it may be null in some old data, however, it shouldn't trigger any issues due to sync order.
* handle db serialization issues due to ExampleSentence.Reference being a RichString
* add migration for Reference column
* Refactor activity view to use runes
* ensure a default WsId has the Code "default" rather than null
* add ExampleSentenceTestsBase.cs to catch issues creating examples without references
* change RichSpan.Colors to use the C# Color struct to avoid issues of invalid colors
* globally configure FluentAssert to compare RichString and RichSpan by members and no their equals method to improve assert messages
* try to restore cursor location/selection on rich text state change, this avoids issues when typing in a field which was undefined
* ensure all tests projects use the global fluent assert config in MiniLcmTests
* fix issue round tripping RichText tags where the guid would change
* merge consecutive RichSpans that have the same props
* Replicate input tab-selection handling and remove custom key handlers.
* fix issue where `newDoc.eq(editor.state.doc)` was never true because node.attr.richSpan.text was out of date
* don't use inline span nodes to avoid issues related to deleting a whole span in one block
---------
Co-authored-by: Tim Haasdyk <tim_haasdyk@sil.org>1 parent 4ad1f24 commit a76ffa6
93 files changed
Lines changed: 2297 additions & 585 deletions
File tree
- backend
- FwLite
- FwDataMiniLcmBridge.Tests
- MiniLcmTests
- FwDataMiniLcmBridge/Api
- UpdateProxy
- FwLiteProjectSync.Tests
- FwLiteWeb/Routes
- LcmCrdt.Tests
- Changes
- Data
- MiniLcmTests
- LcmCrdt
- Changes
- Migrations
- MiniLcm.Tests
- AutoFakerHelpers
- RichText
- Validators
- MiniLcm
- Models
- RichText
- SyncHelpers
- Validators
- LfClassicData
- frontend/viewer/src
- lib
- activity
- components
- field-editors
- lcm-rich-text-editor
- dotnet-types
- generated-types/MiniLcm/Models
- entry-editor
- object-editors
- layout
- sandbox
- project
- browse
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 | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
Lines changed: 13 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 | + | |
Lines changed: 12 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 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
Lines changed: 139 additions & 53 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
659 | 663 | | |
660 | 664 | | |
661 | 665 | | |
| |||
680 | 684 | | |
681 | 685 | | |
682 | 686 | | |
683 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
684 | 692 | | |
685 | 693 | | |
686 | 694 | | |
| |||
1065 | 1073 | | |
1066 | 1074 | | |
1067 | 1075 | | |
1068 | | - | |
| 1076 | + | |
1069 | 1077 | | |
1070 | 1078 | | |
1071 | 1079 | | |
| |||
1329 | 1337 | | |
1330 | 1338 | | |
1331 | 1339 | | |
1332 | | - | |
1333 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1334 | 1343 | | |
1335 | 1344 | | |
1336 | 1345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
Lines changed: 47 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
128 | 147 | | |
129 | 148 | | |
130 | 149 | | |
| |||
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
179 | | - | |
| 198 | + | |
| 199 | + | |
180 | 200 | | |
181 | 201 | | |
182 | 202 | | |
| |||
231 | 251 | | |
232 | 252 | | |
233 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
234 | 268 | | |
235 | 269 | | |
236 | 270 | | |
| |||
253 | 287 | | |
254 | 288 | | |
255 | 289 | | |
256 | | - | |
257 | | - | |
| 290 | + | |
| 291 | + | |
258 | 292 | | |
259 | 293 | | |
260 | 294 | | |
| |||
393 | 427 | | |
394 | 428 | | |
395 | 429 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 430 | + | |
| 431 | + | |
399 | 432 | | |
400 | 433 | | |
401 | | - | |
| 434 | + | |
402 | 435 | | |
403 | 436 | | |
404 | 437 | | |
| |||
518 | 551 | | |
519 | 552 | | |
520 | 553 | | |
521 | | - | |
| 554 | + | |
522 | 555 | | |
523 | 556 | | |
524 | 557 | | |
525 | 558 | | |
526 | 559 | | |
527 | | - | |
| 560 | + | |
528 | 561 | | |
529 | 562 | | |
530 | 563 | | |
531 | | - | |
| 564 | + | |
532 | 565 | | |
533 | 566 | | |
534 | | - | |
| 567 | + | |
535 | 568 | | |
536 | | - | |
| 569 | + | |
537 | 570 | | |
538 | | - | |
| 571 | + | |
539 | 572 | | |
540 | | - | |
| 573 | + | |
541 | 574 | | |
542 | 575 | | |
543 | 576 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments