Skip to content

fix: layout view state logic and improve panel style#3344

Merged
bytemain merged 17 commits intomainfrom
fix/improve-layout-state
Feb 20, 2024
Merged

fix: layout view state logic and improve panel style#3344
bytemain merged 17 commits intomainfrom
fix/improve-layout-state

Conversation

@erha19
Copy link
Copy Markdown
Member

@erha19 erha19 commented Feb 18, 2024

Types

  • 🐛 Bug Fixes

Background or solution

Changelog

  • 优化部分面板样式,解决布局容器切换时存在的更新问题

@railway-app
Copy link
Copy Markdown

railway-app Bot commented Feb 18, 2024

This PR is being deployed to Railway 🚅

core: ◻️ REMOVED
sumi-rpc: ◻️ REMOVED

@opensumi opensumi Bot added 🐞 bug Something isn't working 💄 style change labels Feb 18, 2024
Comment thread packages/core-browser/src/services/storage-service.ts
Comment thread packages/main-layout/src/browser/tabbar/tabbar.service.ts Outdated
@erha19 erha19 force-pushed the fix/improve-layout-state branch from 3f33532 to 8a0dc38 Compare February 19, 2024 08:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (ca2777c) 58.03% compared to head (4f7c1cb) 58.07%.

Files Patch % Lines
...-layout/src/browser/accordion/accordion.service.ts 50.00% 21 Missing ⚠️
packages/main-layout/src/browser/tabbar-handler.ts 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3344      +/-   ##
==========================================
+ Coverage   58.03%   58.07%   +0.03%     
==========================================
  Files        1372     1372              
  Lines       85743    85754      +11     
  Branches    17734    17739       +5     
==========================================
+ Hits        49762    49798      +36     
+ Misses      32714    32694      -20     
+ Partials     3267     3262       -5     
Flag Coverage Δ
jsdom 52.87% <68.05%> (+0.03%) ⬆️
node 17.67% <1.38%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erha19
Copy link
Copy Markdown
Member Author

erha19 commented Feb 20, 2024

纯前端集成需要修改的内容:

  1. 文件名修改
- import { IRPCProtocol, RPCProtocol } from '@opensumi/ide-connection/lib/common/rpcProtocol';
+ import { IRPCProtocol, RPCProtocol } from '@opensumi/ide-connection/lib/common/ext-rpc-protocol';
  1. 依赖升级
    "react-dom": "^18.2.0",
    "react": "^18.2.0",
    "mobx": "^6.12.0",
    "mobx-react-lite": "^4.0.5",

需要保障 react 及 mobx 等依赖仅有一份

  1. 如果使用 Webpack4,可移除多余的 external 配置
- externals: {
-    react: 'React',
-    'react-dom': 'ReactDOM',
- },
  1. 修改集成中使用的所有 ReactDOM.render 写法,采用 ReactDOM.createRoot 替代

  2. 纯前端 Render 层如自定义,需要修改,渲染函数从 React.ReactNode 修改为了 (props) => React.ReactNode

  3. 使用了 mobx 的地方需要在 construction 阶段调用一下 makeObservable(this);

Comment thread packages/main-layout/src/browser/tabbar/styles.module.less Outdated
@bytemain bytemain merged commit 0a9562e into main Feb 20, 2024
@bytemain bytemain deleted the fix/improve-layout-state branch February 20, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working 💄 style change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants