Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

refactor(routerservice): remove arbitary service #8858

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

aditya-mitra
Copy link
Collaborator

@aditya-mitra aditya-mitra commented Sep 20, 2023

Summary

🤖 Generated by Copilot at 4882305

This pull request replaces the RouterService class with a reactive RouterState object for routing logic in the client core and editor packages. This makes the code simpler, more consistent, and more reactive. It updates the imports and calls to RouterState in various components and pages.

References

implements #8305

Explanation

🤖 Generated by Copilot at 4882305

  • Add a navigate method to the RouterState object to update the pathname state and trigger a navigation to a given URL (link)
  • Remove the RouterService class, which is no longer needed after the refactoring to use RouterState (link)
    • EngineHooks.tsx, which contains custom hooks for the engine logic (link, link)
    • LoadLocationScene.tsx, which contains the component for loading a location scene (link, link)
    • RoomMenu.tsx, which contains the component for the room menu in the user menu (link, link, link)
    • editor.tsx, which contains the component for the editor page (link, link)
    • EditorContainer.tsx, which contains the component for the editor container (link, link, link)
    • ScenesPanel.tsx, which contains the component for the scenes panel in the assets panel (link, link, link)
    • ProjectsPage.tsx, which contains the component for the projects page (link, link)

🤖 Generated by Copilot at 4882305

No more service, only state
We react to our fate
RouterState is our guide
Through the scenes we create

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@HexaField HexaField merged commit 9407cbc into dev Sep 21, 2023
11 checks passed
@HexaField HexaField deleted the refactor/router-service branch September 21, 2023 02:04
barankyle pushed a commit that referenced this pull request Oct 13, 2023
Co-authored-by: HexaField <joshfield999@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants