-
Notifications
You must be signed in to change notification settings - Fork 34
Tech Design for In-editor Routing #1799
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
base: dev
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
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.
Pull Request Overview
This PR introduces the technical design and supporting code for an in-editor routing layer, including type declarations, configuration, and sample implementations.
- Add a dedicated TypeScript configuration for the router examples.
- Declare the
EditorState
API and related substate classes. - Provide design documentation and sample implementation for editor and sprite routing.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
docs/develop/in-editor-router/tsconfig.json | Add TS compiler options for in-editor router examples |
docs/develop/in-editor-router/module_EditorState.ts | Declare EditorState and substate classes API |
docs/develop/in-editor-router/index.md | Design document outlining route structure and state model |
docs/develop/in-editor-router/impl_SpriteEditor.ts | Sample SpriteEditor component integration |
docs/develop/in-editor-router/impl_EditorState.ts | Sample EditorState implementation syncing with Router |
docs/develop/in-editor-router/base.ts | Base type and utility declarations used by router examples |
Comments suppressed due to low confidence (4)
docs/develop/in-editor-router/module_EditorState.ts:66
- [nitpick] The class name
StageCostumesState
implies it belongs to a Stage, but it actually manages a Sprite's costumes. Consider renaming toSpriteCostumesState
to reflect its purpose.
export declare class StageCostumesState {
docs/develop/in-editor-router/module_EditorState.ts:77
- [nitpick] The class name
StageAnimationsState
suggests it's part of a Stage, but it handles a Sprite's animations. Consider renaming toSpriteAnimationsState
for clarity.
export declare class StageAnimationsState {
docs/develop/in-editor-router/module_EditorState.ts:3
- [nitpick] Public API declarations should include JSDoc comments describing the purpose and usage of
EditorState
and its methods for consumers.
export declare class EditorState {
docs/develop/in-editor-router/base.ts:2
- Typing
currentRoute
asany
is ambiguous. Define a specific interface (e.g.,{ path: string; params?: Record<string,string> }
) to improve type safety.
currentRoute: any
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. |
Udpate #1139.
Review at https://github.com/nighca/goplus-builder/blob/issue-1139/docs/develop/in-editor-router/index.md .