Skip to content

fix: initView and load extensions after workbench be ready#853

Merged
wewoor merged 2 commits into
mainfrom
fix/monacoService
Jun 12, 2023
Merged

fix: initView and load extensions after workbench be ready#853
wewoor merged 2 commits into
mainfrom
fix/monacoService

Conversation

@wewoor

@wewoor wewoor commented Jun 12, 2023

Copy link
Copy Markdown
Collaborator

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

codecov Bot commented Jun 12, 2023

Copy link
Copy Markdown

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.

@mortalYoung mortalYoung left a comment

Copy link
Copy Markdown
Collaborator

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