-
Notifications
You must be signed in to change notification settings - Fork 393
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: support toggle column selection #4265
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. 概述遍历此拉取请求引入了编辑器中列选择的新功能。通过添加新命令 更改
可能相关的 PR
建议标签
建议审阅者
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/editor/src/browser/editor.contribution.ts (1)
1200-1206
: 建议为切换操作添加可见提示或日志记录
当前仅切换用户偏好中的布尔值,若在界面层也能提供提示(如通知或状态栏更新),可提升用户对功能使用状态的认知度。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/core-browser/src/common/common.command.ts
(1 hunks)packages/editor/src/browser/editor.contribution.ts
(1 hunks)packages/editor/src/browser/preference/converter.ts
(1 hunks)packages/editor/src/browser/preference/schema.ts
(2 hunks)packages/i18n/src/common/editor/en-US.ts
(1 hunks)packages/i18n/src/common/editor/zh-CN.ts
(1 hunks)
🔇 Additional comments (6)
packages/i18n/src/common/editor/zh-CN.ts (1)
5-6
: 新增本地化条目表述清晰,建议保留。
这两条本地化文案简洁明了,符合“列选择模式”功能描述,内容无歧义。
packages/i18n/src/common/editor/en-US.ts (1)
7-8
: 文案清晰,符合功能需求。
该英文文案对列选择模式有充分的描述,可正常引导用户理解此功能。
packages/editor/src/browser/preference/converter.ts (1)
197-202
: 新增 editor.columnSelection
配置映射,功能与文档注释一致。
此映射将 editor.columnSelection
转换为 monaco 的 columnSelection
,默认值为 false
,逻辑正确且实现简洁。建议验证在编辑器中确能生效。
packages/core-browser/src/common/common.command.ts (1)
658-663
: 新增 TOGGLE_COLUMN_SELECTION
命令,建议与偏好设置保持同步。
此命令与本次新增的 editor.columnSelection
设置相互匹配,推荐在后续 PR 或文档中补充快捷键绑定,方便用户快速开启或关闭列选择。
packages/editor/src/browser/preference/schema.ts (2)
113-113
: 默认值设为 false 合理,便于减少误启动
将 columnSelection 默认关闭更符合多数用户习惯,避免因误触导致列编辑模式开启。此处实现符合预期。
1183-1187
: 新增首选项配置与编辑器默认值保持一致
此处对 editor.columnSelection
属性的结构与默认值定义与前文的 EDITOR_DEFAULTS
一致,逻辑和实现均无问题。
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4265 +/- ##
==========================================
+ Coverage 53.72% 54.27% +0.55%
==========================================
Files 1622 1633 +11
Lines 98572 99713 +1141
Branches 20143 21628 +1485
==========================================
+ Hits 52955 54121 +1166
+ Misses 37911 37884 -27
- Partials 7706 7708 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Types
Background or solution
Changelog
feat: support toggle column selection
Summary by CodeRabbit
新功能
本地化