DTStack / molecule

:rocket: A lightweight Web IDE UI framework.
https://dtstack.github.io/molecule/
Other
891 stars 129 forks source link

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

Closed wewoor closed 1 year ago

wewoor commented 1 year ago

Description

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

Fixes #852

Changes

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.07 :warning:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/DTStack/molecule/pull/853?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DTStack) | Coverage Δ | | |---|---|---| | [src/components/monaco/index.tsx](https://app.codecov.io/gh/DTStack/molecule/pull/853?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DTStack#diff-c3JjL2NvbXBvbmVudHMvbW9uYWNvL2luZGV4LnRzeA==) | `100.00% <100.00%> (ø)` | | | [src/services/instanceService.tsx](https://app.codecov.io/gh/DTStack/molecule/pull/853?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DTStack#diff-c3JjL3NlcnZpY2VzL2luc3RhbmNlU2VydmljZS50c3g=) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/DTStack/molecule/pull/853/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DTStack)

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