-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix: add Page JS alert info. #1012
Conversation
WalkthroughThe pull request introduces instructional placeholder text in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
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
🔭 Outside diff range comments (1)
packages/plugins/script/src/Main.vue (1)
Remove unused
saveMethods
from setup functionThe
saveMethods
function is no longer used in the component or by its parents. It should be removed from both the destructuring assignment and the setup return object.
- Remove
saveMethods
from the destructuring:const { state, monaco, change, close } = useMethod({ emit })
- Remove
saveMethods
from the setup return object🔗 Analysis chain
Line range hint
55-82
: Verify ifsaveMethods
is still needed.The
saveMethods
function is returned in the setup function but might no longer be used since the save button has been removed.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining usage of saveMethods in the template rg "saveMethods" packages/plugins/script/src/Main.vueLength of output: 150
Script:
#!/bin/bash # Get the full context of Main.vue to see template usage and setup return rg "saveMethods" packages/plugins/script/src/Main.vue -B 2 -A 2 # Find useMethod hook implementation ast-grep --pattern 'export function useMethod($_) { $$$ }'Length of output: 390
Script:
#!/bin/bash # Search for any usage of Main.vue component with saveMethods rg -g '*.{vue,js,ts,jsx,tsx}' '<script-plugin' -A 5 -B 5 # Search for any event emissions using saveMethods rg -g '*.{vue,js,ts}' 'emit.*saveMethods'Length of output: 102
Script:
#!/bin/bash # Get the component name or registration rg -g '*.{vue,js,ts}' -l 'export default defineComponent' packages/plugins/script/src/Main.vue # Search for any imports of this component rg -g '*.{vue,js,ts}' "from.*plugins/script/src/Main"Length of output: 152
🧹 Nitpick comments (2)
packages/plugins/script/src/Main.vue (2)
12-18
: Consider internationalizing the alert message.The alert message is hardcoded in Chinese. Consider using i18n to support multiple languages and improve accessibility for non-Chinese users.
<tiny-alert - description="注意:JS 面板顶层只支持函数声明,其余变量声明、表达式、类声明均不会保存。" + :description="t('plugins.script.functionDeclarationAlert')" custom-class="tiny-alert_custom" :closable="false" />
188-206
: Consider using CSS variables for colors.The background color is hardcoded as
rgb(240, 247, 255)
. Consider using a CSS variable for better theme consistency and maintainability..tiny-alert_custom { border: 0; padding: 8px 0; margin-top: 12px; margin-bottom: 0; padding-left: 17px; border-radius: 4px; - background: rgb(240, 247, 255); + background: var(--ti-lowcode-alert-info-bg); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/plugins/script/src/Main.vue
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: push-check
🔇 Additional comments (1)
packages/plugins/script/src/Main.vue (1)
33-33
: LGTM! Component changes look good.The Alert component is properly imported and registered.
Also applies to: 51-52
涉及UI改动需要补充下修改后效果截图 |
If it involves UI changes, please add screenshots of the modified effects. |
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
未展示页面 JS 保存代码保存规则,用户保存代码时容易误操作
Issue Number: N/A
What is the new behavior?
页面 JS 增加编辑器内部 placeholder 代码保存规则
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
monaco-editor
dependency version across multiple packages from0.33.0
to0.51.0
.