feat(code-editor): support sprite instance input helpers#3123
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the SpriteInstance input type to the code editor, enabling sprite instance resource references. Changes include updating the BuiltInInputType enum, modifying the input helper to handle the new type by returning raw resource names, and adding a dependency replacement for xgolsw in go.mod. Review feedback suggests updating the InputSlotAcceptForType type definition for better type safety and recommends avoiding the use of a fork in the main branch's dependency list.
9c11cd5 to
9dd9b05
Compare
9dd9b05 to
a08b1e1
Compare
a08b1e1 to
cbd6775
Compare
cbd6775 to
9b1ee04
Compare
There was a problem hiding this comment.
Code Review: PR #3123 — Sprite Instance Input Helpers
This PR cleanly extends the InputHelperProvider hierarchy to support sprite instance resource references. The class extension pattern is respected, isResourceInputType abstraction is a good design move, and the default case delegation in provideInputValuePreview correctly delegates to the base class. A few issues are worth addressing before merge.
9b1ee04 to
ea043e2
Compare
ea043e2 to
e31f40a
Compare
Handle `spx-sprite-instance` with the existing resource input helper so sprite instance slots can use the sprite resource selector. Write selected sprite instances as bare identifiers while keeping resource name slots as string literals. Fixes goplus#3110 Updates goplus/xgolsw#317 Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
e31f40a to
c10c036
Compare
* chore(deps): bump spx to 2.0.0 (#3127) Agent-Logs-Url: https://github.com/goplus/builder/sessions/147d2d8e-4bf8-4ae7-b66e-b8a41c970f3a Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * Widget `<unstable-xgo-code-editor>` (#3089) * Add widget `<unstable-xgo-code-editor>` * Address widget review feedback * Stabilize layer order workarounds * Provide SPX knowledge from frontend (#3097) * UI update for tutorial pages (#3122) * update tutorial pages styles * compress tutorials banner * refine tutorials banner layout * show updated time for course series * details * Handle invalid image stalls in editor (#3136) * feat: add title attribute to sprite name in list items (#3140) * feat: add title attribute to sprite name in list items Add HTML title attribute to the sprite name span in UIEditorSpriteItem so users can hover to see the full name when it is truncated. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * refactor: move title tooltip to UIBlockItemTitle component Add optional `title` prop to UIBlockItemTitle and forward it to the inner truncation span, then use it in UIEditorSpriteItem to avoid the extra wrapper span. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * feat: add title attribute to name in all block item components Add :title="name" to UIBlockItemTitle in UIEditorBackdropItem, UIEditorSoundItem, UIEditorWidgetItem, and UISpriteItem so truncated names show a hover tooltip consistently across all item panels. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * feat: add title attribute to sprite name in list items Add :title="name" to UIBlockItemTitle in UISoundItem and UIBackdropItem. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * refactor: make title prop required in UIBlockItemTitle Change title from optional to required prop to ensure all callers provide a tooltip value for truncated text. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * feat: add title attribute to sprite name in list items Add missing :title prop to all UIBlockItemTitle callers to satisfy the newly-required title prop: AnimationGenItem, BackdropGenItem, ParamSelector, CostumeGenItem, SpriteGenItem, SpxEffectKindItem, and the ui-design docs page. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * fix: use $t() instead of t() in ParamSelector template Replace t(item.label) with $t(item.label) in the :title binding to be consistent with the template-level i18n helper usage. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * style: fix formatting in CostumeGenItem.vue Run Prettier to fix line-length formatting issue flagged by CI. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> --------- Co-authored-by: xgopilot <noreply@goplus.org> Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> * feat(code-editor): support sprite instance input helpers (#3123) Handle `spx-sprite-instance` with the existing resource input helper so sprite instance slots can use the sprite resource selector. Write selected sprite instances as bare identifiers while keeping resource name slots as string literals. Fixes #3110 Updates goplus/xgolsw#317 Signed-off-by: Aofei Sheng <aofei@aofeisheng.com> * Update UI empty/error default images (#3134) * update ui empty/error default images * compress svg size * rename image * adjust svg size * chore(deps): bump github.com/goplus/xgolsw to 0.20.0 in /tools/spxls (#3163) Signed-off-by: Aofei Sheng <aofei@aofeisheng.com> * feat(spx-gui): optimize video cut preview during animation generation (#3150) * optimize video cut preview during animation generation * use css variables for track padding * fix details * remove page for test * optimize code * queue video seeks to keep animation preview responsive during dragging --------- Signed-off-by: Aofei Sheng <aofei@aofeisheng.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: nighca <1492263+nighca@users.noreply.github.com> Co-authored-by: chennan <chennan@qiniu.com> Co-authored-by: fennoai[bot] <231223108+fennoai[bot]@users.noreply.github.com> Co-authored-by: xgopilot <noreply@goplus.org> Co-authored-by: Aofei Sheng <aofei@aofeisheng.com>
Handle
spx-sprite-instancewith the existing resource input helper so sprite instance slots can use the sprite resource selector.Write selected sprite instances as bare identifiers while keeping resource name slots as string literals.
Fixes #3110
Updates goplus/xgolsw#317