Skip to content

Conversation

@mortalYoung
Copy link
Collaborator

@mortalYoung mortalYoung commented May 10, 2022

简介

  • 重构生命周期

主要变更

  • 使用方式变更为如下:
const moInstance = create({
    extensions: customExtensions,
    defaultLocale: 'japanese',
});

// 在该钩子函数中对内置数据进行修改
moInstance.onBeforeInit(() => {
    molecule.builtin.inactiveModule('activityBarData');
});

export const IDEDemo = () => moInstance.render(<Workbench />);

Related Issues

Resolved #675

@mortalYoung mortalYoung self-assigned this May 10, 2022
@mortalYoung mortalYoung requested a review from wewoor May 10, 2022 11:11
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #733 (8c035fa) into main (05ad264) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #733      +/-   ##
==========================================
+ Coverage   91.34%   91.41%   +0.07%     
==========================================
  Files         189      191       +2     
  Lines        5947     5984      +37     
  Branches     1426     1440      +14     
==========================================
+ Hits         5432     5470      +38     
+ Misses        508      507       -1     
  Partials        7        7              
Impacted Files Coverage Δ
src/controller/settings.tsx 96.15% <ø> (-3.85%) ⬇️
src/i18n/localeService.ts 100.00% <100.00%> (ø)
src/model/settings.ts 100.00% <100.00%> (ø)
src/molecule.api.ts 100.00% <100.00%> (ø)
src/provider/create.ts 100.00% <100.00%> (ø)
src/provider/molecule.tsx 100.00% <100.00%> (ø)
src/services/instanceService.tsx 100.00% <100.00%> (ø)
src/services/settingsService.ts 100.00% <100.00%> (ø)
src/components/tabs/tab.tsx 100.00% <0.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05ad264...8c035fa. Read the comment docs.

@wewoor wewoor linked an issue May 11, 2022 that may be closed by this pull request
@mortalYoung mortalYoung force-pushed the refactor/lifecycle branch from c24f31b to 8f18be7 Compare May 18, 2022 03:42
@mortalYoung mortalYoung changed the title WIP: feat: create instanceService feat: create instanceService May 18, 2022
Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

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

把文档同步更新下,准备合并了

@mumiao mumiao self-requested a review June 2, 2022 03:58
Copy link
Collaborator

@wewoor wewoor 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 3093a21 into main Jun 7, 2022
@wewoor wewoor deleted the refactor/lifecycle branch June 7, 2022 07:44
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.

ReDesign the life cycle of Molecule instantiation

3 participants