This PR is an attempt to clean up big services, mainly the ProcessingService and switch their most accessed variables to RxJS Subjects & *Observable`s.
This includes:
renaming things for humans, so new contributors might have an easier time understanding what a variable is needed for.
removing duplicate variables from components & services that used to just copy the current value from ProcessingService, which would in turn never know if something gets updated elsewhere
moving data back to the services
combining variables that share the same context to objects
getting rid of side effects
Ideally, this should work as a drop-in replacement.
Why was this done?
Even as one of the core developers, it was not always easy to understand or debug how the data flows from services to components in the Viewer, or how components modified service data. This slows down feature development and blocks-off potential new developers.
Note: https://github.com/Kompakkt/Viewer/pull/40 was merged too early and reverted. This is the correct version.
What?
This PR is an attempt to clean up big services, mainly the
ProcessingService
and switch their most accessed variables to RxJSSubject
s & *Observable`s.This includes:
ProcessingService
, which would in turn never know if something gets updated elsewhereIdeally, this should work as a drop-in replacement.
Why was this done?
Even as one of the core developers, it was not always easy to understand or debug how the data flows from services to components in the Viewer, or how components modified service data. This slows down feature development and blocks-off potential new developers.