fix(editor): comment style and creation issues (#13006)

#### PR Dependency Tree


* **PR #13006** 👈

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

* **Style**
* Updated embedded note content to remove background color and underline
from inline comments for a cleaner appearance.

* **Bug Fixes**
* Improved comment functionality by ensuring comments are only added to
blocks without text content.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-07-03 18:08:00 +08:00
committed by GitHub
parent 81f542a4da
commit 7879e12718
2 changed files with 6 additions and 1 deletions

View File

@@ -57,6 +57,11 @@ export const embedNoteContentStyles = css`
font-weight: 600; font-weight: 600;
} }
.affine-embed-doc-content-note-blocks inline-comment {
background-color: unset !important;
border-bottom: unset !important;
}
.affine-embed-linked-doc-block.horizontal { .affine-embed-linked-doc-block.horizontal {
affine-paragraph, affine-paragraph,
affine-list { affine-list {

View File

@@ -70,7 +70,7 @@ export class BlockCommentManager extends LifeCycleWatcher {
} }
); );
if (!selectedBlocks) return []; if (!selectedBlocks) return [];
return selectedBlocks.map(b => b.model); return selectedBlocks.map(b => b.model).filter(m => !m.text);
}); });
const needCommentBlocks = [ const needCommentBlocks = [