core icon indicating copy to clipboard operation
core copied to clipboard

fix: in web ide menu does not display; in web ide shortcut keys are not available

Open eedpublic opened this issue 1 year ago • 5 comments

Types

  • [x] 🐛 Bug Fixes

Background or solution

Changelog

Summary by CodeRabbit

  • 新功能

    • 简化了应用程序支持打开文件夹和工作区的逻辑,提高了应用能力的判断效率。
    • 增强了键绑定功能,允许根据应用环境灵活管理命令执行。
  • 修复

    • 修正了在非Electron环境下执行特定命令的逻辑,避免不必要的命令执行。

eedpublic avatar Nov 08 '24 11:11 eedpublic

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: hacke2
:x: weimin2.zhou


weimin2.zhou seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 08 '24 11:11 CLAassistant

Walkthrough

此拉取请求对 common.contribution.tskeybinding.ts 文件进行了修改。主要更改包括简化 ClientCommonContribution 类中的属性条件逻辑,以及在 KeybindingRegistryImpl 类中集成 AppConfig 服务。通过调整关键绑定处理逻辑,增强了应用程序环境下的灵活性,确保某些命令在非 Electron 渲染上下文中不会被执行。

Changes

文件路径 更改摘要
packages/core-browser/src/common/common.contribution.ts 修改 ClientCommonContribution 类的构造函数,简化 application.supportsOpenFolderapplication.supportsOpenWorkspace 属性的条件逻辑。
packages/core-browser/src/keybinding/keybinding.ts KeybindingRegistryImpl 类中集成 AppConfig 服务,新增 appConfig 属性,并在 tryKeybindingExecution 方法中添加条件检查以控制命令执行。

Possibly related PRs

  • #4126: 此 PR 涉及对关键绑定处理的修改,与主 PR 中 keybinding.ts 文件的更改相关,特别是关于 AppConfig 服务的集成和关键绑定执行逻辑的调整。
  • #4174: 此 PR 解决了笔记本中关键绑定的问题,与主 PR 的重点在于简化与应用程序能力相关的逻辑相连接,均涉及应用程序上下文中的关键绑定管理和注册。

Suggested reviewers

  • Ricbet

[!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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. warning eslint > @humanwhocodes/[email protected]: Use @eslint/config-array instead warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported warning eslint > @humanwhocodes/config-array > @humanwhocodes/[email protected]: Use @eslint/object-schema instead warning eslint > file-entry-cache > flat-cache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning eslint-import-resolver-typescript > [email protected]: Glob versions prior to v9 are no longer supported error Couldn't find any versions for "@opensumi/ide-dev-tool" that matches "workspace:*"


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Nov 08 '24 11:11 coderabbitai[bot]

@eedpublic 签署一下 CLA

hacke2 avatar Nov 11 '24 03:11 hacke2

commit message 最好改一下,写清楚这段代码的作用

hacke2 avatar Nov 11 '24 03:11 hacke2

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 54.04%. Comparing base (fc4ad0d) to head (d2f0c28). Report is 285 commits behind head on main.

Files with missing lines Patch % Lines
packages/core-browser/src/keybinding/keybinding.ts 75.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4160      +/-   ##
==========================================
- Coverage   54.05%   54.04%   -0.01%     
==========================================
  Files        1616     1616              
  Lines       97963    97967       +4     
  Branches    20055    20048       -7     
==========================================
- Hits        52952    52949       -3     
- Misses      37398    37404       +6     
- Partials     7613     7614       +1     
Flag Coverage Δ
jsdom 49.62% <75.00%> (-0.01%) :arrow_down:
node 15.56% <50.00%> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 11 '24 06:11 codecov[bot]