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

[Bug] Introducing any SheetBarCommand in sheet_bar causes the SheetBar style to be lost #18

Open
2 tasks done
wssnail opened this issue Nov 2, 2024 · 7 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@wssnail
Copy link

wssnail commented Nov 2, 2024

在您提交此问题之前,您是否检查了以下内容?

  • 这真的是个问题吗?
  • 我已经在 Github Issues 中搜索过了,但没有找到类似的问题。

受影响的包和版本

0.2.15,0.4.1,0.4.2

复现链接

https://stackblitz.com/edit/awesome-univer-sheets-vite-demo-tup1fb?file=src%2Fmain.ts

image

    1. As follows, an error will be reported only if the import is needed, and the import cannot be restored after the error is reported.
import {AddRangeProtectionFromToolbarCommand,
  UniverSheetsUIPlugin,
  // DeleteWorksheetProtectionFormSheetBarCommand,
  // ViewSheetPermissionFromSheetBarCommand,
  // ChangeSheetProtectionFromSheetBarCommand
} from '@univerjs/sheets-ui'
    1. However, no error occurs when configuring with real id, and the following configuration can work normally:
univer.registerPlugin(UniverSheetsUIPlugin, {
    menu:{
      'sheet.command.add-range-protection-from-sheet-bar': {
        hidden: true
      },
    }
  })

预期行为

I hope that actions against sheet_bar will not cause style errors

实际行为

When using the following import:

import {AddRangeProtectionFromToolbarCommand,
  UniverSheetsUIPlugin,
  // DeleteWorksheetProtectionFormSheetBarCommand,
  // ViewSheetPermissionFromSheetBarCommand,
  // ChangeSheetProtectionFromSheetBarCommand
} from '@univerjs/sheets-ui'

The following error will occur, And the table cannot be edited:
image

运行环境

Chrome

系统信息

vue3.5.3
vite4.5.5
univer0.4.2

@wssnail wssnail added the bug Something isn't working label Nov 2, 2024
@univer-bot
Copy link

univer-bot bot commented Nov 2, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: [Bug] Introducing any SheetBarCommand in sheet_bar causes the SheetBar style to be lost

Title: [Bug] Introducing any SheetBarCommand in sheet_bar causes the SheetBar style to be lost


Before you submitted this question, did you check the following?

  • Is this really a problem?
  • I've searched Github Issues but haven't found any similar issues.

Affected packages and versions

0.2.15,0.4.1,0.4.2

Recurrence link

https://stackblitz.com/edit/awesome-univer-sheets-vite-demo-tup1fb?file=src%2Fmain.ts

image

    1. As follows, an error will be reported only if the import is needed, and the import cannot be restored after the error is reported.
import {AddRangeProtectionFromToolbarCommand,
  UniverSheetsUIPlugin,
  // DeleteWorksheetProtectionFormSheetBarCommand,
  // ViewSheetPermissionFromSheetBarCommand,
  // ChangeSheetProtectionFromSheetBarCommand
} from '@univerjs/sheets-ui'
    1. However, no error occurs when configuring with real id, and the following configuration can work normally:
univer.registerPlugin(UniverSheetsUIPlugin, {
    menu:{
      'sheet.command.add-range-protection-from-sheet-bar': {
        hidden: true
      },
    }
  })

Expected behavior

I hope that actions against sheet_bar will not cause style errors

Actual behavior

When using the following import:

import {AddRangeProtectionFromToolbarCommand,
  UniverSheetsUIPlugin,
  // DeleteWorksheetProtectionFormSheetBarCommand,
  // ViewSheetPermissionFromSheetBarCommand,
  // ChangeSheetProtectionFromSheetBarCommand
} from '@univerjs/sheets-ui'

The following error will occur, And the table cannot be edited:
image

Running environment

Chrome

System information

vue3.5.3
vite4.5.5
univer0.4.2

@jikkai
Copy link
Member

jikkai commented Nov 2, 2024

The code snippet you've shared isn't enough for us to diagnose the problem. You'll need to provide a minimal reproduction for us to assist further.

@jikkai jikkai removed the bug Something isn't working label Nov 2, 2024
@univer-bot univer-bot bot added the bug Something isn't working label Nov 4, 2024
@wssnail
Copy link
Author

wssnail commented Nov 4, 2024

The code snippet you've shared isn't enough for us to diagnose the problem. You'll need to provide a minimal reproduction for us to assist further.

已经补充了复现链接

@univer-bot
Copy link

univer-bot bot commented Nov 4, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

The code snippet you've shared isn't enough for us to diagnose the problem. You'll need to provide a minimal reproduction for us to assist further.

Recurrence link has been added

@jikkai jikkai transferred this issue from dream-num/univer Nov 4, 2024
@jikkai
Copy link
Member

jikkai commented Nov 4, 2024

It seems to be a bug with univer plugins, now transferred to dream-num/univer-plugins.

If you want a quick solution, you can manually add a line import '@univerjs/sheets-ui/lib/index.css'

@wssnail
Copy link
Author

wssnail commented Nov 5, 2024

It seems to be a bug with univer plugins, now transferred to dream-num/univer-plugins.

If you want a quick solution, you can manually add a line import '@univerjs/sheets-ui/lib/index.css'

Thank you,import '@univerjs/sheets-ui/lib/index.css' works fine

@wssnail wssnail closed this as completed Nov 5, 2024
@jikkai
Copy link
Member

jikkai commented Nov 5, 2024

This issue isn't actually resolved. I'm reopening it until we fix the problem

@jikkai jikkai reopened this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants