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: initView and load extensions after workbench be ready #853

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

wewoor
Copy link
Collaborator

@wewoor wewoor commented Jun 12, 2023

Description

修复 monacoService 无法初始化的问题。由于layout.contaier 依赖 Workbench 对象,所以需要等 Workbench Ready 后,才能初始化 monacoService 已经相关插件,否则,布局会以 document.body 作为根容器,这样在嵌入式 Workbench 布局的中,会出现类似 CommandPalette 位置异常的问题。

Fixes #852

Changes

  • 移动 initView, extension.load 逻辑到 onWorkbenchDidMount 中

@wewoor wewoor requested a review from mortalYoung June 12, 2023 10:08
@wewoor wewoor changed the title Fix/monaco service fix: initView and load extensions after workbench be ready Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.07 ⚠️

Comparison is base (122eff9) 91.06% compared to head (da1a6d1) 91.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #853      +/-   ##
==========================================
- Coverage   91.06%   91.00%   -0.07%     
==========================================
  Files         188      188              
  Lines        6078     6080       +2     
  Branches     1476     1478       +2     
==========================================
- Hits         5535     5533       -2     
- Misses        537      541       +4     
  Partials        6        6              
Impacted Files Coverage Δ
src/components/monaco/index.tsx 100.00% <100.00%> (ø)
src/services/instanceService.tsx 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@mortalYoung mortalYoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wewoor wewoor merged commit 567f629 into main Jun 12, 2023
@wewoor wewoor deleted the fix/monacoService branch June 12, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: MonacoService throws Errors when creating instance
2 participants