editor-js / document-model

❗️WIP❗️
Apache License 2.0
10 stars 2 forks source link

CaretAdapter reimplementation #69

Closed gohabereg closed 1 week ago

gohabereg commented 7 months ago

CaretAdapter should be global in scope of one Document.

The new data flow is the following:

  1. BlockToolAdapter receives CaretAdapter instance as a constructor parameter
  2. When input is attached to a BlockToolAdapter instance, it is attached to the CaretAdapter as well
  3. CaretAdapter keeps track of all inputs by their DataIndex (block index + data property index)
  4. When selection is changed inside the Editor container, CaretAdapter receives an update and updates the model
  5. When model is updated, CaretAdapter receives an update, looks for related input and sets the selection there

ToDo:

github-actions[bot] commented 7 months ago

⏭️ No files to mutate for ./packages/model

github-actions[bot] commented 7 months ago

Coverage report for ./packages/dom-adapters

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

1 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 3bedd237e5c65def61fe9aeea82f3609cc7f2881

github-actions[bot] commented 7 months ago

Coverage report for ./packages/model

St.:grey_question:
Category Percentage Covered / Total
🟢 Statements
100% (+3.73% 🔼)
745/745
🟢 Branches
99.5% (+1.63% 🔼)
199/200
🟢 Functions
99.44% (+7.93% 🔼)
178/179
🟢 Lines
100% (+3.72% 🔼)
718/718
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟢 |
`...` / IndexBuilder.ts
| 100% | 100% | 100% | 100% | | 🟢 |
`...` / index.ts
| 100% | 100% | 100% | 100% | | 🟢 |
`...` / index.ts
| 100% | 100% | 100% | 100% |

Test suite run success

390 tests passing in 24 suites.

Report generated by 🧪jest coverage report action from 3bedd237e5c65def61fe9aeea82f3609cc7f2881

github-actions[bot] commented 7 months ago

⏭️ No files to mutate for ./packages/dom-adapters