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.

feat(ui)!: rename default ribbon type to collapsed (#6656)

白熱354490ec5216
diff --git a/examples/src/sheets/main.ts b/examples/src/sheets/main.ts
index 336ecbdf8b..205617ae26 100644
--- a/examples/src/sheets/main.ts
+++ b/examples/src/sheets/main.ts
@@ -126,7 +126,6 @@ function createNewInstance() {
[UniverRenderEnginePlugin],
[UniverUIPlugin, {
container: 'app',
- ribbonType: 'classic',
customFontFamily: {
list: [
{ value: 'PingFang SC', label: '苹方(简)', category: 'sans-serif' },
diff --git a/packages/ui/src/controllers/ui/ui.controller.ts b/packages/ui/src/controllers/ui/ui.controller.ts
index 6830246e2f..95924e31da 100644
--- a/packages/ui/src/controllers/ui/ui.controller.ts
+++ b/packages/ui/src/controllers/ui/ui.controller.ts
@@ -17,7 +17,7 @@
import type { IFontConfig } from '../../services/font.service';
import { createIdentifier } from '@univerjs/core';
-export type RibbonType = 'default' | 'simple' | 'classic';
+export type RibbonType = 'collapsed' | 'simple' | 'classic';
export interface IWorkbenchOptions {
container?: string | HTMLElement;
diff --git a/packages/ui/src/views/components/ribbon/Ribbon.tsx b/packages/ui/src/views/components/ribbon/Ribbon.tsx
index 85f051d7fa..4c7d4a8e0c 100644
--- a/packages/ui/src/views/components/ribbon/Ribbon.tsx
+++ b/packages/ui/src/views/components/ribbon/Ribbon.tsx
@@ -232,7 +232,7 @@ export function Ribbon(props: IRibbonProps) {
'univer-grid-cols-none': ribbon.length === 1,
}, borderBottomClassName)}
>
- {ribbonType === 'default' && ribbon.length > 1 && (
+ {ribbonType === 'collapsed' && ribbon.length > 1 && (
<DefaultMenu
ribbon={ribbon}
activatedTab={activatedTab}
diff --git a/packages/ui/src/views/workbench/Workbench.tsx b/packages/ui/src/views/workbench/Workbench.tsx
index 6f10857fdf..5f7c02fd4a 100644
--- a/packages/ui/src/views/workbench/Workbench.tsx
+++ b/packages/ui/src/views/workbench/Workbench.tsx
@@ -49,7 +49,7 @@ export function DesktopWorkbenchContent(props: IUniverWorkbenchProps) {
footer = true,
headerMenu = true,
contextMenu = true,
- ribbonType = 'default',
+ ribbonType = 'classic',
mountContainer,
onRendered,
} = props;