-
Notifications
You must be signed in to change notification settings - Fork 398
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: improve file delete confirmation message and styling #4333
base: main
Are you sure you want to change the base?
Conversation
/next |
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. """ 变更概述演练此次拉取请求涉及多个文件的样式和本地化更改。主要修改包括调整标题颜色继承、树形项目选中样式、文件删除确认对话框的本地化字符串以及文件树模型服务中的选择逻辑。这些变更旨在改善用户界面的一致性和交互体验。 变更
序列图sequenceDiagram
participant User
participant FileTree
participant ConfirmDialog
User->>FileTree: 选择文件
User->>FileTree: 触发删除操作
FileTree->>ConfirmDialog: 显示删除确认对话框
ConfirmDialog-->>User: 展示详细删除信息
User->>ConfirmDialog: 确认删除
ConfirmDialog->>FileTree: 执行文件删除
可能相关的拉取请求
建议标签
建议审阅者
✨ Finishing Touches
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/design/src/browser/style/design.module.less (1)
599-603
: 树形控件选中项样式优化为树形控件的选中项添加边框提示是很好的改进:
- 提升了用户界面的可视反馈
- 增强了交互体验
- 改善了可访问性
建议考虑添加过渡动画以使选中效果更平滑:
[class*='mod_actived__'] { outline: 1px solid var(--kt-tree-inactiveSelectionBackground); + transition: outline 0.1s ease-in-out; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/components/src/style/base.less
(1 hunks)packages/design/src/browser/style/design.module.less
(1 hunks)packages/file-tree-next/src/browser/services/file-tree-model.service.ts
(6 hunks)packages/i18n/src/common/en-US.lang.ts
(1 hunks)packages/i18n/src/common/zh-CN.lang.ts
(1 hunks)
👮 Files not reviewed due to content moderation or server errors (2)
- packages/file-tree-next/src/browser/services/file-tree-model.service.ts
- packages/i18n/src/common/zh-CN.lang.ts
🧰 Additional context used
🪛 Biome (1.9.4)
packages/file-tree-next/src/browser/services/file-tree-model.service.ts
[error] 1008-1010: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: 🚀🚀🚀 Next Version for pull request
- GitHub Check: unittest (ubuntu-latest, 18.x, jsdom)
- GitHub Check: build (ubuntu-latest, 20.x)
- GitHub Check: unittest (ubuntu-latest, 18.x, node)
- GitHub Check: unittest (macos-latest, 18.x, jsdom)
- GitHub Check: build (macos-latest, 20.x)
- GitHub Check: build-windows
- GitHub Check: unittest (macos-latest, 18.x, node)
🔇 Additional comments (2)
packages/i18n/src/common/en-US.lang.ts (1)
54-57
: 文件删除相关的本地化字符串改进本次更改优化了文件删除操作的用户体验:
- 删除确认消息现在包含文件数量信息
- 新增了关于从回收站恢复文件的提示
- 重构了删除操作相关的消息键名,使其更有条理性
packages/components/src/style/base.less (1)
118-118
: 标题元素样式优化将标题元素的颜色设置为
inherit
是一个很好的改进:
- 提高了样式的灵活性,标题会继承父元素的颜色
- 简化了样式覆盖的复杂度
- 符合组件复用的最佳实践
🎉 PR Next publish successful! 3.7.1-next-1737628160.0 |
/next |
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 (2)
packages/file-tree-next/src/browser/services/file-tree-model.service.ts (2)
994-994
: 建议将魔法数字提取为常量建议将
MAX_FILES = 10
提取为类级别的常量,以提高代码的可维护性。- const MAX_FILES = 10; + private static readonly MAX_FILES_IN_CONFIRMATION = 10;
Line range hint
1734-1749
: 建议添加输入参数验证为了提高代码的健壮性,建议添加对输入参数
uris
的验证:public selectChildNode(uris: URI[]) { + if (!uris || uris.length === 0) { + return; + } for (const uri of uris) { + if (!uri) { + continue; + } const file = this.fileTreeService.getNodeByPathOrUri(uri); // ... rest of the code } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/file-tree-next/src/browser/services/file-tree-model.service.ts
(6 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
packages/file-tree-next/src/browser/services/file-tree-model.service.ts
[error] 1007-1008: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: 🚀🚀🚀 Next Version for pull request
- GitHub Check: ubuntu-latest, Node.js 20.x
- GitHub Check: build (ubuntu-latest, 20.x)
- GitHub Check: build-windows
- GitHub Check: build (macos-latest, 20.x)
🔇 Additional comments (3)
packages/file-tree-next/src/browser/services/file-tree-model.service.ts (3)
26-26
: 导入更改看起来不错!新增的导入模块与文件删除确认对话框的改进直接相关,包括消息类型、操作系统检测和 Markdown 格式化支持。
Also applies to: 34-34, 38-38
990-1012
: 文件删除确认对话框的改进很棒!改进包括:
- 根据操作系统显示不同的确认消息
- 增加了显示的文件数量
- 添加了更清晰的删除提示
- 使用 Markdown 格式化消息以提升可读性
🧰 Tools
🪛 Biome (1.9.4)
[error] 1007-1008: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
Line range hint
1734-1749
: 方法可见性的更改是合理的将
selectChildNode
方法改为公共方法使得外部组件可以访问此功能,这有助于提高代码的可重用性。
🎉 PR Next publish successful! 3.7.1-next-1737628833.0 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4333 +/- ##
==========================================
- Coverage 54.18% 54.18% -0.01%
==========================================
Files 1638 1638
Lines 100084 100093 +9
Branches 21731 21727 -4
==========================================
+ Hits 54233 54235 +2
- Misses 38095 38099 +4
- Partials 7756 7759 +3
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
improve file delete confirmation message and styling
Summary by CodeRabbit
样式调整
文件树功能
国际化更新