-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui, dom-adapters): cross-input selection #118
base: main
Are you sure you want to change the base?
Conversation
Coverage report for
|
St.❔ |
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 b6d8022
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Statements | 99.65% (+0% 🔼) |
853/856 |
🟢 | Branches | 98.7% | 228/231 |
🟢 | Functions | 98.1% | 207/211 |
🟢 | Lines | 99.64% (+0% 🔼) |
820/823 |
Test suite run success
441 tests passing in 25 suites.
Report generated by 🧪jest coverage report action from b6d8022
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 70.97% | 22/31 |
🔴 | Branches | 20% | 1/5 |
🟡 | Functions | 75% | 6/8 |
🟡 | Lines | 68.97% | 20/29 |
Test suite run success
4 tests passing in 1 suite.
Report generated by 🧪jest coverage report action from b6d8022
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 67.51% | 160/237 |
🟢 | Branches | 80% | 60/75 |
🔴 | Functions | 57.14% | 20/35 |
🟡 | Lines | 67.52% | 158/234 |
Test suite run success
67 tests passing in 4 suites.
Report generated by 🧪jest coverage report action from b6d8022
⏭️ No files to mutate for |
⏭️ No files to mutate for |
public detachBlock(index: Index): void { | ||
const block = this.getBlock(index); | ||
|
||
if (block) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverse to reduce nesting
public getBlock(index?: Index): BlockToolAdapter | undefined { | ||
if (index === undefined) { | ||
if (this.#currentUserCaret.index === null) { | ||
throw new Error('[CaretManager] No index provided and no user caret index found'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just return null?
ui:before-input
to all affected inputs. To find them, it checks current range and compare its start/end with input position.this.#blocks
instead ofthis.#inputs
. Thus, we won't care about managing input indexes (with block index) on block removing/moving.