Skip to content

fix: edit tab scrollbar style problem#3899

Merged
bytemain merged 3 commits intomainfrom
fix/editor-tab-style
Aug 1, 2024
Merged

fix: edit tab scrollbar style problem#3899
bytemain merged 3 commits intomainfrom
fix/editor-tab-style

Conversation

@bytemain
Copy link
Copy Markdown
Member

@bytemain bytemain commented Jul 31, 2024

Types

  • 🐛 Bug Fixes

Background or solution

如果 body 没有设置好 overflow 等,editor 的 tabbar 下会有一道空白区域,对于 codeblitz 这种前端组件而言,不能要求使用方往 body 设置 overflow。

CleanShot 2024-07-31 at 14 47 04@2x

Changelog

fix edit tab scrollbar style problem

Summary by CodeRabbit

  • 新功能

    • 更新了滚动条组件的实现,采用了新的依赖 @opensumi/react-custom-scrollbars-2,可能提升了性能和功能。
  • 变更

    • 移除了 font-awesomereact-autosize-textareareact-custom-scrollbars 依赖,优化了项目的依赖管理。
    • 移除了 jschardetescape-carriage 依赖,简化了项目的依赖列表。

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 31, 2024

Walkthrough

此次更改主要涉及对前端依赖的更新和移除。packages/components中的react-custom-scrollbars被替换为@opensumi/react-custom-scrollbars-2,以提升滚动条的性能和功能。同时,多个依赖(如font-awesomereact-autosize-textareareact-custom-scrollbars)在packages/core-browser中被移除,表明该项目正在优化依赖管理,以减小包的体积或替换为更合适的库。此外,packages/core-commonpackages/output中也移除了不再需要的依赖,这进一步简化了整个项目的依赖关系。

Changes

文件路径 更改摘要
packages/components/package.json 添加了依赖@opensumi/react-custom-scrollbars-2(版本^4.3.0),移除了依赖react-custom-scrollbars(版本^4.2.1)。
packages/core-browser/package.json 移除了依赖font-awesome(版本^4.7.0)、react-autosize-textarea(版本^7.0.0)和react-custom-scrollbars(版本^4.2.1)。
packages/core-common/package.json 移除了依赖jschardet(版本3.0.0)。
packages/output/package.json 移除了依赖escape-carriage(版本^1.3.0)。

Sequence Diagram(s)

sequenceDiagram
    participant A as 应用
    participant B as 旧滚动条组件
    participant C as 新滚动条组件

    A->>B: 使用旧滚动条组件
    B-->>A: 提供滚动条功能

    A->>C: 使用新滚动条组件
    C-->>A: 提供改进的滚动条功能
Loading

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8d21e22 and 5e15ebe.

Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (2)
  • packages/core-common/package.json (1 hunks)
  • packages/output/package.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • packages/core-common/package.json
  • packages/output/package.json

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@bytemain
Copy link
Copy Markdown
Member Author

/next

@railway-app
Copy link
Copy Markdown

railway-app Bot commented Jul 31, 2024

🚅 Previously deployed to Railway in the core project. Environment has been deleted.

@opensumi opensumi Bot added 🐞 bug Something isn't working 💄 style change labels Jul 31, 2024
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

Outside diff range, codebase verification and nitpick comments (1)
packages/components/package.json (1)

20-20: 移除 react-custom-scrollbars 的影响

移除 react-custom-scrollbars 将会破坏 Scrollbars 组件,并影响多个依赖该组件的文件和功能。建议在移除该依赖之前,进行全面的代码审查和测试,以确保所有相关功能正常运行。

  • 受影响的文件:
    • packages/terminal-next/src/browser/component/tab.view.tsx
    • packages/editor/src/browser/navigation.view.tsx
    • packages/editor/src/browser/tab.view.tsx
    • packages/editor/src/browser/editor.view.tsx
    • packages/core-browser/src/components/index.ts
    • packages/components/src/virtual-list/index.tsx
    • packages/components/src/scrollbars/index.tsx
    • packages/components/src/recycle-tree/RecycleTree.tsx
    • packages/components/src/recycle-list/RecycleList.tsx
Analysis chain

请确认移除 react-custom-scrollbars 的影响。

移除 react-custom-scrollbars 可能会影响自定义滚动条的功能,请确保所有相关功能正常运行。

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the impact of removing `react-custom-scrollbars`.

# Test: Search for the usage of `react-custom-scrollbars`. Expect: No occurrences.
rg --type js --type ts 'react-custom-scrollbars'

Length of output: 331


Script:

#!/bin/bash
# Description: Extract usage details of `react-custom-scrollbars` in the identified file.

# Display the relevant lines around the import statement in `packages/components/src/scrollbars/index.tsx`.
rg --type js --type ts 'react-custom-scrollbars' -A 10 -B 10 packages/components/src/scrollbars/index.tsx

Length of output: 1017


Script:

#!/bin/bash
# Description: Search for the usage of the `Scrollbars` component in the codebase.

# Search for occurrences of the `Scrollbars` component.
rg --type js --type ts 'Scrollbars' 

Length of output: 2761

@bytemain
Copy link
Copy Markdown
Member Author

/next

@opensumi
Copy link
Copy Markdown
Contributor

opensumi Bot commented Jul 31, 2024

🎉 PR Next publish successful!

3.1.5-next-1722409123.0

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.83%. Comparing base (09ac2fc) to head (5e15ebe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3899      +/-   ##
==========================================
- Coverage   54.83%   54.83%   -0.01%     
==========================================
  Files        1558     1558              
  Lines       95140    95155      +15     
  Branches    19489    19481       -8     
==========================================
+ Hits        52172    52179       +7     
- Misses      35692    35700       +8     
  Partials     7276     7276              
Flag Coverage Δ
jsdom 50.27% <ø> (-0.01%) ⬇️
node 15.54% <ø> (+<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.

@bytemain
Copy link
Copy Markdown
Member Author

CleanShot 2024-07-31 at 17 53 36@2x

测试通过

@bytemain bytemain merged commit a7fa542 into main Aug 1, 2024
@bytemain bytemain deleted the fix/editor-tab-style branch August 1, 2024 06:14
zhanba pushed a commit that referenced this pull request Aug 8, 2024
Ricbet pushed a commit that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working 💄 style change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants