listener-service component (service) review #578
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OnTrack Component Review
Team Member Name
Component Details
Name
listenerServiceFiles
listener-service.coffeeComponent Purpose
The
listenerServiceis designed to manage event listeners within the scope of an AngularJSapplication. It helps track and clean up event listeners when a scope is destroyed, preventing
memory leaks and ensuring efficient resource management.
Component Outcomes and Interactions
The service allows different parts of an application to register event listeners in a structured
way.
When a scope is destroyed (e.g., navigating away and removing the component from the DOM), the
service ensures that all associated event listeners are cleaned up to avoid memory leaks.
The listeners are primarily used to watch changes in data (such as with the
progress-burndown-chart.coffee) and update the UI accordingly.Current Uses
group-member-list.coffeegroup-selector.coffeedashboard.coffeetask-dashboard.coffeetasks.coffeeunit-task-list.coffeeprogress-burndown-chart.coffeeComponent Migration Plan
As this is a non visual service, the migration will only require:
Create new
listener.service.tsfile.Update imports in
doubtfire-angular.module.tsanddoubtfire-angularjs.module.tsfiles.Downgrade the service so it is usable via angularJs components.
Migrate service logic to typescript and angular 17 compatibility.
Update call instances from angularJs components to handle lifecyle. (This will not be required
angular17 components.)
Test implementation via manual testing and console logging.
Component Post-Migration
Pending Implementation...