refactor(core): minimize comment editor (#12995)

#### PR Dependency Tree


* **PR #12995** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a new clipboard module, making clipboard-related
functionality available for external use.
* Added a comprehensive extension system for the comment editor,
supporting rich text features, widgets, and configurable options.

* **Bug Fixes**
* Improved stability by ensuring comment highlighting features and
toolbar event subscriptions handle missing dependencies gracefully,
preventing potential runtime errors.

* **Refactor**
* Simplified comment editor view manager setup for easier configuration
and maintenance.

* **Chores**
* Updated package exports to expose new clipboard modules and
configurations.
* Removed confirm modal and portal-related logic from the comment editor
component.
* Adjusted temporary store creation to omit adding an extra surface
block under the root page.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-07-03 12:21:28 +08:00
committed by GitHub
parent 5d8ee51e8c
commit 32c40bbf09
17 changed files with 238 additions and 67 deletions

View File

@@ -392,9 +392,11 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
}
get isCommentHighlighted() {
return this.std
.get(BlockCommentManager)
.isBlockCommentHighlighted(this.model);
return (
this.std
.getOptional(BlockCommentManager)
?.isBlockCommentHighlighted(this.model) ?? false
);
}
override async getUpdateComplete() {