feat(spx-gui): support spx-property-name input type in InputHelper#2975
feat(spx-gui): support spx-property-name input type in InputHelper#2975cn0809 wants to merge 6 commits intogoplus:devfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the SPX GUI's code editor by adding support for a new input type specifically designed for selecting property names. This feature provides a more intuitive and guided experience for users when interacting with stage and sprite properties, leveraging a dedicated UI component for selection. The changes also include routine updates to Go module dependencies. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the spx-property-name input type, which is a great addition. The implementation is solid, touching upon the necessary parts of the codebase from type definitions to UI components. I've identified a potential race condition in the newly added SpxPropertyNameInput.vue component and have provided suggestions to make it more robust by handling asynchronous operation cancellations. Overall, this is a well-executed feature enhancement.
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Adds editor-side support for the new accept.type = spx-property-name input slots so the in-place “Modify” action can render a property selector instead of falling back to “Value not supported”. This integrates with the SPX code editor’s existing InputHelper flow and updates the SPX language server tool dependencies accordingly.
Changes:
- Add
spx-property-nameas a newSpxInputTypeand wire a correspondingInputTypeHandlerinSpxInputHelperProvider. - Introduce
SpxPropertyNameInput(dropdown) that queries the language server for available stage/sprite properties based on the active document. - Bump
tools/spxlsGo module dependencies (notablyxgolsw) to versions that include the new slot accept type support.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/spxls/go.mod | Updates xgolsw and indirect deps to newer versions needed for new slot accept types. |
| tools/spxls/go.sum | Refreshes module checksums after dependency bumps. |
| spx-gui/src/components/editor/code-editor/xgo-code-editor/index.ts | Re-exports useCodeEditorUICtx alongside CodeEditorUI for consumption by SPX-specific UI. |
| spx-gui/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue | New selector-based in-place input UI that loads candidate properties from the code editor/LSP. |
| spx-gui/src/components/editor/code-editor/spx-code-editor/input-helper.ts | Registers the new SpxPropertyName handler and expression serialization behavior. |
| spx-gui/src/components/editor/code-editor/spx-code-editor/common.ts | Extends SpxInputType/typed value union with spx-property-name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
spx-gui/src/components/editor/code-editor/spx-code-editor/input-helper.ts
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Show resolved
Hide resolved
|
Good structure overall — the new component follows the established Vue SFC pattern and the dedup logic for merging stage+sprite properties is correct. One issue needs attention before merge: the |
nighca
left a comment
There was a problem hiding this comment.
发现要像其他 API(如 setCostume "xxx")一样顺畅地用 showVar/hideVar 还差几个事情:
- 使用错误输入的时候,应当通过 diagnsotics 进行提示
- document-base 添加对应的信息,且插入的 snippet 支持类似
$BUILDER_FIRST_PROPERTY_NAME这样的变量(这个会稍麻烦些)
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
...i/src/components/editor/code-editor/spx-code-editor/ui/input-helper/SpxPropertyNameInput.vue
Outdated
Show resolved
Hide resolved
补充一个: |
close: #2971