Skip to content

fix(diff-editor): optimize diff editor model caching and disposal handing#3572

Merged
erha19 merged 3 commits intomainfrom
fix/editor-scroll-ux
Apr 23, 2024
Merged

fix(diff-editor): optimize diff editor model caching and disposal handing#3572
erha19 merged 3 commits intomainfrom
fix/editor-scroll-ux

Conversation

@erha19
Copy link
Copy Markdown
Member

@erha19 erha19 commented Apr 22, 2024

Types

  • 🐛 Bug Fixes

Background or solution

close #3561.

Kapture.2024-04-22.at.16.52.14.mp4

Changelog

optimize diff editor model caching and disposal handing

@erha19 erha19 requested review from Aaaaash, Ricbet and bytemain April 22, 2024 08:56
@railway-app
Copy link
Copy Markdown

railway-app Bot commented Apr 22, 2024

This PR was not deployed automatically as @erha19 does not have access to the Railway project.

In order to get automatic PR deploys, please add @erha19 to the project inside the project settings page.

@opensumi opensumi Bot added the 🐞 bug Something isn't working label Apr 22, 2024
@erha19 erha19 force-pushed the fix/editor-scroll-ux branch from 8200f1d to 2ad415a Compare April 22, 2024 08:58
@erha19
Copy link
Copy Markdown
Member Author

erha19 commented Apr 22, 2024

/next

@erha19
Copy link
Copy Markdown
Member Author

erha19 commented Apr 22, 2024

/next

@opensumi
Copy link
Copy Markdown
Contributor

opensumi Bot commented Apr 22, 2024

🎉 PR Next publish successful!

2.27.3-next-1713777569.0

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 56.03%. Comparing base (340989b) to head (8dd93a0).
Report is 2 commits behind head on main.

Files Patch % Lines
...es/editor/src/browser/editor-collection.service.ts 11.76% 13 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3572   +/-   ##
=======================================
  Coverage   56.03%   56.03%           
=======================================
  Files        1489     1489           
  Lines       91191    91193    +2     
  Branches    18697    18698    +1     
=======================================
+ Hits        51098    51101    +3     
+ Misses      33248    33246    -2     
- Partials     6845     6846    +1     
Flag Coverage Δ
jsdom 51.42% <25.00%> (+<0.01%) ⬆️
node 15.62% <0.00%> (-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 erha19 merged commit 857c407 into main Apr 23, 2024
@erha19 erha19 deleted the fix/editor-scroll-ux branch April 23, 2024 02:10
modified,
});
const key = `${original.uri.toString()}-${modified.uri.toString()}`;
let model = this.diffEditorModelCache.get(key);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

还要再判断一下这个 model 是不是被 dispose 了,是的话要创建一个新的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The diff editor state should be restored when open again

3 participants