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.

fix(sheets-ui): defined name bar - actions tooltip position (#5944)

Roman Sergeev9214b922cc9d
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
index d0e5e6a964..33f9753578 100644
--- a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
+++ b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
@@ -246,44 +246,45 @@ export const DefinedNameContainer = () => {
{definedName.formulaOrRefString}
</div>
</div>
- <Tooltip title={localeService.t('definedName.updateButton')} placement="top">
- <a
- className={`
- univer-absolute univer-right-[60px] univer-top-1/2 univer-hidden
- -univer-translate-y-1/2 univer-cursor-pointer univer-items-center
- univer-justify-center univer-rounded univer-p-1 univer-text-xs
- univer-text-primary-600
- hover:univer-bg-gray-100
- group-hover:univer-flex
- dark:hover:!univer-bg-gray-600
- `}
- onClick={(e) => {
- e.stopPropagation();
- closeInsertOpenKeyEditor(definedName.id);
- }}
- >
- <PenIcon />
- </a>
- </Tooltip>
- <Tooltip title={localeService.t('definedName.deleteButton')} placement="top">
- <a
- className={`
- univer-text-error univer-absolute univer-right-5 univer-top-1/2 univer-hidden
- -univer-translate-y-1/2 univer-cursor-pointer univer-items-center
- univer-justify-center univer-rounded univer-p-1 univer-text-xs
- univer-text-red-600
- hover:univer-bg-gray-100
- group-hover:univer-flex
- dark:hover:!univer-bg-gray-600
- `}
- onClick={(e) => {
- e.stopPropagation();
- deleteDefinedName(definedName.id);
- }}
- >
- <DeleteIcon />
- </a>
- </Tooltip>
+ <div
+ className={`
+ univer-absolute univer-right-5 univer-top-1/2 univer-hidden
+ -univer-translate-y-1/2 univer-cursor-pointer univer-items-center
+ univer-justify-end univer-gap-7 univer-text-xs univer-text-primary-600
+ group-hover:univer-flex
+ dark:hover:!univer-bg-gray-600
+ `}
+ >
+ <Tooltip title={localeService.t('definedName.updateButton')} placement="top">
+ <a
+ className={`
+ univer-rounded univer-p-1
+ hover:univer-bg-gray-100
+ `}
+ onClick={(e) => {
+ e.stopPropagation();
+ closeInsertOpenKeyEditor(definedName.id);
+ }}
+ >
+ <PenIcon />
+ </a>
+ </Tooltip>
+ <Tooltip title={localeService.t('definedName.deleteButton')} placement="top">
+ <a
+ className={`
+ univer-rounded univer-p-1 univer-text-red-600
+ hover:univer-bg-gray-100
+ `}
+ onClick={(e) => {
+ e.stopPropagation();
+ deleteDefinedName(definedName.id);
+ }}
+ >
+ <DeleteIcon />
+ </a>
+ </Tooltip>
+ </div>
+
</div>
<Confirm