Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editor): editor save code action notify configuration #2580

Merged

Conversation

shilin8805
Copy link
Contributor

@shilin8805 shilin8805 commented Apr 13, 2023

Types

  • 🎉 New Features

Background or solution

编辑器模块执行saveCodeActions时默认会弹出Notification提示,新增配置可选是否弹窗提示。

🤖 Generated by Copilot at d1fc800

  • Add a new preference option editor.codeActionsOnSaveNotification to control the notification of code actions on save (link, link, link, link, link)
  • Extract the logic of running code actions on save into a separate function runActions in saveParticipants.ts (link)
  • Add a null check for the progress parameter in runActions to handle the case when the notification preference is false (link)
  • Add the schema definition for the new preference option in schema.ts (link)
  • Add the localization strings for the new preference option and its category in en-US.lang.ts and zh-CN.lang.ts (link, link, link, link)
  • Add the new preference option and its category to the preferenceSettingsService in preference-settings.service.ts (link)

Changelog

🤖 Generated by Copilot at d1fc800

This pull request adds a new preference option to control the notification behavior of code actions on save in the editor. It also updates the localization files and the preference UI to support the new option. It refactors and fixes some code related to save participants in saveParticipants.ts.

@opensumi opensumi bot added 🎨 feature feature required ⚙️ refactor Refactor code 🐞 bug Something isn't working labels Apr 13, 2023
packages/i18n/src/common/zh-CN.lang.ts Outdated Show resolved Hide resolved
packages/i18n/src/common/zh-CN.lang.ts Outdated Show resolved Hide resolved
packages/i18n/src/common/zh-CN.lang.ts Outdated Show resolved Hide resolved
packages/i18n/src/common/zh-CN.lang.ts Outdated Show resolved Hide resolved
@erha19
Copy link
Member

erha19 commented Apr 13, 2023

/publish

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (97652f3) 57.62% compared to head (c157f96) 57.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2580   +/-   ##
=======================================
  Coverage   57.62%   57.62%           
=======================================
  Files        1326     1326           
  Lines       83566    83559    -7     
  Branches    17399    17402    +3     
=======================================
+ Hits        48151    48154    +3     
+ Misses      32173    32166    -7     
+ Partials     3242     3239    -3     
Flag Coverage Δ
jsdom 52.64% <0.00%> (+<0.01%) ⬆️
node 16.76% <0.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...s/editor/src/browser/doc-model/saveParticipants.ts 20.66% <0.00%> (-0.87%) ⬇️
packages/editor/src/browser/preference/schema.ts 100.00% <ø> (ø)
packages/i18n/src/common/en-US.lang.ts 100.00% <ø> (ø)
packages/i18n/src/common/zh-CN.lang.ts 100.00% <ø> (ø)
...erences/src/browser/preference-settings.service.ts 72.19% <ø> (ø)

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@shilin8805
Copy link
Contributor Author

@erha19 已修改文字描述

Copy link
Member

@erha19 erha19 left a comment

Choose a reason for hiding this comment

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

功能验证正常, @Ricbet 也看一下吧

Copy link
Member

@Ricbet Ricbet left a comment

Choose a reason for hiding this comment

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

LGTM

@erha19 erha19 merged commit fe9128d into opensumi:main Apr 13, 2023
11 checks passed
@erha19 erha19 added this to the 2.24 milestone Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🎨 feature feature required ⚙️ refactor Refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants