Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheets-thread-comment): comment ui issues (#3510)
zhangw05616d4a9e4b
diff --git a/packages/sheets-thread-comment/src/commands/operations/comment.operation.ts b/packages/sheets-thread-comment/src/commands/operations/comment.operation.tsindex 7e932e2c08..1cf1249566 100644--- a/packages/sheets-thread-comment/src/commands/operations/comment.operation.ts+++ b/packages/sheets-thread-comment/src/commands/operations/comment.operation.ts@@ -14,12 +14,12 @@* limitations under the License.*/-import type { ICommand } from '@univerjs/core';import { CommandType, IUniverInstanceService } from '@univerjs/core';-import type { ISheetLocation } from '@univerjs/sheets';import { getSheetCommandTarget, SheetsSelectionsService } from '@univerjs/sheets';-import { ThreadCommentPanelService } from '@univerjs/thread-comment-ui';import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment-base';+import { ThreadCommentPanelService } from '@univerjs/thread-comment-ui';+import type { ICommand } from '@univerjs/core';+import type { ISheetLocation } from '@univerjs/sheets';import { SheetsThreadCommentPopupService } from '../../services/sheets-thread-comment-popup.service';export const ShowAddSheetCommentModalOperation: ICommand = {diff --git a/packages/sheets-thread-comment/src/controllers/menu.ts b/packages/sheets-thread-comment/src/controllers/menu.tsindex 119004067e..17dc272382 100644--- a/packages/sheets-thread-comment/src/controllers/menu.ts+++ b/packages/sheets-thread-comment/src/controllers/menu.ts@@ -14,13 +14,13 @@* limitations under the License.*/-import type { IMenuItem, IShortcutItem } from '@univerjs/ui';-import { getMenuHiddenObservable, KeyCode, MenuItemType, MetaKeys } from '@univerjs/ui';-import type { IAccessor } from '@univerjs/core';-import { ToggleSheetCommentPanelOperation } from '@univerjs/thread-comment-ui';import { UniverInstanceType } from '@univerjs/core';-import { getCurrentRangeDisable$, whenSheetEditorFocused } from '@univerjs/sheets-ui';import { RangeProtectionPermissionViewPoint, WorkbookCommentPermission, WorksheetViewPermission } from '@univerjs/sheets';+import { getCurrentRangeDisable$, whenSheetEditorFocused } from '@univerjs/sheets-ui';+import { ToggleSheetCommentPanelOperation } from '@univerjs/thread-comment-ui';+import { getMenuHiddenObservable, KeyCode, MenuItemType, MetaKeys } from '@univerjs/ui';+import type { IAccessor } from '@univerjs/core';+import type { IMenuItem, IShortcutItem } from '@univerjs/ui';import { ShowAddSheetCommentModalOperation } from '../commands/operations/comment.operation';import { COMMENT_SINGLE_ICON } from '../types/const';diff --git a/packages/thread-comment-ui/src/commands/operations/comment.operations.ts b/packages/thread-comment-ui/src/commands/operations/comment.operations.tsindex 31b9f26ad8..090509b958 100644--- a/packages/thread-comment-ui/src/commands/operations/comment.operations.ts+++ b/packages/thread-comment-ui/src/commands/operations/comment.operations.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import type { IAccessor, ICommand } from '@univerjs/core';import { CommandType } from '@univerjs/core';import { ISidebarService } from '@univerjs/ui';+import type { IAccessor, ICommand } from '@univerjs/core';import { ThreadCommentPanelService } from '../../services/thread-comment-panel.service';import { THREAD_COMMENT_PANEL } from '../../types/const';@@ -34,7 +34,7 @@ export const ToggleSheetCommentPanelOperation: ICommand = {sidebarService.open({header: { title: 'threadCommentUI.panel.title' },children: { label: THREAD_COMMENT_PANEL },- width: 320,+ width: 330,});panelService.setPanelVisible(true);}diff --git a/packages/thread-comment-ui/src/views/thread-comment-tree/index.module.less b/packages/thread-comment-ui/src/views/thread-comment-tree/index.module.lessindex e54aaebf61..3fa74a5596 100644--- a/packages/thread-comment-ui/src/views/thread-comment-tree/index.module.less+++ b/packages/thread-comment-ui/src/views/thread-comment-tree/index.module.less@@ -2,10 +2,10 @@padding: 16px;background: rgba(var(--color-white));border: 1px solid rgba(var(--grey-200));- width: 279px;border-radius: 8px;box-sizing: border-box;position: relative;+ width: 278px;}.thread-comment-active {diff --git a/packages/thread-comment-ui/src/views/thread-comment-tree/index.tsx b/packages/thread-comment-ui/src/views/thread-comment-tree/index.tsxindex a0b478b03a..596398b2ef 100644--- a/packages/thread-comment-ui/src/views/thread-comment-tree/index.tsx+++ b/packages/thread-comment-ui/src/views/thread-comment-tree/index.tsx@@ -16,7 +16,7 @@import { generateRandomId, useDependency } from '@univerjs/core';import { ICommandService, type IUser, LocaleService, type UniverInstanceType, UserManagerService } from '@univerjs/core';-import { Dropdown, Menu, MenuItem } from '@univerjs/design';+import { Dropdown, Menu, MenuItem, Tooltip } from '@univerjs/design';import { DeleteSingle, MoreHorizontalSingle, ReplyToCommentSingle, ResolvedSingle, SolveSingle } from '@univerjs/icons';import { AddCommentCommand, DeleteCommentCommand, DeleteCommentTreeCommand, ResolveCommentCommand, ThreadCommentModel, UpdateCommentCommand } from '@univerjs/thread-comment';import { useObservable } from '@univerjs/ui';@@ -298,9 +298,11 @@ export const ThreadCommentTree = (props: IThreadCommentTreeProps) => {<div className={styles.threadCommentTitle}><div className={styles.threadCommentTitlePosition}><div className={styles.threadCommentTitleHighlight} />- <div className={styles.threadCommentTitlePositionText}>- {title}- </div>+ <Tooltip showIfEllipsis title={title}>+ <div className={styles.threadCommentTitlePositionText}>+ {title}+ </div>+ </Tooltip></div>{comments? (