Skip to content

Refactor: State#82

Merged
Felix Frank (feliopterix) merged 96 commits intorefactor/major-2.0.0from
refactor/state
Apr 29, 2025
Merged

Refactor: State#82
Felix Frank (feliopterix) merged 96 commits intorefactor/major-2.0.0from
refactor/state

Conversation

@feliopterix
Copy link
Copy Markdown
Contributor

1. Why is this change necessary?

The current implementation of State (former Communication) involves heavy maintainability work (action management & testing). We need to simplify that by encapsulating each action in it's own class that derives from an abstract base class. This guarantees a unified structure for each action that we can execute in one generic method in State (former Communication).

2. What does this change do, exactly?

Each action is implemented by it's own. Each implementation is located in each actions own file. Each action implementation is tested separately from all other actions with it's own synthetic data. By doing this we ensure the maintainability and testability of each action.

3. Describe each step to reproduce the issue or behaviour.

TODO

4. Please link to the relevant issues (if any).

Depends on: #81

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

@feliopterix Felix Frank (feliopterix) merged commit 645de5c into refactor/major-2.0.0 Apr 29, 2025
6 checks passed
@feliopterix Felix Frank (feliopterix) deleted the refactor/state branch April 29, 2025 14:37
Felix Frank (feliopterix) added a commit that referenced this pull request Jul 3, 2025
* refactor: make applyMixins return the correctly typed class constructor.

* Change to esnext build.

* Refined mixins.

* Made ci pipeline run for every pr.

* Fixed AR capabilities.

* Renamed enums.

* Reduced AR Quick Look logic.

* Added converter, loader and exporter.

* Reorganized exporter types.

* Reworked AR Quick Look.

* Reworked ARQuickLook futher and adjusted AR accordingly.

* Reworked Scene Viewer.

* Refined Info types.

* Renamed all AR related systems.

* Fixed tests to use new Loader.

* Reworked AR Quick Look launch.

* Reworked Scene Viewer launch.

* Added more inline documentation.

* Export ARSystem correctly.

* Added USDZLoader mock.

* Fixed Converter types.

* Reworked types.

* Added tests for Exporter.

* Added tests for Loader.

* Reworked loaders.

* Refined error handling in ARSystem.

* Renamed files.

* Reworked error handling.

* Removed logs.

* Renamed methods.

* Prefixed classes with Asset to give more structure.

* Reworked AssetConverter methods.

* Improved on natural Promise rejection.

* Improved Scene Viewer test.

* Fixed getIsARCapable method.

* Added first version of State.

* Added dynamic dependencies to Actions.

* Changed property order.

* Added first version of ModuleRegistry.

* Renamed files.

* Fixed tests.

* Exclude ARSystem from global export.

* Removed unnecessary test.

* Renamed file, added test.

* Renamed export.

* Moved modules to own folder.

* Reworked ModuleRegistry.

* Improved error handling.

* Rearranged code.

* Renamed test describes.

* Refined build script to catch all module registrations.

* Moved files.

* Reworked module exports in package.json.

* Modified readme template to contain build process and yalc as local development environment.

* Updated readme template.

* Fixed Math naming.

* Created centralized module registrations (in modules/indes.ts).

* New build process approach.

* Improved ModuleRegistry workflow.

* Added relative paths to module registry.

* Fixed pipeline.

* Exposed dive instance modules.

* Updated readme template.

* Updated module documentation.

* Added module documentation to README.

* Automated module documentation.

* Fixed pipeline.

* Revert "Changed property order."

This reverts commit 40c7d13.

* Revert "Added dynamic dependencies to Actions."

This reverts commit 5a6bbd4.

* Revert "Added first version of State."

This reverts commit b2006ff.

* Fixed pipeline.

* Reworked module build process.

* Fixed paths.

* Fixed export.

* Reworked module types.

* Reworked documentation generation.

* Fixed pipeline.

* Moved ci script file.

* Renamed Modules to ModuleRegistry.

* Removed docs from npm package due to file size.

* Fixed build.

* Reworked ModuleRegistry to only deliver classes.

* Change package.json to export ModuleRegistry only.

* Added modules build path.

* Added more documentation.

* Removed ModuleRegistry to just use Importer on it's own.

* Reworked build process to dynamically rewrite imports.

* Added automatic instantiation as a method to ModuleImporter.

* Updated docs.

* Defined engine.

* Correctly autostart the renderer.

* Reworked QuickView to be async (wait for loading model).

* Fixed tests.

* Reactivated test.

* Moved all scene components to seperate folder.

* Moved src code to a more sturctured way.

* Added index.ts files for logical groups.

* Raised test coverage.

* Fixed irrelevant webxr files.

* Fixed tests.

