Skip to content

Implement some BlocksAPI method#114

Merged
gohabereg merged 14 commits intomainfrom
feature/blocks-api
Apr 14, 2026
Merged

Implement some BlocksAPI method#114
gohabereg merged 14 commits intomainfrom
feature/blocks-api

Conversation

@gohabereg
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

Coverage report for ./packages/dom-adapters

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 09bca13

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

Coverage report for ./packages/model

St.
Category Percentage Covered / Total
🟢 Statements
99.88% (+0.23% 🔼)
856/857
🟢 Branches
99.57% (+0.87% 🔼)
232/233
🟢 Functions 98.1% 207/211
🟢 Lines
99.88% (+0.24% 🔼)
823/824

Test suite run success

442 tests passing in 25 suites.

Report generated by 🧪jest coverage report action from 09bca13

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

Coverage report for ./packages/ot-server

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 09bca13

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

Coverage report for ./packages/collaboration-manager

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 09bca13

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

Coverage report for ./packages/core

St.
Category Percentage Covered / Total
🟢 Statements 100% 98/98
🟢 Branches 100% 36/36
🟢 Functions 100% 24/24
🟢 Lines 100% 91/91

Test suite run success

66 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 09bca13

Comment on lines +349 to +352
blocksManager.move(1, 1);

expect(model.removeBlock).toHaveBeenCalledWith(USER_ID, 1);
expect(model.addBlock).toHaveBeenCalledWith(USER_ID, { name: 'b' }, 2);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems strange

Comment thread packages/core/src/components/BlockManager.spec.ts Outdated
Comment thread packages/core/src/components/BlockManager.spec.ts Outdated
* @param blocks - array of blocks to insert
* @param [index] - index to insert blocks at. If undefined, inserts at the end
*/
public insertMany(blocks: BlockNodeSerialized[], index: number = this.#model.length + 1): void {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why +1, model indexing starts with 1?

Comment thread packages/core/src/components/BlockManager.ts Outdated
Comment thread packages/core/eslint.config.mjs Outdated
Comment on lines +28 to +30
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/naming-convention': 'off',
'n/no-unsupported-features/node-builtins': 'off',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥲

Comment thread packages/core/eslint.config.mjs Outdated
// @todo: remove when we setup eslint to correctly handle the types
'n/no-missing-import': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/naming-convention': 'off',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it is disabled for a whole project instead of tests-only?

@gohabereg gohabereg added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit 35f748a Apr 14, 2026
24 checks passed
@gohabereg gohabereg deleted the feature/blocks-api branch April 14, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants