Skip to content

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.

chore: change ellipsis class to truncate; fix: defined name if ref overflow (#6107)

Roman Sergeev4102e507a8cb
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx b/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
index 3040c41149..916e97ec80 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
+++ b/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
@@ -224,7 +224,7 @@ function SearchFunctionFactory(props: ISearchFunctionProps, ref: any) {
}
}}
>
- <span className="univer-block univer-overflow-x-hidden univer-text-ellipsis univer-text-xs">
+ <span className="univer-block univer-truncate univer-text-xs">
<span className="univer-text-red-500">{item.name.substring(0, searchText.length)}</span>
<span>{item.name.slice(searchText.length)}</span>
</span>
diff --git a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
index 2877a454d7..de1b723c02 100644
--- a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
+++ b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup/index.tsx
@@ -100,7 +100,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
{iconsMap[linkObj.type]}
</div>
<Tooltip showIfEllipsis title={linkObj.name} asChild>
- <span className="univer-flex-1 univer-overflow-hidden univer-text-ellipsis">{linkObj.name}</span>
+ <span className="univer-flex-1 univer-truncate">{linkObj.name}</span>
</Tooltip>
</div>
<div
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
index c7c6d9df90..ccf5c5da3e 100644
--- a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
+++ b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
@@ -229,8 +229,8 @@ export const DefinedNameContainer = () => {
<div title={definedName.comment}>
<div
className={`
- univer-my-1 univer-max-h-[100px] univer-max-w-[190px] univer-overflow-hidden
- univer-text-ellipsis univer-text-sm univer-font-medium univer-text-gray-900
+ univer-my-1 univer-max-h-[100px] univer-max-w-[190px] univer-truncate
+ univer-text-sm univer-font-medium univer-text-gray-900
dark:!univer-text-white
`}
>
@@ -242,8 +242,7 @@ export const DefinedNameContainer = () => {
<div
className={`
univer-my-1 univer-max-h-[100px] univer-w-full univer-max-w-[190px]
- univer-overflow-hidden univer-text-ellipsis univer-text-xs
- univer-text-gray-500
+ univer-truncate univer-text-xs univer-text-gray-500
`}
title={definedName.formulaOrRefString}
>