Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui)!: prevent formula bar from displaying when header is set to false & remove unused code #1633

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ univer.registerPlugin(UniverRenderEngine);
univer.registerPlugin(UniverUI, {
container: 'univer-container', // where to mount the UI
header: true,
toolbar: true,
footer: true,
});
univer.registerPlugin(sheetsPlugin);
Expand Down
1 change: 0 additions & 1 deletion examples/src/docs-uniscript/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
univer.registerPlugin(UniverUIPlugin, {
container: 'app',
header: true,
toolbar: true,
});

univer.registerPlugin(UniverDocsPlugin, {
Expand All @@ -66,7 +65,7 @@
univer.createUniverDoc(DEFAULT_DOCUMENT_DATA_CN);

declare global {
interface Window {

Check warning on line 68 in examples/src/docs-uniscript/main.ts

View workflow job for this annotation

GitHub Actions / eslint

Interface name `Window` must match the RegExp: /^I[A-Z0-9]/u
univer?: Univer;
}
}
Expand Down
1 change: 0 additions & 1 deletion examples/src/docs/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ univer.registerPlugin(DebuggerPlugin);
univer.registerPlugin(UniverUIPlugin, {
container: 'app',
header: true,
toolbar: true,
});
univer.registerPlugin(UniverDocsPlugin, {
standalone: true,
Expand Down
1 change: 0 additions & 1 deletion examples/src/sheets-multi/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function factory(id: string) {
univer.registerPlugin(UniverUIPlugin, {
container: id,
header: true,
toolbar: true,
footer: true,
});
univer.registerPlugin(UniverDocsPlugin, {
Expand Down
1 change: 0 additions & 1 deletion examples/src/sheets-uniscript/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ univer.registerPlugin(UniverRenderEnginePlugin);
univer.registerPlugin(UniverUIPlugin, {
container: 'app',
header: true,
toolbar: true,
footer: true,
});

Expand Down
1 change: 0 additions & 1 deletion examples/src/sheets/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ univer.registerPlugin(UniverRenderEnginePlugin);
univer.registerPlugin(UniverUIPlugin, {
container: 'app',
header: true,
toolbar: true,
footer: true,
});

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/sheets-ui/src/basics/const/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
* limitations under the License.
*/

export * from './default-univer-sheet-config';
export * from './plugin-name';
1 change: 0 additions & 1 deletion packages/sheets-ui/src/basics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
*/

export * from './const';
export * from './interfaces';
21 changes: 0 additions & 21 deletions packages/sheets-ui/src/basics/interfaces/cell.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions packages/sheets-ui/src/basics/interfaces/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import React from 'react';

import type { IUniverSheetsUIConfig } from '../../basics';
import { CountBar } from '../count-bar/CountBar';
import { EditorContainer } from '../editor-container/EditorContainer';
import { FormulaBar } from '../formula-bar/FormulaBar';
Expand All @@ -25,12 +24,6 @@ import { SheetBar } from '../sheet-bar/SheetBar';
import { StatusBar } from '../status-bar/StatusBar';
import styles from './index.module.less';

export interface IBaseSheetContainerProps {
config: IUniverSheetsUIConfig;
changeLocale: (locale: string) => void;
methods?: any;
}

export function RenderSheetFooter() {
return (
<section className={styles.sheetContainer} data-range-selector>
Expand All @@ -43,9 +36,7 @@ export function RenderSheetFooter() {

export function RenderSheetHeader() {
return (
<>
<FormulaBar />
</>
<FormulaBar />
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const DefaultToolbarConfig = {
};

export const DefaultSlideContainerConfig = {
outerLeft: false,
outerRight: false,
header: true,
footer: true,
innerLeft: false,
Expand All @@ -50,8 +48,6 @@ export const DefaultSlideContainerConfig = {
frozenHeaderRT: false,
frozenHeaderLM: false,
frozenContent: false,
infoBar: true,
toolbar: true,
};

export const DefaultSlideUIConfig = {
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/src/controllers/ui/ui.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ import { createIdentifier } from '@wendellhu/redi';
export interface IWorkbenchOptions {
container?: string | HTMLElement;

outerLeft?: boolean;
innerLeft?: boolean;
header?: boolean;
infoBar?: boolean;
toolbar?: boolean;
footer?: boolean;
}

Expand Down