Skip to content

Conversation

@lachlan-robinson
Copy link
Contributor

OnTrack Component Review

Team Member Name

Name Student ID
Lachlan Mackie Robinson 220325142

Component Details

Name

listenerService

Files

listener-service.coffee


Component Purpose

The listenerService is designed to manage event listeners within the scope of an AngularJS
application. 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

  1. The service allows different parts of an application to register event listeners in a structured
    way.

  2. 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.

  3. 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.coffee
  • group-selector.coffee
  • dashboard.coffee
  • task-dashboard.coffee
  • tasks.coffee
  • unit-task-list.coffee
  • progress-burndown-chart.coffee

Component Migration Plan

As this is a non visual service, the migration will only require:

  1. Create new listener.service.ts file.

  2. Update imports in doubtfire-angular.module.ts and doubtfire-angularjs.module.ts files.

  3. Downgrade the service so it is usable via angularJs components.

  4. Migrate service logic to typescript and angular 17 compatibility.

  5. Update call instances from angularJs components to handle lifecyle. (This will not be required
    angular17 components.)

  6. Test implementation via manual testing and console logging.


Component Post-Migration

Pending Implementation...


@atharv02-git
Copy link

atharv02-git commented Mar 20, 2025

Hello Lachlan, just went through your component review.

  1. Component Name and file has been mentioned properly
  2. Component Purpose, Outcomes and Interactions have been described briefly
  3. Also well Structured Migration Plan
    Template has been structured properly, I approve this Component Review. Now you can proceed with your migration, all the best.
    One thing I would like to mention here is if you want to merge any commit merge it into 8.0.x instead of main

@JoeMacl
Copy link

JoeMacl commented Mar 26, 2025

Hi Lachlan, I completed the migration for the listenerService component. It has been successfully downgraded and tested in AngularJS. Everything seems to be working as expected! Good job!

@zara1504
Copy link

Hey Lachlan, I was able to pull ur request and test your work. With this, I could see all the changes you made for this task and test them, which worked well. Great work. :)

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.

4 participants