Skip to content

修复N个问题#710

Merged
CodFrm merged 5 commits intoscriptscat:mainfrom
WhiteSevs:fix-monaco-editor
Sep 5, 2025
Merged

修复N个问题#710
CodFrm merged 5 commits intoscriptscat:mainfrom
WhiteSevs:fix-monaco-editor

Conversation

@WhiteSevs
Copy link
Contributor

No description provided.

@CodFrm CodFrm requested a review from Copilot September 5, 2025 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request contains multiple fixes and improvements to the ScriptCat browser extension, primarily focusing on Monaco Editor configuration, UI component enhancements, and code organization.

Key Changes

  • Enhanced Monaco Editor configuration with TypeScript compiler options and hover tooltips for script metadata
  • Improved React component handling with proper ref forwarding and accessibility features
  • Added Monaco Editor registration to the install page for consistent editor behavior

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/pkg/utils/monaco-editor/index.ts Added script metadata tooltips, improved regex pattern matching, and enhanced TypeScript compiler options
src/pkg/utils/monaco-editor/config.ts Added allowNonTsExtensions flag to fix Monaco Editor source file errors
src/pages/options/routes/ScriptList.tsx Improved DraggableContainer with proper ref forwarding and accessibility features
src/pages/install/main.tsx Added Monaco Editor registration for consistent editor functionality
src/pages/components/CodeEditor/index.tsx Enhanced diff editor with hideUnchangedRegions and improved dispose handling

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
resource: "引入资源文件",
require: "引入外部 js 文件",
noframes: "表示脚本不运行在`<frame>`中",
definition: "ScriptCat特有功能:一个`.d.ts`文件的引用地址,能够自动补全编辑器的自动提示",
Copy link
Member

Choose a reason for hiding this comment

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

准备废弃了,感觉使用最新的编辑器类型定义配置更好

@CodFrm CodFrm merged commit 6a2027a into scriptscat:main Sep 5, 2025
2 of 3 checks passed
@CodFrm
Copy link
Member

CodFrm commented Sep 5, 2025

感谢🙏

@WhiteSevs WhiteSevs deleted the fix-monaco-editor branch September 9, 2025 06:17
@cyfung1031
Copy link
Collaborator

PR #733

退回 DraggableContainer 的 React.forwardRef
这个造成React产生不必要及大量的重绘

@cyfung1031
Copy link
Collaborator

标题说 「修复N个问题」
应该清楚指出什么问题
我原本不明白 加accessibility={{ container: document.body }} 的用意何在。
暂时看不到问题,不影响就算了

@WhiteSevs
Copy link
Contributor Author

标题说 「修复N个问题」 应该清楚指出什么问题 我原本不明白 加accessibility={{ container: document.body }} 的用意何在。 暂时看不到问题,不影响就算了

accessibility={{ container: document.body }}是处理 Warning: validateDOMNesting(...): <div> cannot appear as a child of <table>.

PixPin_2025-09-13_20-44-47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants