Skip to content
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 widget details #1307

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Fix widget details #1307

merged 1 commit into from
Feb 7, 2025

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Feb 7, 2025

  • Fix auto-selection for widgets
  • Fix border-radius for stage panel

Copy link

qiniu-prow bot commented Feb 7, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@@ -114,7 +114,6 @@ export class Stage extends Disposable {
if (!this.widgetsZorder.includes(widget.id)) {
this.widgetsZorder = [...this.widgetsZorder, widget.id]
}
this.autoSelectWidget()
Copy link
Collaborator Author

@nighca nighca Feb 7, 2025

Choose a reason for hiding this comment

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

这个改动是 #1289 引入的:

Resolve auto-selection issues for widgets in the WidgetsEditor.

这会导致初始化项目(如果项目中存在 widget,load project 时会调用 stage.addWidget 添加进来)时自动选中 widget;当用户再点击右下角 stage panel 选中舞台时,舞台编辑器打开后会自动切换到 Widgets 而不是 Code,因为发现当前存在选中的 widget 项

实际上按照 sprites 等的处理惯例,应该在真的“用户添加”时才去 auto-select,即上方的

const addMonitor = useAddMonitor(true)

这里的 useAddMonitor 中已经封装了 auto-select 的逻辑

@nighca nighca marked this pull request as ready for review February 7, 2025 08:58
@nighca nighca requested a review from Copilot February 7, 2025 08:58

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@qiniu-ci
Copy link

qiniu-ci commented Feb 7, 2025

This PR has been deployed to the preview environment. You can explore it using the preview URL.

Warning

Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team.

@nighca nighca merged commit 1dbeca0 into goplus:dev Feb 7, 2025
5 checks passed
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