* Merge pull request #65 from shopware/refactor/module-registry

Refactor: Modules

* Added build path helper.

* Fixed Resize manager.

* Fixed view calculation.

* Fixed tests.

* Reworked Renderer.

* Fixed build path.

* Changed renderer name.

* Refactor: Engine (#81)

* Added first version of State.

* Added dynamic dependencies to Actions.

* Changed property order.

* Added first version of ModuleRegistry.

* Renamed files.

* Fixed tests.

* Exclude ARSystem from global export.

* Removed unnecessary test.

* Renamed file, added test.

* Renamed export.

* Moved modules to own folder.

* Reworked ModuleRegistry.

* Improved error handling.

* Rearranged code.

* Renamed test describes.

* Refined build script to catch all module registrations.

* Moved files.

* Reworked module exports in package.json.

* Modified readme template to contain build process and yalc as local development environment.

* Updated readme template.

* Fixed Math naming.

* Created centralized module registrations (in modules/indes.ts).

* New build process approach.

* Improved ModuleRegistry workflow.

* Added relative paths to module registry.

* Fixed pipeline.

* Exposed dive instance modules.

* Updated readme template.

* Updated module documentation.

* Added module documentation to README.

* Automated module documentation.

* Fixed pipeline.

* Revert "Changed property order."

This reverts commit 40c7d13.

* Revert "Added dynamic dependencies to Actions."

This reverts commit 5a6bbd4.

* Revert "Added first version of State."

This reverts commit b2006ff.

* Fixed pipeline.

* Reworked module build process.

* Fixed paths.

* Fixed export.

* Reworked module types.

* Reworked documentation generation.

* Fixed pipeline.

* Moved ci script file.

* Renamed Modules to ModuleRegistry.

* Removed docs from npm package due to file size.

* Fixed build.

* Reworked ModuleRegistry to only deliver classes.

* Change package.json to export ModuleRegistry only.

* Added modules build path.

* Added more documentation.

* Removed ModuleRegistry to just use Importer on it's own.

* Reworked build process to dynamically rewrite imports.

* Added automatic instantiation as a method to ModuleImporter.

* Updated docs.

* Defined engine.

* Correctly autostart the renderer.

* Reworked QuickView to be async (wait for loading model).

* Fixed tests.

* Reactivated test.

* Moved all scene components to seperate folder.

* Moved src code to a more sturctured way.

* Added index.ts files for logical groups.

* Raised test coverage.

* Fixed irrelevant webxr files.

* Fixed tests.

* Added build path helper.

* Fixed Resize manager.

* Fixed view calculation.

* Fixed tests.

* Reworked Renderer.

* Fixed build path.

* Changed renderer name.

* Reworked Renderer.

* Changed renderer name to renderPipeline.

* Added new Action factory.

* Clean implementation of types.

* Implemented ComputeEncompassingViewAction.

* Rewrote actions to use new Action.define factory.

* Added tests to rewrote actions.

* Renamed Communication to State.

* Added build path helper.

* Added Action registry.

* Removed lint:actions script because linting resolves in TS now.

* Fixed tests.

* Fixed merge issues.

* Implemented ComputeEncompassingViewAction.

* Rewrote actions to use new Action.define factory.

* Renamed Communication to State.

* Added Animator for convinient animating.

* Added OrbitController refactoring (wip).

* Fixed tests.

* Renamed methods.

* Renamed methods, made Toolbox Module.

* Added canvas as a setting to QuickView.

* Refactor: State (#82)

* Added first version of State.

* Added dynamic dependencies to Actions.

* Changed property order.

* Added first version of ModuleRegistry.

* Renamed files.

* Fixed tests.

* Exclude ARSystem from global export.

* Removed unnecessary test.

* Renamed file, added test.

* Renamed export.

* Moved modules to own folder.

* Reworked ModuleRegistry.

* Improved error handling.

* Rearranged code.

* Renamed test describes.

* Refined build script to catch all module registrations.

* Moved files.

* Reworked module exports in package.json.

* Modified readme template to contain build process and yalc as local development environment.

* Updated readme template.

* Fixed Math naming.

* Created centralized module registrations (in modules/indes.ts).

* New build process approach.

* Improved ModuleRegistry workflow.

* Added relative paths to module registry.

* Fixed pipeline.

* Exposed dive instance modules.

* Updated readme template.

* Updated module documentation.

* Added module documentation to README.

* Automated module documentation.

* Fixed pipeline.

* Revert "Changed property order."

This reverts commit 40c7d13.

* Revert "Added dynamic dependencies to Actions."

This reverts commit 5a6bbd4.

* Revert "Added first version of State."

This reverts commit b2006ff.

* Fixed pipeline.

* Reworked module build process.

* Fixed paths.

* Fixed export.

* Reworked module types.

* Reworked documentation generation.

* Fixed pipeline.

* Moved ci script file.

* Renamed Modules to ModuleRegistry.

* Removed docs from npm package due to file size.

* Fixed build.

* Reworked ModuleRegistry to only deliver classes.

* Change package.json to export ModuleRegistry only.

* Added modules build path.

* Added more documentation.

* Removed ModuleRegistry to just use Importer on it's own.

* Reworked build process to dynamically rewrite imports.

* Added automatic instantiation as a method to ModuleImporter.

* Updated docs.

* Defined engine.

* Correctly autostart the renderer.

* Reworked QuickView to be async (wait for loading model).

* Fixed tests.

* Reactivated test.

* Moved all scene components to seperate folder.

* Moved src code to a more sturctured way.

* Added index.ts files for logical groups.

* Raised test coverage.

* Fixed irrelevant webxr files.

* Fixed tests.

* Added build path helper.

* Fixed Resize manager.

* Fixed view calculation.

* Fixed tests.

* Reworked Renderer.

* Fixed build path.

* Changed renderer name.

* Reworked Renderer.

* Changed renderer name to renderPipeline.

* Added new Action factory.

* Clean implementation of types.

* Implemented ComputeEncompassingViewAction.

* Rewrote actions to use new Action.define factory.

* Added tests to rewrote actions.

* Renamed Communication to State.

* Added build path helper.

* Added Action registry.

* Removed lint:actions script because linting resolves in TS now.

* Fixed tests.

* Fixed merge issues.

* Implemented ComputeEncompassingViewAction.

* Rewrote actions to use new Action.define factory.

* Renamed Communication to State.

* Added Animator for convinient animating.

* Added OrbitController refactoring (wip).

* Fixed tests.

* Renamed methods.

* Renamed methods, made Toolbox Module.

* Added canvas as a setting to QuickView.

* Modules rework (wip).

* Switched from jest to vitest.

* Fixed testing setup.

* Renamed entry file.

* Fixed tests.

* Added tsx for .ts execution.

* Added DRACO support locally.

* Reworked objects data flow.

* Fixed tests.

* Fixed TS issue.

* Update project config to correctly handle draco files.

* Reworked Draco Loader implementation.

* Fixed import of draco lib.

* Added class exports instead of types.

* Fixed applyMixin helper.

* Fixed instance referencing.

* Fixed floor visibility.

* Added instance unregistering.

* Removed mixin to fix interface issue.

* Expose engine and interface types.

* Fixed AnimationSystem test mock error.

* Fixed import in action.

* Improved error handling for AR.

* Moved event system out of modules.

* Added new module definition method via index.ts files.

* Fixed shadow map.

* Fixed tests.

* Added plugin structure to existing animation system.

* Added postinstall to install node_modules for plugins.

* Made imports more slim.

* Made SystemInfo a decoupled plugin.

* Made asset handlers decoupled plugins.

* Fixed vitest setup

* Added names to plugins.

* Made AxisCamera a plugin.

* Fixed media creator plugin.

* Moved remaining modules to plugin architecture.

* Fixed tests

* Add docu to vite config.

* Removed ModuleRegistry overhead.

* Moved required types from state plugin to core.

* Rebundled types.

* Fixed README for animation system.

* Added README for ar.

* Improved README for animation.

* Added README to assetconverter.

* Added README to axiscamera.

* Added README to mediacreator.

* Added README to orbitcontroller.

* Added README to state.

* Added README to systeminfo.

* Added README to toolbox.

* Renamed modules folder to plugins.

* Fixed ar plugin structure.

* Added README to assetexporter.

* Added README to assetloader.

* Fixed build step.

* Removed old docu.

* Cleaned up last imports.

* Deleted old types.

* Added robust install script.

* Prettier fix.

* Removed temporarily broken docs generation from ci script.

* Fixed remaining mocks.

* Renamed build script.

* Changed github workflows to cache plugins node_modules as well.

* Moved deps to root.

* Revert "Changed github workflows to cache plugins node_modules as well."

This reverts commit cf8d225.

* Refined error class types.

* Added user-story template for github.

* Introduced new error type. Correctly export error files.

* Removed duplicate test file.

* Added lockcamera action test.

* Exlude barrel exports from coverage report.

* Added test for type guards.

* Added testing for EventExecutor class.

* Renamed and extended the EventExecutor class to EventDispatcher.

* Added AssetCache plugin.

* Improved async test behaviour.

* Improved test coverage on TransformTool.

* Added more tests.

* Reworked encompassing view calculation.

* Renamed pipelines.

* Refactored Orientation Display.

* Added BoundingBox tests.

* Added export.
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.

2 participants