Skip to content
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

Remove action receptors #9066

Merged
merged 4 commits into from Oct 18, 2023
Merged

Remove action receptors #9066

merged 4 commits into from Oct 18, 2023

Conversation

HexaField
Copy link
Member

@HexaField HexaField commented Oct 16, 2023

Summary

🤖 Generated by Copilot at 6b20990

This pull request refactors and simplifies the state management and notification handling logic in various files across the client, editor, engine, and instance server packages. It removes unused and deprecated code, reduces unnecessary dependencies and re-renders, and improves code readability and performance. It also adds some state tracking and queueing features to the SpectatorComponent and the SceneLoadingSystem respectively.

References

closes #8305

Explanation

🤖 Generated by Copilot at 6b20990

  • Removed NotificationAction class and replaced notification actions with direct mutations of snackbar state using NotificationState (link, link, link, link, link, link, link)
  • Removed EngineActions and replaced engine actions with direct mutations of isEngineInitialized, sceneLoaded, and spectating states using EngineState and getMutableState (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Removed isTeleporting state from EngineState and moved it to PortalState as activePortalEntity state to track the current portal entity (link, link, link, link)
  • Added defineActionQueue to PortalSystem and SceneLoadingSystem to handle sceneLoaded actions and set sceneLoading and sceneLoaded states accordingly (link, link, link)
  • Removed unused imports of AudioEffectPlayer, matches, and dispatchAction from various files (link, link, link, link, link)

🤖 Generated by Copilot at 6b20990

We've simplified the state, me hearties, yo ho ho
We've cut out all the actions, and the code is good to go
We've used direct mutations, and the hooks that we all know
We've made the engine faster, and the portals easier to show

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 marked this pull request as ready for review October 17, 2023 02:31
Copy link
Collaborator

@aditya-mitra aditya-mitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Some deprecated functions are now nicely removed 🎉

@HexaField HexaField merged commit e69d6d7 into dev Oct 18, 2023
12 of 13 checks passed
@HexaField HexaField deleted the remove-action-receptors branch October 18, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove redundant Action/Receptor pattern for state services
2 participants