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-formula): fix the issue of missing formula description list (#3323)

白熱9d314ce88f4c
diff --git a/packages/sheets-formula/src/formula-ui-plugin.ts b/packages/sheets-formula/src/formula-ui-plugin.ts
index 10fcd854c3..cfdae6d454 100644
--- a/packages/sheets-formula/src/formula-ui-plugin.ts
+++ b/packages/sheets-formula/src/formula-ui-plugin.ts
@@ -42,16 +42,18 @@ import { RefSelectionsRenderService } from './services/render-services/ref-selec
import { PromptController } from './controllers/prompt.controller';
import { IRemoteRegisterFunctionService, RemoteRegisterFunctionService, RemoteRegisterFunctionServiceName } from './services/remote/remote-register-function.service';
import type {
- IUniverSheetsFormulaBaseConfig, IUniverSheetsFormulaMobileConfig,
- IUniverSheetsFormulaRemoteConfig } from './controllers/config.schema';
+ IUniverSheetsFormulaBaseConfig,
+ IUniverSheetsFormulaMobileConfig,
+ IUniverSheetsFormulaRemoteConfig,
+} from './controllers/config.schema';
import {
- defaultPluginBaseConfig, defaultPluginMobileConfig,
-
- defaultPluginRemoteConfig
- , PLUGIN_CONFIG_KEY_BASE,
-
+ defaultPluginBaseConfig,
+ defaultPluginMobileConfig,
+ defaultPluginRemoteConfig,
+ PLUGIN_CONFIG_KEY_BASE,
PLUGIN_CONFIG_KEY_MOBILE,
- PLUGIN_CONFIG_KEY_REMOTE } from './controllers/config.schema';
+ PLUGIN_CONFIG_KEY_REMOTE,
+} from './controllers/config.schema';
@DependentOn(UniverFormulaEnginePlugin)
export class UniverRemoteSheetsFormulaPlugin extends Plugin {
diff --git a/packages/sheets-formula/src/services/description.service.ts b/packages/sheets-formula/src/services/description.service.ts
index ff2f9dffab..1f060d8337 100644
--- a/packages/sheets-formula/src/services/description.service.ts
+++ b/packages/sheets-formula/src/services/description.service.ts
@@ -258,9 +258,7 @@ export class DescriptionService implements IDescriptionService, IDisposable {
});
const config = this._configService.getConfig<IUniverSheetsFormulaBaseConfig>(PLUGIN_CONFIG_KEY_BASE);
- if (config?.description) {
- this._descriptions = filterFunctionList.concat(config.description);
- }
+ this._descriptions = filterFunctionList.concat(config?.description ?? []);
}
private _registerDescriptions() {
@@ -279,6 +277,7 @@ export class DescriptionService implements IDescriptionService, IDisposable {
repeat: item.repeat,
})),
}));
+
this._functionService.registerDescriptions(...functionListLocale);
}
}
diff --git a/packages/ui/src/views/components/ribbon/Ribbon.tsx b/packages/ui/src/views/components/ribbon/Ribbon.tsx
index 68bc50e939..ddba5e67ab 100644
--- a/packages/ui/src/views/components/ribbon/Ribbon.tsx
+++ b/packages/ui/src/views/components/ribbon/Ribbon.tsx
@@ -68,7 +68,7 @@ export function Ribbon(props: IRibbonProps) {
const toolbarWidth = toolbar.clientWidth;
const toolbarItems = Object.values(toolbarItemRefs.current);
const collapsedIds: string[] = [];
- let totalWidth = 58;
+ let totalWidth = 90;
for (const { el, key } of toolbarItems) {
if (!el) continue;