Skip to content

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Jun 23, 2025

Copy link

qiniu-prow bot commented Jun 23, 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

@nighca nighca marked this pull request as ready for review June 23, 2025 10:31
@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 10:31
Copy link
Contributor

@Copilot Copilot AI left a 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 to SpriteCostumesState 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 to SpriteAnimationsState 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 as any is ambiguous. Define a specific interface (e.g., { path: string; params?: Record<string,string> }) to improve type safety.
  currentRoute: any

@qiniu-ci
Copy link

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.

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