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.

test(sheet): add autofill test & interaction (#468)

YuHongb7a25cc9d416
diff --git a/packages/base-sheets/src/basics/selection.ts b/packages/base-sheets/src/basics/selection.ts
index 5d669490a2..737c61a06a 100644
--- a/packages/base-sheets/src/basics/selection.ts
+++ b/packages/base-sheets/src/basics/selection.ts
@@ -9,7 +9,7 @@ import {
ThemeService,
} from '@univerjs/core';
-export const SELECTION_CONTROL_BORDER_BUFFER_WIDTH = 4; // The draggable range of the selection is too thin, making it easy for users to miss. Therefore, a buffer gap is provided to make it easier for users to select.
+export const SELECTION_CONTROL_BORDER_BUFFER_WIDTH = 2; // The draggable range of the selection is too thin, making it easy for users to miss. Therefore, a buffer gap is provided to make it easier for users to select.
export const SELECTION_CONTROL_BORDER_BUFFER_COLOR = 'rgba(255,255,255, 0.01)';
diff --git a/packages/ui-plugin-sheets/src/commands/commands/__tests__/auto-fill.controller.spec.ts b/packages/ui-plugin-sheets/src/commands/commands/__tests__/auto-fill.controller.spec.ts
new file mode 100644
index 0000000000..7fd760e00b
--- /dev/null
+++ b/packages/ui-plugin-sheets/src/commands/commands/__tests__/auto-fill.controller.spec.ts
@@ -0,0 +1,393 @@
+/* eslint-disable no-magic-numbers */
+
+import {
+ AddWorksheetMergeMutation,
+ RemoveWorksheetMergeMutation,
+ SetRangeValuesMutation,
+ SetSelectionsOperation,
+} from '@univerjs/base-sheets';
+import { createCommandTestBed } from '@univerjs/base-sheets/commands/commands/__tests__/create-command-test-bed.js';
+import {
+ CellValueType,
+ ICommandService,
+ IUniverInstanceService,
+ LocaleType,
+ RedoCommand,
+ ThemeService,
+ UndoCommand,
+ Univer,
+} from '@univerjs/core';
+import { Injector } from '@wendellhu/redi';
+import { beforeEach, describe, expect, it } from 'vitest';
+
+import { AutoFillController } from '../../../controllers/auto-fill.controller';
+import { AutoFillService, IAutoFillService } from '../../../services/auto-fill/auto-fill.service';
+import { ISelectionRenderService, SelectionRenderService } from '../../../services/selection/selection-render.service';
+
+const theme = {
+ colorBlack: '#35322b',
+};
+
+const TEST_WORKBOOK_DATA = {
+ id: 'test',
+ appVersion: '3.0.0-alpha',
+ sheets: {
+ sheet1: {
+ id: 'sheet1',
+ cellData: {
+ // Single Number
+ '0': {
+ '0': {
+ v: 1,
+ m: '1',
+ t: CellValueType.NUMBER,
+ },
+ '1': {
+ v: 2,
+ m: '2',
+ t: CellValueType.NUMBER,
+ },
+ },
+ // Single Number. descending
+ '1': {
+ '0': {
+ v: 2,
+ m: '2',
+ t: CellValueType.NUMBER,
+ },
+ '1': {
+ v: 1,
+ m: '1',
+ t: CellValueType.NUMBER,
+ },
+ },
+ // Extend Number
+ '2': {
+ '0': {
+ v: '第1',
+ m: '第1',
+ t: CellValueType.STRING,
+ },
+ '1': {
+ v: '第2',
+ m: '第2',
+ t: CellValueType.STRING,
+ },
+ },
+ // Chinese Number
+ '3': {
+ '0': {
+ v: '一',
+ m: '一',
+ t: CellValueType.STRING,
+ },
+ '1': {
+ v: '三',
+ m: '三',
+ t: CellValueType.STRING,
+ },
+ },
+ // Chinese Week
+ '4': {
+ '0': {
+ v: '星期一',
+ m: '星期一',
+ t: CellValueType.STRING,
+ },
+ '1': {
+ v: '星期三',
+ m: '星期三',
+ t: CellValueType.STRING,
+ },
+ },
+ // Loop Series
+ '5': {
+ '0': {
+ v: '甲',
+ m: '甲',
+ t: CellValueType.STRING,
+ },
+ '1': {
+ v: '乙',
+ m: '乙',
+ t: CellValueType.STRING,
+ },
+ },
+ // Other String
+ '6': {
+ '0': {
+ v: 'copy only',
+ m: 'copy only',
+ t: CellValueType.STRING,
+ },
+ '1': {
+ v: 'no series',
+ m: 'no series',
+ t: CellValueType.STRING,
+ },
+ },
+ // Mixed Mode
+ '7': {
+ '0': {
+ v: 1,
+ m: '1',
+ t: CellValueType.NUMBER,
+ },
+ '1': {
+ v: 2,
+ m: '2',
+ t: CellValueType.NUMBER,
+ },
+ '2': {
+ v: '第1',
+ m: '第1',
+ t: CellValueType.STRING,
+ },
+ '3': {
+ v: '第2',
+ m: '第2',
+ t: CellValueType.STRING,
+ },
+ },
+ },
+ },
+ },
+ createdTime: '',
+ creator: '',
+ lastModifiedBy: '',
+ locale: LocaleType.EN_US,
+ modifiedTime: '',
+ name: '',
+ sheetOrder: [],
+ styles: {},
+ timeZone: '',
+};
+
+describe('Test auto fill rules in controller', () => {
+ let univer: Univer;
+ let get: Injector['get'];
+ let commandService: ICommandService;
+ let autoFillController: AutoFillController;
+ let themeService: ThemeService;
+ beforeEach(() => {
+ const testBed = createCommandTestBed(TEST_WORKBOOK_DATA, [
+ [ISelectionRenderService, { useClass: SelectionRenderService }],
+ [IAutoFillService, { useClass: AutoFillService }],
+ [AutoFillController],
+ ]);
+ univer = testBed.univer;
+ get = testBed.get;
+
+ commandService = get(ICommandService);
+ themeService = get(ThemeService);
+ themeService.setTheme(theme);
+ autoFillController = get(AutoFillController);
+ commandService.registerCommand(SetRangeValuesMutation);
+ commandService.registerCommand(SetSelectionsOperation);
+ commandService.registerCommand(RemoveWorksheetMergeMutation);
+ commandService.registerCommand(AddWorksheetMergeMutation);
+ });
+
+ describe('auto fill', () => {
+ describe('auto fill the numbers', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test number
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 0,
+ startColumn: 0,
+ endRow: 0,
+ endColumn: 1,
+ },
+ {
+ startRow: 0,
+ startColumn: 0,
+ endRow: 0,
+ endColumn: 3,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(0, 2)?.v).toBe(3);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(0, 3)?.v).toBe(4);
+ // test number. descending
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 1,
+ startColumn: 0,
+ endRow: 1,
+ endColumn: 1,
+ },
+ {
+ startRow: 1,
+ startColumn: 0,
+ endRow: 1,
+ endColumn: 3,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(1, 2)?.v).toBe(0);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(1, 3)?.v).toBe(-1);
+ });
+ });
+
+ describe('auto fill the extend numbers', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test extend number
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 2,
+ startColumn: 0,
+ endRow: 2,
+ endColumn: 1,
+ },
+ {
+ startRow: 2,
+ startColumn: 0,
+ endRow: 2,
+ endColumn: 3,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(2, 2)?.v).toBe('第3');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(2, 3)?.v).toBe('第4');
+ });
+ });
+
+ describe('auto fill the chinese numbers', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test chinese number
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 3,
+ startColumn: 0,
+ endRow: 3,
+ endColumn: 2,
+ },
+ {
+ startRow: 3,
+ startColumn: 0,
+ endRow: 3,
+ endColumn: 4,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(3, 3)?.v).toBe('五');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(3, 4)?.v).toBe('日');
+ });
+ });
+
+ describe('auto fill the chinese week', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+
+ // test chinese week
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 4,
+ startColumn: 0,
+ endRow: 4,
+ endColumn: 2,
+ },
+ {
+ startRow: 4,
+ startColumn: 0,
+ endRow: 4,
+ endColumn: 4,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(4, 3)?.v).toBe('星期五');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(4, 4)?.v).toBe('星期日');
+ });
+ });
+
+ describe('auto fill the loop series', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test loop series
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 5,
+ startColumn: 0,
+ endRow: 5,
+ endColumn: 1,
+ },
+ {
+ startRow: 5,
+ startColumn: 0,
+ endRow: 5,
+ endColumn: 3,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(5, 2)?.v).toBe('丙');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(5, 3)?.v).toBe('丁');
+ });
+ });
+
+ describe('auto fill the other string', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test other string
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 6,
+ startColumn: 0,
+ endRow: 6,
+ endColumn: 1,
+ },
+ {
+ startRow: 6,
+ startColumn: 0,
+ endRow: 6,
+ endColumn: 3,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(6, 2)?.v).toBe('copy only');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(6, 3)?.v).toBe('no series');
+ });
+ });
+
+ describe('auto fill the mixed mode', async () => {
+ it('correct situation', async () => {
+ const workbook = get(IUniverInstanceService).getCurrentUniverSheetInstance();
+ if (!workbook) throw new Error('This is an error');
+ // test mixed mode
+ (autoFillController as any)._handleFillDrag(
+ {
+ startRow: 7,
+ startColumn: 0,
+ endRow: 7,
+ endColumn: 3,
+ },
+ {
+ startRow: 7,
+ startColumn: 0,
+ endRow: 7,
+ endColumn: 7,
+ }
+ );
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 4)?.v).toBe(3);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 5)?.v).toBe(4);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 6)?.v).toBe('第3');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 7)?.v).toBe('第4');
+
+ // undo redo
+ await commandService.executeCommand(UndoCommand.id);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 4)?.v).toBe(undefined);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 5)?.v).toBe(undefined);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 6)?.v).toBe(undefined);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 7)?.v).toBe(undefined);
+
+ await commandService.executeCommand(RedoCommand.id);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 4)?.v).toBe(3);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 5)?.v).toBe(4);
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 6)?.v).toBe('第3');
+ expect(workbook.getSheetBySheetId('sheet1')?.getCell(7, 7)?.v).toBe('第4');
+ });
+ });
+ });
+});
diff --git a/packages/ui-plugin-sheets/src/controllers/auto-fill.controller.ts b/packages/ui-plugin-sheets/src/controllers/auto-fill.controller.ts
index 22be9da8ff..e262e10cc7 100644
--- a/packages/ui-plugin-sheets/src/controllers/auto-fill.controller.ts
+++ b/packages/ui-plugin-sheets/src/controllers/auto-fill.controller.ts
@@ -48,6 +48,37 @@ export class AutoFillController extends Disposable {
this._init();
}
+ private _handleFillDrag(sourceRange: IRange, destRange: IRange) {
+ // situation 1: drag to smaller range, horizontally.
+ if (destRange.endColumn < sourceRange.endColumn && destRange.endColumn > sourceRange.startColumn) {
+ this._commandService.executeCommand(AutoClearContentCommand.id, {
+ clearRange: {
+ startRow: destRange.startRow,
+ endRow: destRange.endRow,
+ startColumn: destRange.endColumn + 1,
+ endColumn: sourceRange.endColumn,
+ },
+ selectionRange: destRange,
+ });
+ return;
+ }
+ // situation 2: drag to smaller range, vertically.
+ if (destRange.endRow < sourceRange.endRow && destRange.endRow > sourceRange.startRow) {
+ this._commandService.executeCommand(AutoClearContentCommand.id, {
+ clearRange: {
+ startRow: destRange.endRow + 1,
+ endRow: sourceRange.endRow,
+ startColumn: destRange.startColumn,
+ endColumn: destRange.endColumn,
+ },
+ selectionRange: destRange,
+ });
+ return;
+ }
+ // situation 3: drag to larger range, expand to fill
+ this._presetAndCacheData(sourceRange, destRange);
+ }
+
private _init() {
this._onSelectionControlFillChanged();
this._onApplyTypeChanged();
@@ -111,37 +142,6 @@ export class AutoFillController extends Disposable {
);
}
- private _handleFillDrag(sourceRange: IRange, destRange: IRange) {
- // situation 1: drag to smaller range, horizontally.
- if (destRange.endColumn < sourceRange.endColumn && destRange.endColumn > sourceRange.startColumn) {
- this._commandService.executeCommand(AutoClearContentCommand.id, {
- clearRange: {
- startRow: destRange.startRow,
- endRow: destRange.endRow,
- startColumn: destRange.endColumn + 1,
- endColumn: sourceRange.endColumn,
- },
- selectionRange: destRange,
- });
- return;
- }
- // situation 2: drag to smaller range, vertically.
- if (destRange.endRow < sourceRange.endRow && destRange.endRow > sourceRange.startRow) {
- this._commandService.executeCommand(AutoClearContentCommand.id, {
- clearRange: {
- startRow: destRange.endRow + 1,
- endRow: sourceRange.endRow,
- startColumn: destRange.startColumn,
- endColumn: destRange.endColumn,
- },
- selectionRange: destRange,
- });
- return;
- }
- // situation 3: drag to larger range, expand to fill
- this._presetAndCacheData(sourceRange, destRange);
- }
-
// refill when apply type changed
private _onApplyTypeChanged() {
this.disposeWithMe(
diff --git a/packages/ui-plugin-sheets/src/services/auto-fill/rules.ts b/packages/ui-plugin-sheets/src/services/auto-fill/rules.ts
index 5dc5f42fd7..a58feb03bf 100644
--- a/packages/ui-plugin-sheets/src/services/auto-fill/rules.ts
+++ b/packages/ui-plugin-sheets/src/services/auto-fill/rules.ts
@@ -293,7 +293,14 @@ export const loopSeriesRule: IAutoFillRule = {
const isReverse = direction === Direction.LEFT || direction === Direction.UP;
const { series } = getLoopSeriesInfo(data[0]?.m || '');
if (data.length === 1) {
- return fillCopy(data, len);
+ let step;
+ if (!isReverse) {
+ step = 1;
+ } else {
+ step = -1;
+ }
+
+ return fillLoopSeries(data, len, step, series);
}
const dataNumArr = [];
let cycleIndex = 0;
diff --git a/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx b/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
index 797519fe7c..3155545953 100644
--- a/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
+++ b/packages/ui-plugin-sheets/src/views/operate-container/AutoFillPopupMenu.tsx
@@ -1,8 +1,10 @@
import { IRenderManagerService } from '@univerjs/base-render';
+import { SetRangeValuesMutation } from '@univerjs/base-sheets';
import { ICommandInfo, ICommandService, IUniverInstanceService, LocaleService, toDisposable } from '@univerjs/core';
import { Dropdown } from '@univerjs/design';
import { Autofill, CheckMarkSingle, MoreDownSingle } from '@univerjs/icons';
import { useDependency } from '@wendellhu/redi/react-bindings';
+import clsx from 'clsx';
import React, { useCallback, useEffect, useState } from 'react';
import {
@@ -13,6 +15,7 @@ import {
import { RefillCommand } from '../../commands/commands/refill.command';
import { SetCellEditVisibleOperation } from '../../commands/operations/cell-edit.operation';
import { SetScrollOperation } from '../../commands/operations/scroll.operation';
+import { SetZoomRatioOperation } from '../../commands/operations/set-zoom-ratio.operation';
import { getSheetObject } from '../../controllers/utils/component-tools';
import { IAutoFillService } from '../../services/auto-fill/auto-fill.service';
import { APPLY_TYPE } from '../../services/auto-fill/type';
@@ -50,6 +53,15 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
const [visible, setVisible] = useState(false);
const [anchor, setAnchor] = useState<IAnchorPoint>({ row: -1, col: -1 });
const [selected, setSelected] = useState<APPLY_TYPE>(APPLY_TYPE.SERIES);
+ const [isHovered, setHovered] = useState(false);
+
+ const handleMouseEnter = () => {
+ setHovered(true);
+ };
+
+ const handleMouseLeave = () => {
+ setHovered(false);
+ };
const forceUpdate = useUpdate();
const sheetObject = getSheetObject(currentUniverService, renderManagerService);
@@ -60,6 +72,12 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
const { scene } = sheetObject;
useEffect(() => {
+ const endCommands = [
+ SetCellEditVisibleOperation.id,
+ AutoClearContentCommand.id,
+ SetZoomRatioOperation.id,
+ SetRangeValuesMutation.id,
+ ];
const disposable = commandService.onCommandExecuted((command: ICommandInfo) => {
if (command.id === AutoFillCommand.id) {
const { endColumn, endRow } = (command?.params as IAutoFillCommandParams).selectionRange;
@@ -68,7 +86,7 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
if (command.id === SetScrollOperation.id) {
forceUpdate();
}
- if (command.id === SetCellEditVisibleOperation.id || command.id === AutoClearContentCommand.id) {
+ if (endCommands.includes(command.id)) {
setAnchor({ row: -1, col: -1 });
}
});
@@ -107,6 +125,7 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
const relativeX = skeleton?.convertTransformToOffsetX(x, scaleX, scrollXY);
const relativeY = skeleton?.convertTransformToOffsetY(y, scaleY, scrollXY);
+ if (relativeX == null || relativeY == null) return null;
const onVisibleChange = (visible: boolean) => {
setVisible(visible);
};
@@ -115,28 +134,35 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
commandService.executeCommand(RefillCommand.id, { type: item.value });
};
+ const showMore = visible || isHovered;
+
const availableMenu = menu.filter((item) => !item.disable);
+
return (
- <div style={{ left: `${relativeX}px`, top: `${relativeY}px`, position: 'absolute' }}>
+ <div
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
+ style={{ left: `${relativeX + 2}px`, top: `${relativeY + 2}px`, position: 'absolute' }}
+ >
<Dropdown
placement="bottomLeft"
trigger={['click']}
overlay={
- <ul className={styles.AutoFillPopupMenu} style={{ ...styles }}>
+ <ul className={styles.autoFillPopupMenu}>
{availableMenu.map((item) => (
<li
key={item.index}
onClick={() => handleClick(item)}
- className={styles.AutoFillPopupMenuItem}
+ className={styles.autoFillPopupMenuItem}
>
- <span className={styles.AutoFillPopupMenuItemIcon}>
+ <span className={styles.autoFillPopupMenuItemIcon}>
{item.value === selected ? (
<CheckMarkSingle style={{ color: 'rgb(var(--green-700, #409f11))' }} />
) : (
''
)}
</span>
- <span className={styles.AutoFillPopupMenuItemTitle}>{localeService.t(item.label)}</span>
+ <span className={styles.autoFillPopupMenuItemTitle}>{localeService.t(item.label)}</span>
</li>
))}
</ul>
@@ -144,12 +170,20 @@ export const AutoFillPopupMenu: React.FC<{}> = () => {
visible={visible}
onVisibleChange={onVisibleChange}
>
- <div className={styles.btnContainer}>
+ <div
+ className={clsx(styles.btnContainer, {
+ [styles.btnContainerExpand]: visible,
+ })}
+ >
<Autofill
- style={{ color: '#35322B', marginRight: '8px' }}
+ style={{ color: '#35322B' }}
extend={{ colorChannel1: 'rgb(var(--green-700, #409f11))' }}
></Autofill>
- <MoreDownSingle style={{ color: '#CCCCCC', fontSize: '8px' }}></MoreDownSingle>
+ {showMore && (
+ <MoreDownSingle
+ style={{ color: '#CCCCCC', fontSize: '8px', marginLeft: '8px' }}
+ ></MoreDownSingle>
+ )}
</div>
</Dropdown>
</div>
diff --git a/packages/ui-plugin-sheets/src/views/operate-container/index.module.less b/packages/ui-plugin-sheets/src/views/operate-container/index.module.less
index 08a67039bd..2d0cec28cd 100644
--- a/packages/ui-plugin-sheets/src/views/operate-container/index.module.less
+++ b/packages/ui-plugin-sheets/src/views/operate-container/index.module.less
@@ -9,15 +9,15 @@
}
@item-padding-left: 36px;
-@smart-button-menu-min-width: 128px;
+@auto-fill-popup-menu-min-width: 128px;
-.smart-button-menu {
+.auto-fill-popup-menu {
display: grid;
gap: var(--margin-xxs);
align-items: center;
box-sizing: border-box;
- min-width: @smart-button-menu-min-width;
+ min-width: @auto-fill-popup-menu-min-width;
margin-top: 0;
margin-bottom: 0;
padding: var(--padding-sm);
@@ -93,8 +93,7 @@
align-items: center;
justify-content: center;
- width: 56px;
- height: 32px;
+ padding: 3px;
background: white;
border: 1px solid rgb(var(--grey-200, #E5E5E5));
@@ -103,4 +102,8 @@
&:hover {
background: rgb(var(--grey-100, #f5f5f5));
}
+
+ &.btn-container-expand {
+ background: rgb(var(--grey-100, #f5f5f5));
+ }
}
diff --git a/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx b/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
index 11ec47e034..c156a62d26 100644
--- a/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
+++ b/packages/ui-plugin-sheets/src/views/status-bar/StatusBar.tsx
@@ -136,6 +136,7 @@ export const StatusBar = () => {
<MoreSingle />
</div>
</Dropdown>
+ <div className={styles.statusBarDiv}></div>
</div>
)
);
diff --git a/packages/ui-plugin-sheets/src/views/status-bar/index.module.less b/packages/ui-plugin-sheets/src/views/status-bar/index.module.less
index 3c1c39dcc4..af4efb96ce 100644
--- a/packages/ui-plugin-sheets/src/views/status-bar/index.module.less
+++ b/packages/ui-plugin-sheets/src/views/status-bar/index.module.less
@@ -10,6 +10,14 @@
}
}
+.status-bar-div {
+ width: 1px;
+ height: 16px;
+ margin-left: 10px;
+ background: rgb(var(--grey-400, #CCC));
+
+}
+
.statistic {
&-list {
display: flex;
@@ -42,7 +50,7 @@
font-weight: 400;
font-style: normal;
line-height: 20px; /* 181.818% */
- color: rgb(var(--grey-600));
+ color: rgb(var(--grey-1000));
text-align: center;
}
@@ -80,9 +88,11 @@
height: 24px;
font-size: 12px;
+ color: rgb(var(--grey-600, #E8E8E8));
border-radius: 4px;
+
&:hover {
background: rgb(var(--grey-300, #E8E8E8));
}